Caterer List
Viewing Caterers
This query will return a list of all of the Caterers that your user has access to. It may be useful to include the address information so that you can know which UUID corresponds to which location.
Currently, this query does not have paging. If your user has access to many locations, you may experience a large load time when running this.
Query
query Caterers($ids: [ID!], $uuids: [ID!]) {
caterers(ids: $ids, uuids: $uuids) {
address {
city
deliveryInstructions
name
state
stateName
street
street2
street3
zip
}
live
name
storeNumber
uuid
}
}Variables
The ids and uuids arguments are only necessary to if you want to filter the results to specific caterer locations. To return all caterers remove the arguments from the query or pass NULL.
{
"ids": null,
"uuids": ["ezcater-caterer-1-id", "ezcater-caterer-2-id"]
}Arguments
Return Type
Returns a Caterer.
Successful Responses
When the caterers query succeeds you can expect the response payload to look like:
{
"data": {
"caterers": [
{
"address": {
"city": "Boston",
"deliveryInstructions": null,
"name": "",
"state": "MA",
"stateName": "Massachusetts",
"street": "12345 Restaurant Avenue",
"street2": null,
"street3": null,
"zip": "54321"
},
"live": true,
"name": "My First Caterer Name",
"storeNumber": "0001",
"uuid": "ezcater-caterer-1-id"
},
{
"address": {
"city": "Boston",
"deliveryInstructions": null,
"name": "",
"state": "MA",
"stateName": "Massachusetts",
"street": "54321 Caterer Street",
"street2": null,
"street3": null,
"zip": "12345"
},
"live": true,
"name": "My Second Caterer Name",
"storeNumber": "00002",
"uuid": "ezcater-caterer-1-id"
}
]
}
}Failure Responses
When the caterers query fails because you do not have permission to access the caterer location associated with the uuid provided you can expect the response payload to look like:
{
"data": {
"caterers": []
}
}