# Lookup Delivery Zones

Endpoint: GET /api/webhooks/delivery-zones
Version: 1.0
Security: key

## Security:

  - `key` (unknown)
    apiKey in query key

## Query parameters:

  - `q` (string)
    Search zones by ID, name, postcode, or address. Only one zone can be found by postcode and address. Example: `"2022"`

  - `merchant` (integer)
    Required to search by address. Multi-key users do not have a specific merchant, so this field is used in that case. Example: `2`

## Response 200:

  - `200` (unknown)
    200

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 1

  - `next` (string)

  - `previous` (string)

  - `results` (array)

  - `results.id` (integer)
    Example: 123

  - `results.name` (string)
    Must be unique for one merchant. If not provided, a name will be generated.
    Example: Delivery zone 11

  - `results.merchant` (integer)
    Example: 1

  - `results.post_code_templates` (object)

  - `results.post_code_templates.ranges` (array)
    List of postcode ranges.

  - `results.post_code_templates.ranges.id` (integer)
    Example: 1

  - `results.post_code_templates.ranges.value` (object)
    Object defining postcode range values.

  - `results.post_code_templates.ranges.value.lower` (integer)
    Lower bound of postcode range (0 to 9,999,999).
    Example: 1000

  - `results.post_code_templates.ranges.value.upper` (integer)
    Upper bound of postcode range (0 to 9,999,999). Cannot be equal to `lower`.
    Example: 1999

  - `results.post_code_templates.texts` (array)
    List of postcode templates in text format.

  - `results.post_code_templates.texts.id` (integer)
    Example: 1

  - `results.post_code_templates.texts.value` (string)
    Postcode template using allowed characters: digits, capital letters, spaces, `-`, `#`, and `$`.
    Example: 80-1##

## Response 400:

  - `400` (unknown)
    400

## Response 400 fields (application/json):

  - `detail` (string)
    Example: The query must be indicated along with the merchant.

  - `errors` (object)

  - `errors.merchant` (array)

## Response 200 examples:

  - `Result` (unknown)

## Response 400 examples:

  - `Result` (unknown)

