Skip to main content

Menu Creation Request

Viewing Menu Creation Request Status

The MenuCreationRequest query provides detailed information about a specific menu creation request, including the creation status, warning message and error messages to explain why a menu was not successfully created.

To use the query a valid menuCreationRequestId is required. This UUID is returned with the Menu Create mutation as well as within the payload of MenuCreationRequest subscription notifications, which are sent after a Menu Creation Request is completed processing. Since menu creation is an asynchronous process we recommend Subscribing to Menu Notifications to be informed when the process is complete instead of continuously retrying the query.

Query

Query

query MenuCreationRequest($menuCreationRequestId: UUID!) {
menuCreationRequest(id: $menuCreationRequestId) {
errors {
details
message
}
menuUuid
outcome
status
warnings {
details
message
}
}
}

Variables

Variables

{
"menuCreationRequestId": "your-ezcater-menu-creation-request-id"
}

Arguments

Argument Name

Description

id: UUID!

The menuCreationRequestId that was returned by the MenuCreate mutation or received from a menu creation request notification.

Return Type

Success Responses

When the menuCreationRequest query succeeds you can expect the response payload to look in one of two different ways:

  1. If the menu was created with the outcome of success, the warnings and errors field values will empty.

  2. If the menu was created with the outcome of success_with_warnings, the warnings will be provided and the the errors field value will empty.

Response - Success

{
"data": {
"menuCreationRequest": {
"errors": [],
"menuUuid": "ezcater-menu-version-id",
"outcome": "success",
"status": "complete",
"warnings": []
}
}
}

Response - Success With Warnings

{
"data": {
"menuCreationRequest": {
"errors": [],
"menuUuid": "your-ezcater-menu-version-id",
"outcome": "success_with_warnings",
"status": "completed",
"warnings": [
{
"details": {},
"message": "Item with pos_id assorted-sodas-item-selection-id has a price of $0.00. It will not be displayed."
}
]
}
}
}

Failure Responses

Not authenticated

When an the user is unable to be authenticated.

Response

{
"errors": [
{
"message": "Not authenticated.",
"extensions": {
"code": "ERR_UNAUTHENTICATED"
}
}
]
}

Invaild menuCreationRequestId

When an invalid menuCreationRequestId is provided, no menuCreationRequest data is returned in the response payload.

Response

{
"data": {
"menuCreationRequest": null
}
}

Internal Error

When an internal error occurs, we are unable to provide additional details.

Response

{
"data": {
"menuCreationRequest": {
"errors": [
{
"details": {},
"message": "Internal error"
}
],
"menuUuid": null,
"outcome": "failure",
"status": "completed",
"warnings": []
}
}
}

Referenced Entity Is Not Defined

When a menu entity references a child menu entity, but it is not properly defined you can expect an outcome of failure and the response payload to include a message with details.

Response

{
"data": {
"menuCreationRequest": {
"errors": [
{
"details": {
"source": "categories",
"source_name": "Drinks",
"source_pos_id": "drinks-category-id",
"reference_type": "items",
"referenced_pos_id": "drinks-item-id"
},
"message": "Referenced entity is not defined"
}
],
"menuUuid": null,
"outcome": "failure",
"status": "completed",
"warnings": []
}
}
}

Number Of Choice Selections

When the minimum number of choice selections is greater than the number of available choices you can expect an outcome of failure and the response payload to include a message with details.

Response - Min Choice Selections

{
"data": {
"menuCreationRequest": {
"errors": [
{
"details": {
"minchoices": 10,
"entity_name": "Cheese Addon",
"entity_pos_id": "cheese-addon-options-id",
"choices_present": 7
},
"message": "minChoiceSelections must be less than or equal to count of Choices""
}
],
"menuUuid": null,
"outcome": "failure",
"status": "completed",
"warnings": []
}
}
}

Response - Max Choice Selections

{
"data": {
"menuCreationRequest": {
"errors": [
{
"details": {
"maxchoices": 1,
"minchoices": 2,
"entity_name": "Cheese Addon",
"entity_pos_id": "cheese-addon-options-id"
},
"message": "maxChoiceSelections must be greater than or equal to minChoiceSelections"
}
],
"menuUuid": null,
"outcome": "failure",
"status": "completed",
"warnings": []
}
}
}

Invalid Images

When there is a problem finding the item image you can expect the response payload to include a message with details.

Response

{
"data": {
"menuCreationRequest": {
"errors": [
{
"details": {
"image_url": "https://your-domain.com/menu-item-images/margherita-pizza.jpg",
"item_pos_id": "margherita-pizza-item-id"
},
"message": "Problem with item image - could not find image"
}
],
"menuUuid": "ezcater-menu-id",
"outcome": null,
"status": "completed",
"warnings": []
}
}
}
Did this answer your question?