Invalid JSON in body
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 44
- Joined: 05 Oct 2019, 06:42
Invalid JSON in body
Hi guys,
I am trying to add a product to the basket from the postman. Now I have installed Laravel passport and passing the authorization in the headers and my URL with post method is -:
Now in response, I am getting -:
"errors": [
{
"title": "Invalid JSON in body"
}
]
Any idea what I may be doing wrong? Please assist.
Thank you
I am trying to add a product to the basket from the postman. Now I have installed Laravel passport and passing the authorization in the headers and my URL with post method is -:
Code: Select all
http://ebdaa-ecommerce-beta.test/default/jsonapi/basket?id=default&related=product&product.id=15&quantity=1
Now in response, I am getting -:
"errors": [
{
"title": "Invalid JSON in body"
}
]
Any idea what I may be doing wrong? Please assist.
Thank you
Re: Invalid JSON in body
Product ID, quantity, etc. must be passed in the JSON body, not as GET parameter:
https://aimeos.org/docs/Developers/Clie ... d_products
https://aimeos.org/docs/Developers/Clie ... d_products
Code: Select all
{data: [{
attributes: {
"product.id": "<id>",
"quantity": 1,
"stocktype": "default",
"variant": [],
"config": {},
"custom": {}
}
}]}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star