Skip to main content
GET
/
v1
/
eligible_delivery_windows
Get eligible delivery windows for order
curl --request GET \
  --url https://api.sandbox.usenash.com/v1/eligible_delivery_windows \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.usenash.com/v1/eligible_delivery_windows"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.usenash.com/v1/eligible_delivery_windows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.usenash.com/v1/eligible_delivery_windows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.usenash.com/v1/eligible_delivery_windows"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.usenash.com/v1/eligible_delivery_windows")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.usenash.com/v1/eligible_delivery_windows")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "eligibleDeliveryWindows": [
    {
      "id": "<string>",
      "ineligibleReason": "Ineligible due to order tags",
      "allowedTags": "['rapid', 'oversize']",
      "startTime": "2024-10-06T00:00:00.000000",
      "startTimeLocal": "2024-10-06T00:00:00.000000",
      "endTime": "2024-10-07T00:00:00.000000",
      "endTimeLocal": "2024-10-07T00:00:00.000000",
      "name": "S21",
      "storeLocationId": "stl_1234567890",
      "storeLocationExternalId": "1001",
      "zoneId": "zone_1234567890",
      "zoneExternalId": "1001",
      "cutoffTime": "2024-10-04T00:00:00.000000",
      "cutoffTimeLocal": "2024-10-04T00:00:00.000000",
      "remainingCapacity": 10,
      "maximumCapacity": 10,
      "minimumOrderValueCents": 1000,
      "timezoneId": "America/New_York",
      "priceCents": 1000,
      "score": 1,
      "windowMetadata": {
        "key": "value"
      }
    }
  ],
  "ineligibleDeliveryWindows": [
    {
      "id": "<string>",
      "ineligibleReason": "Ineligible due to order tags",
      "allowedTags": "['rapid', 'oversize']",
      "startTime": "2024-10-06T00:00:00.000000",
      "startTimeLocal": "2024-10-06T00:00:00.000000",
      "endTime": "2024-10-07T00:00:00.000000",
      "endTimeLocal": "2024-10-07T00:00:00.000000",
      "name": "S21",
      "storeLocationId": "stl_1234567890",
      "storeLocationExternalId": "1001",
      "zoneId": "zone_1234567890",
      "zoneExternalId": "1001",
      "cutoffTime": "2024-10-04T00:00:00.000000",
      "cutoffTimeLocal": "2024-10-04T00:00:00.000000",
      "remainingCapacity": 10,
      "maximumCapacity": 10,
      "minimumOrderValueCents": 1000,
      "timezoneId": "America/New_York",
      "priceCents": 1000,
      "score": 1,
      "windowMetadata": {
        "key": "value"
      }
    }
  ]
}
[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]

Authorizations

Authorization
string
header
required

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

Query Parameters

orderId
string | null

The order for which to return eligible delivery windows.

Example:

"ord_1234567890"

externalOrderId
string | null

The external order id for which to return eligible delivery windows.

Example:

"ext_1234567890"

startTime
string<date-time>
required

The range start for delivery windows.

Example:

"2024-10-06T00:00:00Z"

endTime
string<date-time>
required

The range end for delivery windows.

Example:

"2024-10-07T00:00:00Z"

requestedCapacity
number | null

Optionally specify the requested capacity for the delivery windows.

Example:

10

Response

OK

Response for the eligible delivery windows endpoint.

eligibleDeliveryWindows
EligibleDeliveryWindow · object[]
required
ineligibleDeliveryWindows
EligibleDeliveryWindow · object[]
required