Error Responses
Error responses are as follows:
Message | Status Code | Solution |
|---|---|---|
401 | Add JWT to request header | |
403 | Verify the JWT matches the once received from us | |
400 | Add | |
400 | Add | |
400 | Add | |
400 | Verify the site subscription in the Portal | |
400 | Update body payload and try request again |
For Portal Subscription information, see Enable and Subscribe to Service.
Body Payload Invalid
Invalid request
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"
}
]
}'Response (400 HTTP)
{
"statusCode": 400,
"timestamp": "2023-05-30T09:59:37.200Z",
"path": "/v1/menu",
"reason": {
"statusCode": 400,
"message": [
"products.0.productId must be longer than or equal to 1 characters",
"products.0.productId must be a string",
"products.0.productName must be longer than or equal to 1 characters",
"products.0.productName must be a string",
"products.0.productDescription must be a string",
"products.0.price must not be less than 0",
"products.0.price must be a number conforming to the specified constraints"
],
"error": "Bad Request"
}
}integrator Header Missing
{
"statusCode": 400,
"timestamp": "2023-05-30T09:52:31.267Z",
"path": "/v1/menu",
"reason": {
"statusCode": 400,
"message": "Header integrator is required",
"error": "Bad Request"
}
}brand-id Header Missing
{
"statusCode": 400,
"timestamp": "2023-05-30T09:52:31.267Z",
"path": "/v1/menu",
"reason": {
"statusCode": 400,
"message": "Header brand-id is required",
"error": "Bad Request"
}
} Site Subscription Not Active
{
"statusCode": 400,
"timestamp": "2023-05-30T09:48:46.785Z",
"path": "/v1/menu",
"reason": {
"statusCode": 400,
"message": "Site subscription is not active",
"error": "Bad Request"
}
} store-id Header Missing
{
"statusCode": 400,
"timestamp": "20XX-05-30T09:52:31.267Z",
"path": "/v1/menu",
"reason": {
"statusCode": 400,
"message": "Header store-id is required",
"error": "Bad Request"
}
}Token Invalid
{
"statusCode": 403,
"timestamp": "20XX-05-30T09:48:14.871Z",
"path": "/v1/menu",
"reason": {
"message": "token is invalid"
}
}Token Not Provided
{
"statusCode": 401,
"timestamp": "20XX-05-30T09:47:04.181Z",
"path": "/v1/menu",
"reason": {
"message": "token was not provided in request headers. Use \"Authorizarion\" key."
}
}