Developers

Search the docs

Search guides and headings.

Find the delivery zones that serve a place

GET/meals/v1/zone/query/documents
Scope: catalog:read

Returns 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

  • citystringrequired

    The city to look up, exactly as the zone holds it: letter case counts.

    Pattern ^[^${}]{1,200}$

  • statestringrequired

    The two-letter province code, in capitals, for example ON.

    Pattern ^[A-Z]{2}$

  • countrystringrequired

    The two-letter country code, in capitals, for example CA.

    Pattern ^[A-Z]{2}$

  • vendorstring

    The 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}$

  • pageinteger

    The page number, from 1.

    Minimum 1 · Default 1

  • sizeinteger

    The page size, at most 50.

    Minimum 1 · Maximum 50 · Default 10

Response 200

  • dataarray of Zonerequired

    The zones of the page.

    Show child attributesHide child attributes
    • vendorstringrequired

      The ID of the vendor that delivers to the zone.

    • zone_citystringnullable

      The city of the zone. null for a zone that covers a whole province or country.

    • zone_countrystringrequired

      The two-letter country code of the zone.

    • zone_currencystringrequired

      The three-letter currency code of the zone. Prices and fees in the zone are in this currency.

    • zone_delivery_daysarray of ZoneDeliveryDay

      The weekdays the zone is delivered on, with their cut-offs and fees.

      Show child attributesHide child attributes
      • delivery_dayWeekDayrequired
      • delivery_day_cutoffintegerrequired

        How many days before the delivery date ordering closes.

      • delivery_day_cutoff_hourintegerrequired

        The hour ordering closes, 0 to 23, in the vendor timezone.

      • delivery_day_cutoff_minuteintegerrequired

        The minute ordering closes, 0 to 59, in the vendor timezone.

      • delivery_feeintegerrequired

        The delivery fee, in cents, in the currency of the zone (zone_currency).

      • free_delivery_thresholdintegerrequired

        The order value, in cents, above which delivery is free, in the currency of the zone (zone_currency).

      • fulfillment_daysintegerrequired

        How many days the vendor needs to prepare an order.

    • zone_idstringrequired

      The ID of the zone.

    • zone_statestringnullable

      The two-letter province code of the zone. null for a zone that covers a whole country.

  • has_nextbooleanrequired

    Whether the data has a next page or not

  • has_previousbooleanrequired

    Whether the data has a previous page or not

  • pageintegerrequired

    The page number of the data

  • sizeintegerrequired

    The size of the data

  • totalintegerrequired

    The total number of data

  • total_pagesintegerrequired

    The 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.

jsonError response
{
  "error": {
    "code": "not_found",
    "message": "The object does not exist.",
    "request_id": "req_0123456789abcdef0123456789abcdef"
  }
}
StatusCodeMeaning
401invalid_api_keyThe API key is missing or not valid.
403company_archivedThis company is archived.
403company_not_liveThe company must be live to use prod keys.
403company_suspendedThis company is suspended.
403scope_not_grantedThis API key does not have the catalog:read scope.
422validation_errorquery.size: Input should be less than or equal to 50
429rate_limitedToo many requests. Wait before calling again.
500internal_errorSomething went wrong on our side. Please try again later.
502upstream_errorA Nurish'd service could not complete the request.
503upstream_unavailableA Nurish'd service is unavailable. Please try again later.
504upstream_timeoutA Nurish'd service did not answer in time. Please try again.

All error codes and what to do about them