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
Copy curl -D- -X POST < base_ur l > /api/v1/carts/ < cartI d > /promotion-codes/ < cod e > \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \
-d '{
"priceGroupId": "<priceGroupId>",
"cultureCode": "<CultureCode>"
}'
Copy {
"promotionCodes" : [
{
"code" : "{promotionCode}" ,
}
]
}
Copy curl -D- -X GET < base_ur l > /api/v1/carts/ < cartI d > /promotion-codes \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \
Copy {
"promotionCodes" : [
{
"code" : "{promotionCode}" ,
}
]
}
Copy curl -D- -X DELETE < base_ur l > /api/v1/carts/ < cartI d > /promotion-codes/ < cod e > \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \
-d '{
"priceGroupId": "<priceGroupId>",
"cultureCode": "<cultureCode>"
}'
Copy {
"promotionCodes" : [
]
}
Copy {
"errors" :
[
{
"error-description" : "AccessToken not found, access denied." ,
"error" : "BadRequest"
}
]
}