Public API for Catering Partne...
Menus API
Menu Errors & Warnings
3 min
submission errors these errors are returned immediately to the api user, and prevent a menu creation request from being created error type error type example responses example responses description description recommended actions recommended actions required fields required fields {"errors" \[ field \\"locationid\\" of required type \\"uuid!\\" was not provided ", ]} {"errors" \[ field \\"locationid\\" of required type \\"uuid!\\" was not provided ", ]} {"errors" \[ message" "variable $menu of type menuinput! was provided invalid value for locationid (\\"\\" is not a valid uuid)", ]} {"errors" \[ message" "variable $menu of type menuinput! was provided invalid value for locationid (\\"\\" is not a valid uuid)", ]} fields that cannot be blank/null • location id (uuid format required) • pos id (string) • name (string) • start date (date format, cannot be blank) • categories (array, minimum 1 required) • items (array, minimum 1 required) fields that cannot be blank/null • location id (uuid format required) • pos id (string) • name (string) • start date (date format, cannot be blank) • categories (array, minimum 1 required) • items (array, minimum 1 required) ensure all required fields are provided ensure all required fields are provided verify uuid format for location id verify uuid format for location id use proper date format for start date use proper date format for start date collection length collection length {"errors" \[ "message" "items is too short (minimum is 1)", ]} {"errors" \[ "message" "items is too short (minimum is 1)", ]} {"errors" \[ "message" "selections is too short (minimum is 1)", ]} {"errors" \[ "message" "selections is too short (minimum is 1)", ]} • categories and items arrays must have at least 1 element • item selections must have 1 5 elements • choice selections must have 1 5 elements • categories and items arrays must have at least 1 element • item selections must have 1 5 elements • choice selections must have 1 5 elements provide at least one category and one item provide at least one category and one item ensure each item has 1 5 selections ensure each item has 1 5 selections ensure each choice has 1 5 selections ensure each choice has 1 5 selections item type tag item type tag {"errors" \[ "message" "the 'individuallypackagedrelishside' tag is only valid for choices, not for items", ]} {"errors" \[ "message" "the 'individuallypackagedrelishside' tag is only valid for choices, not for items", ]} specific business rule validation this tag can only be applied to choices specific business rule validation this tag can only be applied to choices remove 'individuallypackagedrelishside' from item item type tags remove 'individuallypackagedrelishside' from item item type tags apply this tag to appropriate choices instead apply this tag to appropriate choices instead runtime errors these errors are aggregated throughout the course of the menu creation, and are returned when the api user queries the https //api ezcater io/menu creation request if any of these errors are returned, the menu is not created error type error type example responses example responses description description recommended actions recommended actions duplicate property duplicate property { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "each member of the 'items' collection must have a unique 'pos id'", "details" { "count" 2, "pos id" "item 1" } } { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "each member of the 'items' collection must have a unique 'pos id'", "details" { "count" 2, "pos id" "item 1" } } applies to categories, items, options, choices applies to categories, items, options, choices pos id must be unique within each collection pos id must be unique within each collection ensure each pos id is unique within categories, items, options, choices ensure each pos id is unique within categories, items, options, choices use consistent id naming scheme (e g , cat001, cat002 for categories) use consistent id naming scheme (e g , cat001, cat002 for categories) validate uniqueness before submission validate uniqueness before submission reference validation reference validation { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "referenced entity is not defined", "details" { "source" "categories", "source name" "catering packages", "source pos id" "category 1", "reference type" "items", "referenced pos id" "item 2" } } { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "referenced entity is not defined", "details" { "source" "categories", "source name" "catering packages", "source pos id" "category 1", "reference type" "items", "referenced pos id" "item 2" } } • items referenced by categories must exist (item pos ids) • options referenced by items must exist (option pos ids) • choices referenced by options must exist (choice pos ids) • items referenced by categories must exist (item pos ids) • options referenced by items must exist (option pos ids) • choices referenced by options must exist (choice pos ids) verify all referenced pos id values exist in their collections verify all referenced pos id values exist in their collections selection size selection size { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "entity has duplicate selection sizes", "details" { "size" "1 5", "entity name" "xl deep dish pizza", "entity pos id" "item 1" } } ] { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "errors" \[ { "message" "entity has duplicate selection sizes", "details" { "size" "1 5", "entity name" "xl deep dish pizza", "entity pos id" "item 1" } } ] items cannot have multiple selections with the same size name items cannot have multiple selections with the same size name use distinct size names for item selections use distinct size names for item selections consider using size codes instead of names if needed consider using size codes instead of names if needed choice selection logic choice selection logic "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "maxchoiceselections must be greater than or equal to minchoiceselections", "details" { "maxchoices" 1, "minchoices" 5, "entity name" "taco bar", "entity pos id" "option 2" } }, { "message" "minchoiceselections must be less than or equal to count of choices", "details" { "minchoices" 5, "entity name" "taco bar", "entity pos id" "option 2", "choices present" 3 } } ], "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "maxchoiceselections must be greater than or equal to minchoiceselections", "details" { "maxchoices" 1, "minchoices" 5, "entity name" "taco bar", "entity pos id" "option 2" } }, { "message" "minchoiceselections must be less than or equal to count of choices", "details" { "minchoices" 5, "entity name" "taco bar", "entity pos id" "option 2", "choices present" 3 } } ], for an option group for an option group the maximum number of choices must be greater than or equal to the required minimum the maximum number of choices must be greater than or equal to the required minimum a minimum choices requirement must be less than or equal to the total number of choices available a minimum choices requirement must be less than or equal to the total number of choices available ensure max choice selections >= min choice selections ensure max choice selections >= min choice selections set min choice selections = 0 if selections are optional set min choice selections = 0 if selections are optional reduce min choice selections to match available choices reduce min choice selections to match available choices add more choices to the option add more choices to the option review option design for usability review option design for usability item choice selection mismatch item choice selection mismatch { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "choice must have either 1 selection, or >= selections than associated item", "details" { "item pos id" "item 1", "choice pos id" "choice 1", "option pod id" "option 1" } } ], { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "choice must have either 1 selection, or >= selections than associated item", "details" { "item pos id" "item 1", "choice pos id" "choice 1", "option pod id" "option 1" } } ], to ensure pricing structure is consistent between items and choices, a choice must have either 1 selection, or greater than or equal to the number of selections of the associated item to ensure pricing structure is consistent between items and choices, a choice must have either 1 selection, or greater than or equal to the number of selections of the associated item standardize selection structures across items and choices standardize selection structures across items and choices use single selection choices when possible use single selection choices when possible zero priced items zero priced items { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "too many zero priced items", "details" { "threshold" 100, "zero price percentage" 100 } } ], { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "too many zero priced items", "details" { "threshold" 100, "zero price percentage" 100 } } ], this error is returned when no menu items have a price this error is returned when no menu items have a price review pricing strategy review pricing strategy ensure at least some items have prices > 0 ensure at least some items have prices > 0 consider if zero priced items are intentional consider if zero priced items are intentional relish channel relish channel { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "item must have quantityoptions of '>1'", "details" { "item pos id" "item 1", "quantity options" ">5" } }, { "message" "selection must have serves = 1", "details" { "serves" 5, "item pos id" "item 1", "selection pos id" null } }, { "message" "item cannot have a choice with enablesubquantities = true", "details" { "item pos id" "item 1", "choice pos id" "choice 1", "option pos id" "option 1" } } ], { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "item must have quantityoptions of '>1'", "details" { "item pos id" "item 1", "quantity options" ">5" } }, { "message" "selection must have serves = 1", "details" { "serves" 5, "item pos id" "item 1", "selection pos id" null } }, { "message" "item cannot have a choice with enablesubquantities = true", "details" { "item pos id" "item 1", "choice pos id" "choice 1", "option pos id" "option 1" } } ], if an item services the “relish” channel if an item services the “relish” channel it must be available to the customer in quantities of 1 it must be available to the customer in quantities of 1 all selection sizes within the item must serve 1 all selection sizes within the item must serve 1 it cannot have a choice with sub quantities enabled it cannot have a choice with sub quantities enabled set quantity options ">1" for relish items set quantity options ">1" for relish items review channel specific requirements review channel specific requirements set serves 1 for all selections on relish items set serves 1 for all selections on relish items review serving size logic review serving size logic remove enable sub quantities from choices on relish items remove enable sub quantities from choices on relish items review choice configuration for relish compatibility review choice configuration for relish compatibility utensils utensils { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "option 'toppings deep dish catering' mixes utensil and non utensil choices ", "details" { "option name" "toppings deep dish catering", "option pos id" "option 1" } }, { "message" "option 'utensils' with utensil choices must not have min choice selections > 0 ", "details" { "option name" "utensils", "option pos id" "utensils 1" } } ], { "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "option 'toppings deep dish catering' mixes utensil and non utensil choices ", "details" { "option name" "toppings deep dish catering", "option pos id" "option 1" } }, { "message" "option 'utensils' with utensil choices must not have min choice selections > 0 ", "details" { "option name" "utensils", "option pos id" "utensils 1" } } ], an option group cannot mix utensil and non utensil choices an option group cannot mix utensil and non utensil choices a utensil option group cannot have required choices, utensils should always be optional a utensil option group cannot have required choices, utensils should always be optional separate utensil choices into dedicated options separate utensil choices into dedicated options review utensil choice categorization review utensil choice categorization use choice type tags properly use choice type tags properly set min choice selections 0 for utensil options set min choice selections 0 for utensil options make utensil selection customer optio make utensil selection customer optio nal runtime warnings these are warnings that are aggregated during the course of menu creation they do not prevent the menu from being created but are intended to highlight what we consider menu deficiencies these are also returned as an array within the https //api ezcater io/menu creation request warning type warning type example responses example responses description description recommended actions recommended actions image extension image extension { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "8eedb10c 8766 4241 9b66 cf471ad73534", "warnings" \[ { "message" "invalid extension for file referenced by imageurl image will not be displayed ", "details" { "imageurl" "test image xml", "entitytype" "item", "entityposid" "item 1" } }, { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "8eedb10c 8766 4241 9b66 cf471ad73534", "warnings" \[ { "message" "invalid extension for file referenced by imageurl image will not be displayed ", "details" { "imageurl" "test image xml", "entitytype" "item", "entityposid" "item 1" } }, acceptable image extensions acceptable image extensions gif gif jpg jpg jpeg jpeg png png convert images to supported formats convert images to supported formats update image urls to point to supported formats update image urls to point to supported formats verify image urls are accessible verify image urls are accessible mutually exclusive fields mutually exclusive fields { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "errors" \[], "warnings" \[ { "message" "item 'item 1' has both 'lead time' and 'day before cutoff time' defined, please provide only one ", "details" {} }, { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "errors" \[], "warnings" \[ { "message" "item 'item 1' has both 'lead time' and 'day before cutoff time' defined, please provide only one ", "details" {} }, items with both lead time and day before cutoff time will default to lead time items with both lead time and day before cutoff time will default to lead time choose appropriate timing method for your business model choose appropriate timing method for your business model remove one of the conflicting fields remove one of the conflicting fields review timing logic consistency review timing logic consistency missing utensils missing utensils { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "warnings" \[ { "message" "item does not have a utensil choice mapped", "details" { "item name" "taco bar", "item pos id" "item 2" } }, { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "warnings" \[ { "message" "item does not have a utensil choice mapped", "details" { "item name" "taco bar", "item pos id" "item 2" } }, ezcater encourages all items have a utensils option associated with it ezcater encourages all items have a utensils option associated with it add utensil options to items add utensil options to items create utensil choices with proper choice type tags create utensil choices with proper choice type tags review if utensils are required for specific items review if utensils are required for specific items zero priced item zero priced item { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "errors" \[], "warnings" \[ { "message" "item with pos id item 2 sel 1 has a price of $0 00 it will not be displayed ", "details" {} } { "data" { "menucreationrequest" { "status" "completed", "outcome" "success with warnings", "menuuuid" "0c44976c cef3 436c 96d3 91d470a8decf", "errors" \[], "warnings" \[ { "message" "item with pos id item 2 sel 1 has a price of $0 00 it will not be displayed ", "details" {} } we do not support $0 items on the marketplace, they will be created but not shown to customers we do not support $0 items on the marketplace, they will be created but not shown to customers