Skip to main content
GET
/
v1
/
options_group
Get dispatch strategies
curl --request GET \
  --url https://api.sandbox.usenash.com/v1/options_group \
  --header 'Authorization: Bearer <token>'
import requests

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

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/options_group', 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/options_group",
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/options_group"

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/options_group")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

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

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
[
  {
    "id": "opn_WyMhHj",
    "label": "New York City Strategy",
    "allowedProviders": [
      "prv_01234567890",
      "prv_01234567891"
    ],
    "enableAutoDispatch": true,
    "providerSelectionStrategy": "cheapest",
    "reassignOnFailure": true,
    "enableMaxDeliveryFee": true,
    "maxDeliveryFeeCents": 10000,
    "costSplitMaxFixedPriceCents": 10000,
    "costSplitMaxPercentage": 0.1,
    "costSplitStrategy": "price",
    "smartReassignment": true
  }
]
[
{
"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.

Response

OK

id
string
required

Dispatch Strategy ID

Example:

"opn_WyMhHj"

label
string
required

Dispatch Strategy Label

Example:

"New York City Strategy"

allowedProviders
string[] | null

Allowed providers

Example:
["prv_01234567890", "prv_01234567891"]
enableAutoDispatch
boolean | null

Enable auto dispatch

Example:

true

providerSelectionStrategy
string | null

Provider selection strategy

Example:

"cheapest"

reassignOnFailure
boolean | null

Reassign on failure

Example:

true

enableMaxDeliveryFee
boolean | null

Enable max delivery fee

Example:

true

maxDeliveryFeeCents
integer | null

Max delivery fee in cents

Example:

10000

costSplitMaxFixedPriceCents
integer | null

Cost split max fixed price in cents

Example:

10000

costSplitMaxPercentage
number | null

Cost split max percentage

Example:

0.1

costSplitStrategy
string | null

Cost split strategy

Example:

"price"

smartReassignment
boolean | null

Smart reassignment

Example:

true