v1

latestOpenAPI 3.1.02026-07-2296226496.3 KB
Zones

Create a zone

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

post/v1/zones

Request body

externalIdstring nullable

Zone unique identifier from an external system.

namestring nullable

The name of the zone.

coverageAreaIdstring nullable

The coverage area id to associate with the zone.

storeLocationIdsstring[] nullable

The store location ids to associate with the zone.

storeLocationAssociationsobject[] nullable

The store location associations to associate with the zone.

tagsstring[] nullable

Free form tags specific to the location.

zoneMetadataobject nullable

The metadata of the zone.

Example request

{
  "name": "Zone 1",
  "polygon": [
    [
      37.7749,
      -122.4194
    ],
    [
      37.8049,
      -122.4194
    ],
    [
      37.8049,
      -122.3894
    ],
    [
      37.7749,
      -122.3894
    ],
    [
      37.7749,
      -122.4194
    ]
  ],
  "storeLocationIds": [
    "stl_01234567890123456789",
    "stl_01234567890123456789"
  ],
  "storeLocationAssociations": [
    {
      "end_date": "2025-01-01",
      "start_date": "2024-01-01",
      "store_location_id": "stl_01234567890123456789"
    }
  ],
  "zoneMetadata": {
    "key": "value"
  }
}

Response

OK

idstring required

The ID of the zone.

namestring nullable required

The name of the zone.

externalIdstring nullable required

The external ID of the zone.

portalUrlstring nullable required

The portal URL of the zone.

coverageAreaobject nullable required

The coverage area of the zone.

storeLocationAssociationsobject[] nullable required

The store location associations of the zone.

tagsstring[] nullable required

The tags of the zone.

zoneMetadataobject nullable required

The metadata of the zone.

isDeletedboolean nullable required

Whether the zone is deleted.

Example response

{
  "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"
  }
}