Check available promotions for basket

POST /terminal/basket/check-promotions

Requires process_orders or process_test_orders permission

Headers

  • Store-Subdomain string Required

    Store subdomain for store-specific operations

application/json

Body Required

  • basket object Required
    Hide basket attribute Show basket attribute object
    • items array[object] Required

      At least 1 element.

      Hide items attributes Show items attributes object
      • product_id string(uuid) Required
      • variant_id string(uuid) | null
      • quantity integer Required

        Minimum value is 1.

Responses

  • 200 application/json

    Available promotions

    Hide response attribute Show response attribute object
    • data array[object]
      Hide data attributes Show data attributes object
      • id string(uuid)
      • name string
      • type string
      • value number
      • applicable boolean
  • 422

    Validation error

POST /terminal/basket/check-promotions
curl \
 --request POST 'https://api.gb.enjovia.app/terminal/basket/check-promotions' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "Store-Subdomain: string" \
 --data '{"basket":{"items":[{"product_id":"string","variant_id":"string","quantity":42}]}}'
Request examples
# Headers
Store-Subdomain: string

# Payload
{
  "basket": {
    "items": [
      {
        "product_id": "string",
        "variant_id": "string",
        "quantity": 42
      }
    ]
  }
}
Response examples (200)
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "type": "string",
      "value": 42.0,
      "applicable": true
    }
  ]
}