Line Item Custom Properties
You can enable a mini cart view in the following requests to show changes to the cart immediately. Find out more in the Views for Cart modifying operations
Prerequisites
access_tokenfrom Headless API AuthenticationcartIdfrom Create a Cart
Add Custom Properties to Line Item
Parameters
lineId(string)keythe unique key of the property (string)valuethe value of the property (string)
Request
curl -D- -X POST <base_url>/api/v1/carts/<cartId>/<lineId>/properties \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \
-d '{
"cultureCode": "<cultureCode>",
"priceGroupId": "<priceGroupId>",
"key": "<key>",
"value": "<value>"
}'Response
Delete Custom Property from Line Item
Parameters
propertyIdfrom Line Item Custom Properties or Line Item Custom PropertieslineId(string)
Request
Response
Get Custom Properties for Line Item
Parameters
lineId(string)
Request
Response
Update Custom Properties for Line Item
Parameters
lineId(string)propertyIdfrom Line Item Custom Properties or Line Item Custom Propertiesvaluenew value for the property (string)
Request
Response
Error Handling
BadRequest (400)
Execution of the pipeline fails; AccessToken was not attached.
Unauthorized (401)
The token is expired.
Forbidden (403)
The token does not have access to this endpoint.
NotFound (404)
Cart or Property not found.
Conflict (409)
Property already exists on the order.
Error Response Example
Related Articles
Error HandlingLast updated
Was this helpful?