curl --request GET \
--url https://api.sandbox.usenash.com/v1/shift/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/shift/{id}"
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/shift/{id}', 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/shift/{id}",
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/shift/{id}"
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/shift/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/shift/{id}")
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": "<string>",
"name": "<string>",
"plannedStart": "<string>",
"plannedEnd": "<string>",
"status": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"plannedBreakDuration": 123,
"shiftMetadata": {},
"optimizationParams": {
"serviceTimeRelativeEfficiency": 1,
"plannedBreaks": [
{
"end": 30,
"start": 0
}
],
"departureDelay": 15,
"shiftEndServiceTimeMinutes": 10,
"vehicleConfig": {
"weight": 123,
"height": 123,
"length": 123,
"width": 123,
"axlecount": 123,
"trailercount": 123,
"weightunit": "kg",
"lengthunit": "meter",
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": [
"<string>"
],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"storeLocationId": "<string>",
"externalStoreLocationId": "<string>",
"zoneIds": [
"<string>"
],
"externalZoneIds": [
"<string>"
],
"courierId": "<string>",
"vehicleId": "<string>"
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Get a shift
Retrieve a single courier shift by ID, including its times, assigned courier, and store location.
curl --request GET \
--url https://api.sandbox.usenash.com/v1/shift/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/shift/{id}"
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/shift/{id}', 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/shift/{id}",
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/shift/{id}"
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/shift/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/shift/{id}")
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": "<string>",
"name": "<string>",
"plannedStart": "<string>",
"plannedEnd": "<string>",
"status": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"plannedBreakDuration": 123,
"shiftMetadata": {},
"optimizationParams": {
"serviceTimeRelativeEfficiency": 1,
"plannedBreaks": [
{
"end": 30,
"start": 0
}
],
"departureDelay": 15,
"shiftEndServiceTimeMinutes": 10,
"vehicleConfig": {
"weight": 123,
"height": 123,
"length": 123,
"width": 123,
"axlecount": 123,
"trailercount": 123,
"weightunit": "kg",
"lengthunit": "meter",
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": [
"<string>"
],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"storeLocationId": "<string>",
"externalStoreLocationId": "<string>",
"zoneIds": [
"<string>"
],
"externalZoneIds": [
"<string>"
],
"courierId": "<string>",
"vehicleId": "<string>"
}[
{
"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.
Path Parameters
Shift ID
Response
OK
Response for shift.
The ID of the shift.
The name of the shift.
The planned start timestamp of the shift.
The planned end timestamp of the shift.
The status of the shift.
The creation timestamp of the shift.
The update timestamp of the shift.
The planned break duration of the shift.
The metadata of the shift.
The optimization parameters of the shift.
Show child attributes
Show child attributes
The store location ID of the shift.
The external store location ID of the shift.
The zone IDs of the shift.
The external zone IDs of the shift.
The courier ID of the shift.
The vehicle ID of the shift.
Was this page helpful?