POST
/
api
/
v1
/
locations
/
{locationId}
/
discounts
/
apply-discount
{
  "cartId": "cart_123abc",
  "code": "SAVE10",
  "customerId": "cust_789xyz"
}
{
  "success": true
}

Path Parameters

locationId
string
required
The unique identifier for the restaurant location

Request Body

cartId
string
required
The unique identifier for the cart
code
string
required
The discount code to apply
customerId
string
The customer ID (required for customer-specific discounts)
{
  "cartId": "cart_123abc",
  "code": "SAVE10",
  "customerId": "cust_789xyz"
}
{
  "success": true
}
The endpoint applies the discount code to the cart and returns a simple success response. The discount details and updated cart totals can be retrieved by fetching the cart using the GET /locations//carts/ endpoint after applying the discount.

Authorizations

X-API-Key
string
header
required

Path Parameters

locationId
string
required

The unique identifier for the restaurant location

Body

application/json

Response

200
application/json

Discount applied successfully

The response is of type object.