---
title: "Create a zone"
method: POST
path: "/v1/zones"
tags: ["Zones"]
---

# Create a zone

`POST /v1/zones`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/zones`
- Auth: none declared

Create a geographic zone defined by a polygon boundary. Zones are used to define delivery areas for store locations and apply zone-based restrictions.

## Request body

- CreateZoneInputSerializer: Expected payload for creating a zone.
  - `externalId` string, nullable: Zone unique identifier from an external system.
  - `name` string, nullable: The name of the zone.
  - `coverageAreaId` string, nullable: The coverage area id to associate with the zone.
  - `polygon` array[], nullable: The zone boundary, as a single closed ring of [latitude, longitude] coordinate pairs. The first and last point must be identical to close the ring. Setting this creates a coverage area for the zone (or replaces the polygon on its existing coverage area).
    - number[]
  - `storeLocationIds` string[], nullable: The store location ids to associate with the zone.
  - `storeLocationAssociations` object[], nullable: The store location associations to associate with the zone.
  - `tags` string[], nullable: Free form tags specific to the location.
  - `zoneMetadata` object, nullable: The metadata of the zone.

## Response `200`

OK

- ZoneResponse: Response for zone.
  - `id` string, required: The ID of the zone.
  - `name` string, nullable, required: The name of the zone.
  - `externalId` string, nullable, required: The external ID of the zone.
  - `portalUrl` string, nullable, required: The portal URL of the zone.
  - `coverageArea` object, nullable, required: The coverage area of the zone.
  - `storeLocations` StoreLocationResponse[], nullable, required: The store locations of the zone.
    - `externalId` string, nullable: Store location unique identifier from an external system.
    - `operatingHours` object, nullable: [Integration Specific]: An object with keys that correspond to days of week (monday, tuesday, etc) and their corresponding operating hours / delivery windows.
    - `prepTimeMinutes` integer, nullable: [Integration Specific]: the preparation time to apply for orders, if relying on Nash to compute the delivery windows. This only applies to specific integrations.
    - `blackoutDates` string[], nullable: The blackout dates of the store location.
    - `firstName` string, nullable: First name of the person at the store location. If unknown, pass 'Manager'. Limited to 80 characters.
    - `lastName` string, nullable: Last name of the person at the store location. If unknown, pass 'Manager'. Limited to 80 characters.
    - `email` string, nullable: The email of the person at the store location.
    - `pickupInstructions` string, nullable: The pickup instructions of the store location. Limited to 280 characters. Nash Recommended Input: Order [insert order number] for [insert customer name] from [business name]
    - `id` string, required: The ID of the store location.
    - `name` string, required: The name of the store location.
    - `phoneNumber` string, required: The phone number of the person at the store location.
    - `location` StoreLocationAddressResponse, required
      - `number` string, nullable: The number of the address.
      - `secondaryNumber` string, nullable: The secondary number of the address.
      - `street` string, required: The street of the address. If your geocoding service does not split numbers from street names, you can pass the street name with the number in this field. Example: 1600 Pennsylvania Avenue NW.
      - `county` string, nullable: The county of the address.
      - `city` string, required: The city of the address.
      - `state` string, nullable: The state of the address.
      - `postalCode` string, nullable: The postal code of the address.
      - `country` string, required: The country of the address.
      - `latitude` number, nullable: The latitude of the address.
      - `longitude` number, nullable: The longitude of the address.
      - `timezoneId` string, nullable: IANA time zone of the store location.
    - `zoneIds` string[], nullable, required: The zone ids of the store location.
    - `zoneAssociations` object[], nullable, required: The zone associations of the store location.
    - `tags` string[], nullable, required: The tags of the store location.
    - `integrationMetadata` object, nullable, required: The integration metadata of the store location.
  - `storeLocationAssociations` object[], nullable, required: The store location associations of the zone.
  - `zoneRestrictions` ZoneRestrictionResponse[], nullable, required: The zone restrictions of the zone.
    - `id` string, required: The ID of the zone restriction.
    - `externalId` string, required: The external ID of the zone restriction.
    - `name` string, required: The name of the zone restriction.
    - `isActive` boolean, required: Whether the zone restriction is active.
    - `restrictionMetadata` object, nullable, required: The metadata of the zone restriction.
  - `tags` string[], nullable, required: The tags of the zone.
  - `zoneMetadata` object, nullable, required: The metadata of the zone.
  - `isDeleted` boolean, nullable, required: Whether the zone is deleted.

## Other responses

- `422`: Unprocessable Content

---

[API](https://skmtc.dev/nash/apis/nash-api.md) - [All operations](https://skmtc.dev/nash/apis/nash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nash/apis/nash-api/revisions/e3713837c5c9?raw)
