Menu Update
Use the Menu Update endpoint to upload menu changes.
Interface IMenuItem | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | |||||||||||||||
URL |
| |||||||||||||||
Headers |
*For configuration information, see Enable and Subscribe to Service. | |||||||||||||||
Body |
| |||||||||||||||
Error Response | Token not provided. | |||||||||||||||
Body Payload
interface IMenuItem {
productId: string; //id of the product
productName: string; //product name
productDescription?: string; //optional, product description
price: number; // product price
}
interface IMenu {
products: IMenuItem[]; // array of products
}Validation
Our Pricing API performs request validation. When validation conditions are not met, the API throws an error. For additional information, see Error Responses.
export class MenuPayloadItemDto implements IMenuPayload {
productId: string;
productName: string;
productDescription: string;
price: number;
}
export class MenuPushDto implements IPushMenuDto {
products: MenuPayloadItemDto[];
}Request Example
An HTTP request with a valid body payload:
curl --location --request POST
'https://pricing-dmb.xenial.com/v1/menu' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'authorization: {INSERT YOUR TOKEN}' \
--header 'store-id: ${STORE ID}\
--header 'brand-id: ${BRAND ID}\
--header 'integrator: ${INTEGRATOR}' \
--header 'Content-Type: application/json' \
--data-raw '{
"products": [
{
"productId": "burger",
"productName": "light burger",
"productDescription": "product description",
"price": 1.5
},
{
"productId": "burger2",
"productName": "light burger2",
"productDescription": "product description",
"price": 10
}
{
"productId": "burger3",
"productName": "light burger3",
"productDescription": "product description",
"price": 0.99
}
]
}'
Response (200 HTTP OK):
{}