POST
/
v1
/
delivery-window
Create a single delivery window
curl --request POST \
  --url https://api.sandbox.usenash.com/v1/delivery-window \
  --header 'Content-Type: application/json' \
  --data '{
  "startTime": "2024-01-01T10:00:00Z",
  "startTimeLocal": "2024-01-01T10:00:00",
  "endTime": "2024-01-01T12:00:00Z",
  "endTimeLocal": "2024-01-01T12:00:00",
  "cutoffTime": "2024-01-01T10:00:00Z",
  "cutoffTimeLocal": "2024-01-01T10:00:00",
  "timezoneId": "America/New_York",
  "name": "Monday Delivery Window",
  "rrule": "RRULE:FREQ=WEEKLY;BYDAY=MO",
  "exceptionDates": [
    "2024-01-01",
    "2024-01-02"
  ],
  "allowedTags": [
    "service:rapid",
    "service:express",
    "franchise_location"
  ],
  "leadTimeMinutes": 60,
  "priceCents": 1000,
  "minimumOrderValueCents": 1000,
  "maximumCapacity": 1000,
  "storeLocationId": "stl_01234567890123456789",
  "zoneId": "zone_01234567890123456789",
  "zoneExternalId": "ext_01234567890123456789",
  "windowMetadata": {
    "key": "value"
  },
  "isActive": true,
  "isDeleted": false
}'
{
  "id": "dw_01234567890123456789",
  "name": "Monday Delivery Window",
  "startTime": "2024-01-01T10:00:00Z",
  "startTimeLocal": "2024-01-01T10:00:00",
  "endTime": "2024-01-01T12:00:00Z",
  "endTimeLocal": "2024-01-01T12:00:00",
  "timezoneId": "America/New_York",
  "cutoffTime": "2024-01-01T10:00:00Z",
  "cutoffTimeLocal": "2024-01-01T10:00:00",
  "rrule": "RRULE:FREQ=WEEKLY;BYDAY=MO",
  "exceptionDates": [
    "2024-01-01",
    "2024-01-02"
  ],
  "allowedTags": [
    "service:rapid",
    "service:express",
    "franchise_location"
  ],
  "leadTimeMinutes": 60,
  "priceCents": 1000,
  "minimumOrderValueCents": 1000,
  "maximumCapacity": 1000,
  "storeLocationId": "stl_01234567890123456789",
  "zoneId": "zone_01234567890123456789",
  "zoneExternalId": "ext_01234567890123456789",
  "windowMetadata": {
    "key": "value"
  },
  "isActive": true,
  "isDeleted": false
}

Body

application/json

Expected payload for creating a delivery window.

startTime
string

The start time of the delivery window.

Example:

"2024-01-01T10:00:00Z"

startTimeLocal
string

The start time of the delivery window in local timezone.

Example:

"2024-01-01T10:00:00"

endTime
string

The end time of the delivery window.

Example:

"2024-01-01T12:00:00Z"

endTimeLocal
string

The end time of the delivery window in local timezone.

Example:

"2024-01-01T12:00:00"

cutoffTime
string

The cutoff time of the delivery window.

Example:

"2024-01-01T10:00:00Z"

cutoffTimeLocal
string

The cutoff time of the delivery window in local timezone.

Example:

"2024-01-01T10:00:00"

timezoneId
string | null

The timezone id of the delivery window.

Example:

"America/New_York"

name
string | null

The name of the delivery window.

Example:

"Monday Delivery Window"

rrule
string | null

The rrule of the delivery window.

Example:

"RRULE:FREQ=WEEKLY;BYDAY=MO"

exceptionDates
string[] | null

The exception dates of the delivery window.

Example:
["2024-01-01", "2024-01-02"]
allowedTags
string[] | null

The allowed tags of the delivery window.

Example:
[
"service:rapid",
"service:express",
"franchise_location"
]
leadTimeMinutes
integer | null

The lead time of the delivery window.

Example:

60

priceCents
integer | null

The price of the delivery window.

Example:

1000

minimumOrderValueCents
integer | null

The minimum order value of the delivery window.

Example:

1000

maximumCapacity
integer | null

The maximum capacity of the delivery window.

Example:

1000

storeLocationId
string | null

The store location id of the delivery window.

Example:

"stl_01234567890123456789"

zoneId
string | null

The zone id of the delivery window.

Example:

"zone_01234567890123456789"

zoneExternalId
string | null

The external zone id of the delivery window.

Example:

"ext_01234567890123456789"

windowMetadata
object | null

The metadata of the delivery window.

Example:
{ "key": "value" }
isActive
boolean | null

Whether the delivery window is active.

Example:

true

isDeleted
boolean | null

Whether the delivery window is deleted.

Example:

false

Response

OK

Response for a delivery window.

id
string
required

The ID of the delivery window.

Example:

"dw_01234567890123456789"

name
string
required

The name of the delivery window.

Example:

"Monday Delivery Window"

startTime
string
required

The start time of the delivery window.

Example:

"2024-01-01T10:00:00Z"

startTimeLocal
string
required

The start time of the delivery window in local timezone.

Example:

"2024-01-01T10:00:00"

endTime
string
required

The end time of the delivery window.

Example:

"2024-01-01T12:00:00Z"

endTimeLocal
string
required

The end time of the delivery window in local timezone.

Example:

"2024-01-01T12:00:00"

timezoneId
string
required

The timezone id of the delivery window.

Example:

"America/New_York"

cutoffTime
string
required

The cutoff time of the delivery window.

Example:

"2024-01-01T10:00:00Z"

cutoffTimeLocal
string
required

The cutoff time of the delivery window in local timezone.

Example:

"2024-01-01T10:00:00"

rrule
string
required

The rrule of the delivery window.

Example:

"RRULE:FREQ=WEEKLY;BYDAY=MO"

exceptionDates
string[]
required

The exception dates of the delivery window.

Example:
["2024-01-01", "2024-01-02"]
allowedTags
string[]
required

The allowed tags of the delivery window.

Example:
[
"service:rapid",
"service:express",
"franchise_location"
]
leadTimeMinutes
integer
required

The lead time of the delivery window.

Example:

60

priceCents
integer
required

The price of the delivery window.

Example:

1000

minimumOrderValueCents
integer
required

The minimum order value of the delivery window.

Example:

1000

maximumCapacity
integer
required

The maximum capacity of the delivery window.

Example:

1000

storeLocationId
string
required

The store location id of the delivery window.

Example:

"stl_01234567890123456789"

zoneId
string
required

The zone id of the delivery window.

Example:

"zone_01234567890123456789"

zoneExternalId
string
required

The external zone id of the delivery window.

Example:

"ext_01234567890123456789"

windowMetadata
object
required

The metadata of the delivery window.

Example:
{ "key": "value" }
isActive
boolean
required

Whether the delivery window is active.

Example:

true

isDeleted
boolean
required

Whether the delivery window is deleted.

Example:

false