Skip to content

Adding coupon(s) to the cart

POST
/carts/{cartId}/coupons
curl --request POST \
--url https://myshop.com/shopgate/v1/carts/example/coupons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[ "example" ]'

Adds multiple coupons to the cart. The coupon code needs to be unique. There can’t be two coupons with identical codes in the cart at any given time.

cartId
required
string

Code of the coupon.

Array<string>
Examplegenerated
[
"example"
]

Coupon was successfully added.

Media typeapplication/json
object
Examplegenerated
{}

An invalid or expired coupon code was entered.

Media typeapplication/json
object
message
string
Example
{
"message": "Coupons is invalid! Please make sure that the coupon is correct."
}
Media typeapplication/json
object
message
string
name
string
Example
{
"message": "Invalid token: access token is invalid",
"name": "invalid_token"
}
Media typeapplication/json
object
message
string
Example
{
"message": "Not found"
}