Skip to main content
POST
/
v1
/
zones
Create a zone
curl --request POST \
  --url https://api.sandbox.usenash.com/v1/zones \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "externalId": "<string>",
  "name": "Zone 1",
  "coverageAreaId": "<string>",
  "storeLocationIds": [
    "stl_01234567890123456789",
    "stl_01234567890123456789"
  ],
  "storeLocationAssociations": [
    {
      "end_date": "2025-01-01",
      "start_date": "2024-01-01",
      "store_location_id": "stl_01234567890123456789"
    }
  ],
  "tags": "['service:rapid', 'service:express', 'franchise_location']",
  "zoneMetadata": {
    "key": "value"
  }
}
EOF
{
  "id": "zone_01234567890123456789",
  "name": "Zone 1",
  "externalId": "ext_01234567890123456789",
  "portalUrl": "https://portal.usenash.com/settings/zones/zone_01234567890123456789",
  "coverageArea": {
    "cities": [
      "San Francisco"
    ],
    "cityZipcodes": [],
    "countries": [],
    "id": "coa_01234567890123456789",
    "states": [],
    "zipCodes": [
      "94114"
    ]
  },
  "storeLocations": [
    {
      "blackoutDates": [],
      "email": "",
      "externalId": "ext_01234567890123456789",
      "firstName": "Steve",
      "id": "stl_01234567890123456789",
      "lastName": "Kerr",
      "location": {
        "address": "120 E 34th St, New York, NY 10016, USA",
        "addressCity": "New York",
        "addressCountry": "US",
        "addressFirstLine": "120 E 34th St",
        "addressSecondarynumber": null,
        "addressState": "NY",
        "addressZip": "10016",
        "lat": 40.7463656,
        "lng": -73.9803215
      },
      "name": "10392",
      "operatingHours": {
        "friday": {
          "active": true,
          "shifts": []
        },
        "monday": {
          "active": true,
          "shifts": []
        },
        "saturday": {
          "active": true,
          "shifts": []
        },
        "sunday": {
          "active": true,
          "shifts": []
        },
        "thursday": {
          "active": true,
          "shifts": []
        },
        "tuesday": {
          "active": true,
          "shifts": []
        },
        "wednesday": {
          "active": true,
          "shifts": []
        }
      },
      "phoneNumber": "+16132525710",
      "pickupInstructions": "",
      "prepTimeMinutes": null,
      "tags": []
    }
  ],
  "storeLocationAssociations": [
    {
      "endDate": "2025-01-01",
      "startDate": "2024-01-01",
      "storeLocationId": "stl_01234567890123456789"
    }
  ],
  "zoneRestrictions": [
    {
      "id": "res_01234567890123456789",
      "name": "Zone Restriction 1"
    }
  ],
  "tags": [
    "service:rapid",
    "franchise_location"
  ],
  "zoneMetadata": {
    "key": "value"
  },
  "isDeleted": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Expected payload for creating a zone.

externalId
string | null

Zone unique identifier from an external system.

name
string | null

The name of the zone.

Example:

"Zone 1"

coverageAreaId
string | null

The coverage area id to associate with the zone.

storeLocationIds
string[] | null

The store location ids to associate with the zone.

Example:
[
  "stl_01234567890123456789",
  "stl_01234567890123456789"
]
storeLocationAssociations
Storelocationassociations · object[] | null

The store location associations to associate with the zone.

Example:
[
  {
    "end_date": "2025-01-01",
    "start_date": "2024-01-01",
    "store_location_id": "stl_01234567890123456789"
  }
]
tags
string[] | null

Free form tags specific to the location.

Example:

"['service:rapid', 'service:express', 'franchise_location']"

zoneMetadata
Zonemetadata · object

The metadata of the zone.

Example:
{ "key": "value" }

Response

OK

Response for zone.

id
string
required

The ID of the zone.

Example:

"zone_01234567890123456789"

name
string | null
required

The name of the zone.

Example:

"Zone 1"

externalId
string | null
required

The external ID of the zone.

Example:

"ext_01234567890123456789"

portalUrl
string | null
required

The portal URL of the zone.

Example:

"https://portal.usenash.com/settings/zones/zone_01234567890123456789"

coverageArea
Coveragearea · object
required

The coverage area of the zone.

Example:
{
  "cities": ["San Francisco"],
  "cityZipcodes": [],
  "countries": [],
  "id": "coa_01234567890123456789",
  "states": [],
  "zipCodes": ["94114"]
}
storeLocations
StoreLocationResponse · object[] | null
required

The store locations of the zone.

Example:
[
  {
    "blackoutDates": [],
    "email": "",
    "externalId": "ext_01234567890123456789",
    "firstName": "Steve",
    "id": "stl_01234567890123456789",
    "lastName": "Kerr",
    "location": {
      "address": "120 E 34th St, New York, NY 10016, USA",
      "addressCity": "New York",
      "addressCountry": "US",
      "addressFirstLine": "120 E 34th St",
      "addressSecondarynumber": null,
      "addressState": "NY",
      "addressZip": "10016",
      "lat": 40.7463656,
      "lng": -73.9803215
    },
    "name": "10392",
    "operatingHours": {
      "friday": { "active": true, "shifts": [] },
      "monday": { "active": true, "shifts": [] },
      "saturday": { "active": true, "shifts": [] },
      "sunday": { "active": true, "shifts": [] },
      "thursday": { "active": true, "shifts": [] },
      "tuesday": { "active": true, "shifts": [] },
      "wednesday": { "active": true, "shifts": [] }
    },
    "phoneNumber": "+16132525710",
    "pickupInstructions": "",
    "prepTimeMinutes": null,
    "tags": []
  }
]
storeLocationAssociations
Storelocationassociations · object[] | null
required

The store location associations of the zone.

Example:
[
  {
    "endDate": "2025-01-01",
    "startDate": "2024-01-01",
    "storeLocationId": "stl_01234567890123456789"
  }
]
zoneRestrictions
ZoneRestrictionResponse · object[] | null
required

The zone restrictions of the zone.

Example:
[
  {
    "id": "res_01234567890123456789",
    "name": "Zone Restriction 1"
  }
]
tags
string[] | null
required

The tags of the zone.

Example:
["service:rapid", "franchise_location"]
zoneMetadata
Zonemetadata · object
required

The metadata of the zone.

Example:
{ "key": "value" }
isDeleted
boolean | null
required

Whether the zone is deleted.

Example:

false