Validate terminal basket

POST /terminal/basket/validate

Validates and calculates pricing for a terminal basket. Returns the basket with calculated prices, taxes, and discounts. Requires process_orders or process_test_orders permission

Headers

  • Store-Subdomain string Required

    Store subdomain for store-specific operations

application/json

Body Required

  • store_eni string Required

    Store ENI (Entity Number Identifier)

  • customer_id string Required

    Customer identifier

    Maximum length is 191.

  • data object Required
    Hide data attributes Show data attributes object
    • products array[object] Required
      Hide products attributes Show products attributes object
      • id string(uuid) Required

        Product UUID

      • eni string Required

        Product ENI

      • image_url string Required

        Product image URL

      • message string | null

        Gift message

        Maximum length is 191.

      • recipient_name string | null

        Recipient name for voucher

        Maximum length is 60.

      • from_name string | null

        Sender name for voucher

        Maximum length is 60.

      • monetary_value integer

        Value for monetary products

        Minimum value is 0, maximum value is 99999999.

      • category_id string(uuid)

        Category UUID (required with category_eni)

      • category_eni string

        Category ENI (required with category_id)

      • variant_id string(uuid) | null

        Product variant UUID

      • addons array[object]
        Hide addons attributes Show addons attributes object
        • id string(uuid) Required

          Addon UUID

        • eni string Required

          Addon ENI

        • staff_discount object
          Hide staff_discount attribute Show staff_discount attribute object
          • discount_value integer

            Staff discount amount

            Minimum value is 0, maximum value is 99999999.

      • shipping object Required
        Hide shipping attributes Show shipping attributes object
        • type string Required

          Delivery type

          Values are email, post, or collect.

        • email string(email)

          Required if type is email

        • email_recipient_name string | null

          Email recipient name

          Maximum length is 60.

        • email_from_name string | null

          Email sender name

          Maximum length is 60.

        • packaging_option_id string(uuid)

          Required for post/collect

        • delivery_method_id string(uuid)

          Required if type is post

        • delivery_address object

          Required if type is post

        • collection_point_id string(uuid)

          For collect type

        • staff_discount object
          Hide staff_discount attribute Show staff_discount attribute object
          • discount_value integer

            Minimum value is 0, maximum value is 99999999.

      • staff_discount object
        Hide staff_discount attribute Show staff_discount attribute object
        • discount_value integer

          Staff discount amount

          Minimum value is 0, maximum value is 99999999.

    • promotion object
      Hide promotion attributes Show promotion attributes object
      • id string(uuid)

        Promotion UUID

      • eni string

        Promotion ENI

      • code string

        Promotion code

Responses

  • 200 application/json

    Validated basket with calculated prices

    Hide response attribute Show response attribute object
    • basket object
      Hide basket attributes Show basket attributes object
      • id string(uuid)

        Basket UUID

      • customer_id string

        Customer identifier

      • data object

        Basket data with calculated prices, taxes, discounts

  • 403

    Forbidden - storefront users cannot access

  • 422

    Validation error

POST /terminal/basket/validate
curl \
 --request POST 'https://api.gb.enjovia.app/terminal/basket/validate' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "Store-Subdomain: string" \
 --data '{"data":{"products":[{"id":"987e6543-e21b-12d3-a456-426614174000","eni":"PROD-2024-001","message":"Happy Birthday!","shipping":{"type":"email","email":"john.doe@example.com","email_recipient_name":"John Doe"},"from_name":"Jane Smith","image_url":"https://example.com/product.jpg","monetary_value":5000,"recipient_name":"John Doe"},{"id":"abc12345-e89b-12d3-a456-426614174001","eni":"PROD-2024-002","addons":[{"id":"789abcde-e89b-12d3-a456-426614174003","eni":"ADDON-001"}],"shipping":{"type":"post","delivery_address":{"city":"New York","name":"John Doe","state":"NY","country":"US","postal_code":"10001","address_line_1":"123 Main St"},"delivery_method_id":"456e7890-e89b-12d3-a456-426614174005","packaging_option_id":"123e4567-e89b-12d3-a456-426614174004"},"image_url":"https://example.com/product2.jpg","variant_id":"def45678-e89b-12d3-a456-426614174002"}],"promotion":{"id":"bcd23456-e89b-12d3-a456-426614174006","eni":"PROMO-001","code":"SUMMER20"},"marketing_consent":true},"store_eni":"STORE-2024-001","customer_id":"customer-123456"}'
Request example
{
  "data": {
    "products": [
      {
        "id": "987e6543-e21b-12d3-a456-426614174000",
        "eni": "PROD-2024-001",
        "message": "Happy Birthday!",
        "shipping": {
          "type": "email",
          "email": "john.doe@example.com",
          "email_recipient_name": "John Doe"
        },
        "from_name": "Jane Smith",
        "image_url": "https://example.com/product.jpg",
        "monetary_value": 5000,
        "recipient_name": "John Doe"
      },
      {
        "id": "abc12345-e89b-12d3-a456-426614174001",
        "eni": "PROD-2024-002",
        "addons": [
          {
            "id": "789abcde-e89b-12d3-a456-426614174003",
            "eni": "ADDON-001"
          }
        ],
        "shipping": {
          "type": "post",
          "delivery_address": {
            "city": "New York",
            "name": "John Doe",
            "state": "NY",
            "country": "US",
            "postal_code": "10001",
            "address_line_1": "123 Main St"
          },
          "delivery_method_id": "456e7890-e89b-12d3-a456-426614174005",
          "packaging_option_id": "123e4567-e89b-12d3-a456-426614174004"
        },
        "image_url": "https://example.com/product2.jpg",
        "variant_id": "def45678-e89b-12d3-a456-426614174002"
      }
    ],
    "promotion": {
      "id": "bcd23456-e89b-12d3-a456-426614174006",
      "eni": "PROMO-001",
      "code": "SUMMER20"
    },
    "marketing_consent": true
  },
  "store_eni": "STORE-2024-001",
  "customer_id": "customer-123456"
}
Response examples (200)
{
  "basket": {
    "id": "string",
    "customer_id": "string",
    "data": {}
  }
}