Refresh order quotes
curl --request POST \
--url https://api.sandbox.usenash.com/v1/order/refresh_quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "ord_1234567890",
"externalOrderId": "ext_1234567890"
}
'import requests
url = "https://api.sandbox.usenash.com/v1/order/refresh_quotes"
payload = {
"orderId": "ord_1234567890",
"externalOrderId": "ext_1234567890"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderId: 'ord_1234567890', externalOrderId: 'ext_1234567890'})
};
fetch('https://api.sandbox.usenash.com/v1/order/refresh_quotes', 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/order/refresh_quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => 'ord_1234567890',
'externalOrderId' => 'ext_1234567890'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/order/refresh_quotes"
payload := strings.NewReader("{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/order/refresh_quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/order/refresh_quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"quotes": [
{
"costSplitBusinessCents": null,
"costSplitCustomerCents": null,
"createdTime": "2024-09-03T20:43:45.899094",
"currency": "USD",
"dropoffEta": "2024-09-03T22:20:47.569000",
"expireTime": "2024-09-03T21:43:45.899102",
"id": "qot_2oWASjGxMtucwGgu6A7BYC",
"insuranceFeeCents": 0,
"nashFeeCents": 300,
"pickupWindow": null,
"priceCents": 100,
"providerId": "dispatch_partner",
"providerIsInternal": false,
"providerLogo": "https://nash-provider-logos.s3.amazonaws.com/dispatchit-logo.jpg",
"providerName": "Dispatch",
"tags": null,
"taxAmountCents": null,
"tollFeeCents": 0,
"totalPriceBreakdown": {
"priceCents": 100
},
"totalPriceCents": 100,
"type": "LOCAL"
}
]
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Refresh order quotes
Request fresh price quotes from delivery providers for an existing order. Replaces any existing quotes with updated pricing from available providers.
POST
/
v1
/
order
/
refresh_quotes
Refresh order quotes
curl --request POST \
--url https://api.sandbox.usenash.com/v1/order/refresh_quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "ord_1234567890",
"externalOrderId": "ext_1234567890"
}
'import requests
url = "https://api.sandbox.usenash.com/v1/order/refresh_quotes"
payload = {
"orderId": "ord_1234567890",
"externalOrderId": "ext_1234567890"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderId: 'ord_1234567890', externalOrderId: 'ext_1234567890'})
};
fetch('https://api.sandbox.usenash.com/v1/order/refresh_quotes', 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/order/refresh_quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => 'ord_1234567890',
'externalOrderId' => 'ext_1234567890'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/order/refresh_quotes"
payload := strings.NewReader("{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/order/refresh_quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/order/refresh_quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": \"ord_1234567890\",\n \"externalOrderId\": \"ext_1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"quotes": [
{
"costSplitBusinessCents": null,
"costSplitCustomerCents": null,
"createdTime": "2024-09-03T20:43:45.899094",
"currency": "USD",
"dropoffEta": "2024-09-03T22:20:47.569000",
"expireTime": "2024-09-03T21:43:45.899102",
"id": "qot_2oWASjGxMtucwGgu6A7BYC",
"insuranceFeeCents": 0,
"nashFeeCents": 300,
"pickupWindow": null,
"priceCents": 100,
"providerId": "dispatch_partner",
"providerIsInternal": false,
"providerLogo": "https://nash-provider-logos.s3.amazonaws.com/dispatchit-logo.jpg",
"providerName": "Dispatch",
"tags": null,
"taxAmountCents": null,
"tollFeeCents": 0,
"totalPriceBreakdown": {
"priceCents": 100
},
"totalPriceCents": 100,
"type": "LOCAL"
}
]
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
OK
The quotes of the order
Show child attributes
Show child attributes
Example:
[
{
"costSplitBusinessCents": null,
"costSplitCustomerCents": null,
"createdTime": "2024-09-03T20:43:45.899094",
"currency": "USD",
"dropoffEta": "2024-09-03T22:20:47.569000",
"expireTime": "2024-09-03T21:43:45.899102",
"id": "qot_2oWASjGxMtucwGgu6A7BYC",
"insuranceFeeCents": 0,
"nashFeeCents": 300,
"pickupWindow": null,
"priceCents": 100,
"providerId": "dispatch_partner",
"providerIsInternal": false,
"providerLogo": "https://nash-provider-logos.s3.amazonaws.com/dispatchit-logo.jpg",
"providerName": "Dispatch",
"tags": null,
"taxAmountCents": null,
"tollFeeCents": 0,
"totalPriceBreakdown": { "priceCents": 100 },
"totalPriceCents": 100,
"type": "LOCAL"
}
]
Was this page helpful?
⌘I