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
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 '"{\n \"store_eni\": \"STORE-2024-001\",\n \"customer_id\": \"customer-123456\",\n \"data\": {\n \"products\": [\n {\n \"id\": \"987e6543-e21b-12d3-a456-426614174000\",\n \"eni\": \"PROD-2024-001\",\n \"image_url\": \"https://example.com/product.jpg\",\n \"message\": \"Happy Birthday!\",\n \"recipient_name\": \"John Doe\",\n \"from_name\": \"Jane Smith\",\n \"monetary_value\": 5000,\n \"shipping\": {\n \"type\": \"email\",\n \"email\": \"john.doe@example.com\"\n }\n },\n {\n \"id\": \"abc12345-e89b-12d3-a456-426614174001\",\n \"eni\": \"PROD-2024-002\",\n \"image_url\": \"https://example.com/product2.jpg\",\n \"variant_id\": \"def45678-e89b-12d3-a456-426614174002\",\n \"addons\": [\n {\n \"id\": \"789abcde-e89b-12d3-a456-426614174003\",\n \"eni\": \"ADDON-001\"\n }\n ],\n \"shipping\": {\n \"type\": \"post\",\n \"packaging_option_id\": \"123e4567-e89b-12d3-a456-426614174004\",\n \"delivery_method_id\": \"456e7890-e89b-12d3-a456-426614174005\",\n \"delivery_address\": {\n \"name\": \"John Doe\",\n \"address_line_1\": \"123 Main St\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"postal_code\": \"10001\",\n \"country\": \"US\"\n }\n }\n }\n ],\n \"marketing_consent\": true,\n \"promotion\": {\n \"id\": \"bcd23456-e89b-12d3-a456-426614174006\",\n \"eni\": \"PROMO-001\",\n \"code\": \"SUMMER20\"\n }\n }\n}"'
Request example
{
"store_eni": "STORE-2024-001",
"customer_id": "customer-123456",
"data": {
"products": [
{
"id": "987e6543-e21b-12d3-a456-426614174000",
"eni": "PROD-2024-001",
"image_url": "https://example.com/product.jpg",
"message": "Happy Birthday!",
"recipient_name": "John Doe",
"from_name": "Jane Smith",
"monetary_value": 5000,
"shipping": {
"type": "email",
"email": "john.doe@example.com"
}
},
{
"id": "abc12345-e89b-12d3-a456-426614174001",
"eni": "PROD-2024-002",
"image_url": "https://example.com/product2.jpg",
"variant_id": "def45678-e89b-12d3-a456-426614174002",
"addons": [
{
"id": "789abcde-e89b-12d3-a456-426614174003",
"eni": "ADDON-001"
}
],
"shipping": {
"type": "post",
"packaging_option_id": "123e4567-e89b-12d3-a456-426614174004",
"delivery_method_id": "456e7890-e89b-12d3-a456-426614174005",
"delivery_address": {
"name": "John Doe",
"address_line_1": "123 Main St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
}
}
}
],
"marketing_consent": true,
"promotion": {
"id": "bcd23456-e89b-12d3-a456-426614174006",
"eni": "PROMO-001",
"code": "SUMMER20"
}
}
}
Response examples (200)
{
"basket": {
"id": "string",
"customer_id": "string",
"data": {}
}
}