Zones

Upsert multiple zones

Create or update multiple zones in a single request. Existing zones are matched by ID or external identifier for updates.

post/v1/zones/upsert

Request

  • Base URL
    https://api.sandbox.usenash.com
  • Auth
    none declared

Request body

Example request

{
  "zones": [
    {
      "name": "Zone 1",
      "polygon": [
        [
          37.7749,
          -122.4194
        ],
        [
          37.8049,
          -122.4194
        ],
        [
          37.8049,
          -122.3894
        ],
        [
          37.7749,
          -122.3894
        ],
        [
          37.7749,
          -122.4194
        ]
      ],
      "storeLocationAssociations": [
        {
          "end_date": "2025-01-01",
          "start_date": "2024-01-01",
          "store_location_id": "stl_01234567890123456789"
        }
      ],
      "zoneMetadata": {
        "key": "value"
      },
      "externalId": "zone_01234567890123456789",
      "cityZipcodes": [
        "Melbourne_3000",
        "Sydney_2000"
      ]
    }
  ]
}

Response

OK

Example response

{
  "zones": [
    {
      "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"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.