Find the delivery zones that serve a place
/meals/v1/zone/query/documentscatalog:readReturns a page of the delivery zones that serve a city: the best matching zone of each vendor
that delivers there. A zone can cover one city, one province or a whole country. Pass vendor to
ask about one vendor: the page then holds that vendor's zone, and an empty page means the
vendor does not deliver there.
The place is compared exactly with what the zone holds: city, state and country must
match letter for letter, and letter case counts (Toronto does not find a zone stored as
toronto), so nothing is guessed or trimmed. Each vendor answers one zone at most: the one
that fits the place best, which is a zone for the city, else a zone for the whole province, else a
zone for the whole country. A vendor with a zone for another city of the province is not found.
Needs the catalog:read scope.
Query parameters
citystringrequiredThe city to look up, exactly as the zone holds it: letter case counts.
Pattern ^[^${}]{1,200}$
statestringrequiredThe two-letter province code, in capitals, for example
ON.Pattern ^[A-Z]{2}$
countrystringrequiredThe two-letter country code, in capitals, for example
CA.Pattern ^[A-Z]{2}$
vendorstringThe ID of one vendor to look at. Without it, every vendor is looked at.
Min length 1 · Max length 200 · Pattern ^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$
pageintegerThe page number, from 1.
Minimum 1 · Default 1
sizeintegerThe page size, at most 50.
Minimum 1 · Maximum 50 · Default 10
Response 200
dataarray of ZonerequiredThe zones of the page.
Show child attributesHide child attributes
vendorstringrequiredThe ID of the vendor that delivers to the zone.
zone_citystringnullableThe city of the zone.
nullfor a zone that covers a whole province or country.zone_countrystringrequiredThe two-letter country code of the zone.
zone_currencystringrequiredThe three-letter currency code of the zone. Prices and fees in the zone are in this currency.
zone_delivery_daysarray of ZoneDeliveryDayThe weekdays the zone is delivered on, with their cut-offs and fees.
Show child attributesHide child attributes
delivery_dayWeekDayrequireddelivery_day_cutoffintegerrequiredHow many days before the delivery date ordering closes.
delivery_day_cutoff_hourintegerrequiredThe hour ordering closes, 0 to 23, in the vendor timezone.
delivery_day_cutoff_minuteintegerrequiredThe minute ordering closes, 0 to 59, in the vendor timezone.
delivery_feeintegerrequiredThe delivery fee, in cents, in the currency of the zone (
zone_currency).free_delivery_thresholdintegerrequiredThe order value, in cents, above which delivery is free, in the currency of the zone (
zone_currency).fulfillment_daysintegerrequiredHow many days the vendor needs to prepare an order.
zone_idstringrequiredThe ID of the zone.
zone_statestringnullableThe two-letter province code of the zone.
nullfor a zone that covers a whole country.
has_nextbooleanrequiredWhether the data has a next page or not
has_previousbooleanrequiredWhether the data has a previous page or not
pageintegerrequiredThe page number of the data
sizeintegerrequiredThe size of the data
totalintegerrequiredThe total number of data
total_pagesintegerrequiredThe total number of pages
Errors
Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.
{
"error": {
"code": "not_found",
"message": "The object does not exist.",
"request_id": "req_0123456789abcdef0123456789abcdef"
}
}| Status | Code | Meaning |
|---|---|---|
401 | invalid_api_key | The API key is missing or not valid. |
403 | company_archived | This company is archived. |
403 | company_not_live | The company must be live to use prod keys. |
403 | company_suspended | This company is suspended. |
403 | scope_not_granted | This API key does not have the catalog:read scope. |
422 | validation_error | query.size: Input should be less than or equal to 50 |
429 | rate_limited | Too many requests. Wait before calling again. |
500 | internal_error | Something went wrong on our side. Please try again later. |
502 | upstream_error | A Nurish'd service could not complete the request. |
503 | upstream_unavailable | A Nurish'd service is unavailable. Please try again later. |
504 | upstream_timeout | A Nurish'd service did not answer in time. Please try again. |