Refresh Quotes by Job ID and Batch ID
curl --request POST \
--url https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/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/jobs/{jobId}/batch/{batchId}/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_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/jobs/{jobId}/batch/{batchId}/refresh_quotes"
req, _ := http.NewRequest("POST", 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.post("https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"quotes": [
{
"id": "qot_01234567890",
"providerId": "uber_standard_mini_mart",
"providerName": "Nash",
"createdTime": "2021-01-01T00:00:00Z",
"priceCents": 1000,
"type": "<string>",
"providerLogo": "https://nash.com/logo.png",
"providerIsInternal": true,
"expireTime": "2021-01-01T00:00:00Z",
"taxAmountCents": 100,
"tollFeeCents": 100,
"nashFeeCents": 100,
"insuranceFeeCents": 100,
"currency": "USD",
"pickupWindow": "2021-01-01T00:00:00Z",
"dropoffEta": "2021-01-01T00:00:00Z",
"tags": [
"tag1",
"tag2",
"autodispatch_preferred_quote"
],
"costSplitCustomerCents": 100,
"costSplitBusinessCents": 100,
"totalPriceBreakdown": {
"subtotal": 1000,
"tax": 100,
"total": 1100
},
"totalPriceCents": 1000,
"rank": 1,
"price": 1000,
"isSuccessful": true,
"errorMessage": "Error message"
}
]
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Refresh Quotes (Batch)
Refresh the quotes for a batch job.
POST
/
v1
/
jobs
/
{jobId}
/
batch
/
{batchId}
/
refresh_quotes
Refresh Quotes by Job ID and Batch ID
curl --request POST \
--url https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/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/jobs/{jobId}/batch/{batchId}/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_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/jobs/{jobId}/batch/{batchId}/refresh_quotes"
req, _ := http.NewRequest("POST", 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.post("https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/jobs/{jobId}/batch/{batchId}/refresh_quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"quotes": [
{
"id": "qot_01234567890",
"providerId": "uber_standard_mini_mart",
"providerName": "Nash",
"createdTime": "2021-01-01T00:00:00Z",
"priceCents": 1000,
"type": "<string>",
"providerLogo": "https://nash.com/logo.png",
"providerIsInternal": true,
"expireTime": "2021-01-01T00:00:00Z",
"taxAmountCents": 100,
"tollFeeCents": 100,
"nashFeeCents": 100,
"insuranceFeeCents": 100,
"currency": "USD",
"pickupWindow": "2021-01-01T00:00:00Z",
"dropoffEta": "2021-01-01T00:00:00Z",
"tags": [
"tag1",
"tag2",
"autodispatch_preferred_quote"
],
"costSplitCustomerCents": 100,
"costSplitBusinessCents": 100,
"totalPriceBreakdown": {
"subtotal": 1000,
"tax": 100,
"total": 1100
},
"totalPriceCents": 1000,
"rank": 1,
"price": 1000,
"isSuccessful": true,
"errorMessage": "Error message"
}
]
}[
{
"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.
Was this page helpful?
⌘I