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 \<font color="#0c121d">error type\</font> \<font color="#0c121d">example responses\</font> \<font color="#0c121d">description\</font> \<font color="#0c121d">recommended actions\</font> \<font color="#0c121d">required fields\</font> \<font color="#0c121d">{"errors" \[ field \\"locationid\\" of required type \\"uuid!\\" was not provided ", ]}\</font> \<font color="#0c121d"> \</font> \<font color="#0c121d">{"errors" \[ message" "variable $menu of type menuinput! was provided invalid value for locationid (\\"\\" is not a valid uuid)", ]}\</font> \<font color="#0c121d">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)\</font> \<font color="#0c121d">ensure all required fields are provided\</font> \<font color="#0c121d">verify uuid format for location id\</font> \<font color="#0c121d">use proper date format for start date\</font> \<font color="#0c121d">collection length\</font> \<font color="#0c121d">{"errors" \[ "message" "items is too short (minimum is 1)", ]}\</font> \<font color="#0c121d"> \</font> \<font color="#0c121d">{"errors" \[ "message" "selections is too short (minimum is 1)", ]}\</font> \<font color="#0c121d">• categories and items arrays must have at least 1 element • item selections must have 1 5 elements • choice selections must have 1 5 elements\</font> \<font color="#0c121d">provide at least one category and one item\</font> \<font color="#0c121d">ensure each item has 1 5 selections\</font> \<font color="#0c121d">ensure each choice has 1 5 selections\</font> \<font color="#0c121d">item type tag\</font> \<font color="#0c121d">{"errors" \[ "message" "the 'individuallypackagedrelishside' tag is only valid for choices, not for items", ]}\</font> \<font color="#0c121d">specific business rule validation this tag can only be applied to choices \</font> \<font color="#0c121d">remove 'individuallypackagedrelishside' from item item type tags\</font> \<font color="#0c121d">apply this tag to appropriate choices instead\</font> runtime errors these errors are aggregated throughout the course of the menu creation, and are returned when the api user queries the status of a menu creation https //api ezcater io/menu creation request if any of these errors are returned, the menu is not created \<font color="#0c121d">error type\</font> \<font color="#0c121d">example responses\</font> \<font color="#0c121d">description\</font> \<font color="#0c121d">recommended actions\</font> \<font color="#0c121d">duplicate property\</font> \<font color="#0c121d">{ "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" } } \</font> \<font color="#0c121d">applies to categories, items, options, choices\</font> \<font color="#0c121d">pos id must be unique within each collection\</font> \<font color="#0c121d">ensure each pos id is unique within categories, items, options, choices\</font> \<font color="#0c121d">use consistent id naming scheme (e g , cat001, cat002 for categories)\</font> \<font color="#0c121d">validate uniqueness before submission\</font> \<font color="#0c121d">reference validation\</font> \<font color="#0c121d">{ "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" } } \</font> \<font color="#0c121d">• 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)\</font> \<font color="#0c121d">verify all referenced pos id values exist in their collections\</font> \<font color="#0c121d">selection size\</font> \<font color="#0c121d">{ "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" } } ] \</font> \<font color="#0c121d">items cannot have multiple selections with the same size name\</font> \<font color="#0c121d">use distinct size names for item selections\</font> \<font color="#0c121d">consider using size codes instead of names if needed\</font> \<font color="#0c121d">choice selection logic\</font> \<font color="#0c121d">"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 } } ],\</font> \<font color="#0c121d">for an option group\</font> \<font color="#0c121d">the maximum number of choices must be greater than or equal to the required minimum\</font> \<font color="#0c121d">a minimum choices requirement must be less than or equal to the total number of choices available\</font> \<font color="#0c121d">ensure max choice selections \>= min choice selections\</font> \<font color="#0c121d">set min choice selections = 0 if selections are optional\</font> \<font color="#0c121d">reduce min choice selections to match available choices\</font> \<font color="#0c121d">add more choices to the option\</font> \<font color="#0c121d">review option design for usability\</font> \<font color="#0c121d">item choice selection mismatch\</font> \<font color="#0c121d">{ "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" } } ],\</font> \<font color="#0c121d">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\</font> \<font color="#0c121d">standardize selection structures across items and choices\</font> \<font color="#0c121d">use single selection choices when possible\</font> \<font color="#0c121d">zero priced items\</font> \<font color="#0c121d">{ "data" { "menucreationrequest" { "status" "completed", "outcome" "failure", "menuuuid" null, "errors" \[ { "message" "too many zero priced items", "details" { "threshold" 100, "zero price percentage" 100 } } ],\</font> \<font color="#0c121d">this error is returned when no menu items have a price\</font> \<font color="#0c121d">review pricing strategy\</font> \<font color="#0c121d">ensure at least some items have prices \> 0\</font> \<font color="#0c121d">consider if zero priced items are intentional\</font> \<font color="#0c121d">meal program channel\</font> \<font color="#0c121d">{ "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" } } ],\</font> \<font color="#0c121d">if an item services the “meal program” channel \</font> \<font color="#0c121d">it must be available to the customer in quantities of 1\</font> \<font color="#0c121d">all selection sizes within the item must serve 1\</font> \<font color="#0c121d">it cannot have a choice with sub quantities enabled\</font> \<font color="#0c121d">set quantity options "\>1" for meal program items\</font> \<font color="#0c121d">review channel specific requirements\</font> \<font color="#0c121d">set serves 1 for all selections on meal program items\</font> \<font color="#0c121d">review serving size logic\</font> \<font color="#0c121d">remove enable sub quantities from choices on meal program items\</font> \<font color="#0c121d">review choice configuration for meal program compatibility\</font> \<font color="#0c121d">utensils\</font> \<font color="#0c121d">{ "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" } } ],\</font> \<font color="#0c121d">an option group cannot mix utensil and non utensil choices\</font> \<font color="#0c121d">a utensil option group cannot have required choices, utensils should always be optional\</font> \<font color="#0c121d">separate utensil choices into dedicated options\</font> \<font color="#0c121d">review utensil choice categorization\</font> \<font color="#0c121d">use choice type tags properly\</font> \<font color="#0c121d"> set min choice selections 0 for utensil options\</font> \<font color="#0c121d">make utensil selection customer optio\</font> 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 status of a menu creation https //api ezcater io/menu creation request \<font color="#0c121d">warning type\</font> \<font color="#0c121d">example responses\</font> \<font color="#0c121d">description\</font> \<font color="#0c121d">recommended actions\</font> \<font color="#0c121d">image extension\</font> \<font color="#0c121d">{ "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" } },\</font> \<font color="#0c121d">acceptable image extensions\</font> \<font color="#0c121d">gif\</font> \<font color="#0c121d">jpg\</font> \<font color="#0c121d">jpeg\</font> \<font color="#0c121d">png\</font> \<font color="#0c121d">convert images to supported formats\</font> \<font color="#0c121d">update image urls to point to supported formats\</font> \<font color="#0c121d">verify image urls are accessible\</font> \<font color="#0c121d">mutually exclusive fields\</font> \<font color="#0c121d">{ "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" {} },\</font> \<font color="#0c121d">items with both lead time and day before cutoff time will default to lead time\</font> \<font color="#0c121d">choose appropriate timing method for your business model\</font> \<font color="#0c121d">remove one of the conflicting fields\</font> \<font color="#0c121d">review timing logic consistency\</font> \<font color="#0c121d">missing utensils\</font> \<font color="#0c121d">{ "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" } },\</font> \<font color="#0c121d">ezcater encourages all items have a utensils option associated with it \</font> \<font color="#0c121d">add utensil options to items\</font> \<font color="#0c121d">create utensil choices with proper choice type tags\</font> \<font color="#0c121d">review if utensils are required for specific items\</font> \<font color="#0c121d">zero priced item\</font> \<font color="#0c121d">{ "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" {} }\</font> \<font color="#0c121d">we do not support $0 items on the marketplace, they will be created but not shown to customers\</font>