curl --request POST \
--url https://api.sandbox.usenash.com/v1/shift \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Shift 1",
"plannedStart": "2021-01-01T00:00:00Z",
"plannedEnd": "2021-01-01T00:00:00Z",
"id": "sft_fKUFVWZQGbEfsyMwJYntE2",
"plannedBreakDuration": 30,
"shiftMetadata": {
"key": "value"
},
"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,
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": [
"<string>"
],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"status": "active",
"storeLocationId": "123",
"externalStoreLocationId": "123",
"zoneIds": [
"123"
],
"externalZoneIds": [
"123"
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/shift"
payload = {
"name": "Shift 1",
"plannedStart": "2021-01-01T00:00:00Z",
"plannedEnd": "2021-01-01T00:00:00Z",
"id": "sft_fKUFVWZQGbEfsyMwJYntE2",
"plannedBreakDuration": 30,
"shiftMetadata": { "key": "value" },
"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,
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": ["<string>"],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"status": "active",
"storeLocationId": "123",
"externalStoreLocationId": "123",
"zoneIds": ["123"],
"externalZoneIds": ["123"]
}
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({
name: 'Shift 1',
plannedStart: '2021-01-01T00:00:00Z',
plannedEnd: '2021-01-01T00:00:00Z',
id: 'sft_fKUFVWZQGbEfsyMwJYntE2',
plannedBreakDuration: 30,
shiftMetadata: {key: 'value'},
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,
maxstops: 123,
maxdistance: 123,
maxduration: 123,
speedfactor: 123,
capabilities: ['<string>'],
fixedcost: 123,
costperunitdistance: 123,
costperunittime: 123,
vehicleprofile: '<string>',
minordersperroute: 123,
parkingtime: 123
}
},
status: 'active',
storeLocationId: '123',
externalStoreLocationId: '123',
zoneIds: ['123'],
externalZoneIds: ['123']
})
};
fetch('https://api.sandbox.usenash.com/v1/shift', 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",
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([
'name' => 'Shift 1',
'plannedStart' => '2021-01-01T00:00:00Z',
'plannedEnd' => '2021-01-01T00:00:00Z',
'id' => 'sft_fKUFVWZQGbEfsyMwJYntE2',
'plannedBreakDuration' => 30,
'shiftMetadata' => [
'key' => 'value'
],
'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,
'maxstops' => 123,
'maxdistance' => 123,
'maxduration' => 123,
'speedfactor' => 123,
'capabilities' => [
'<string>'
],
'fixedcost' => 123,
'costperunitdistance' => 123,
'costperunittime' => 123,
'vehicleprofile' => '<string>',
'minordersperroute' => 123,
'parkingtime' => 123
]
],
'status' => 'active',
'storeLocationId' => '123',
'externalStoreLocationId' => '123',
'zoneIds' => [
'123'
],
'externalZoneIds' => [
'123'
]
]),
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/shift"
payload := strings.NewReader("{\n \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\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/shift")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/shift")
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 \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\n}"
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,
"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>"
}
]Create a shift
Create a courier shift with start/end times and an assigned store location.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/shift \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Shift 1",
"plannedStart": "2021-01-01T00:00:00Z",
"plannedEnd": "2021-01-01T00:00:00Z",
"id": "sft_fKUFVWZQGbEfsyMwJYntE2",
"plannedBreakDuration": 30,
"shiftMetadata": {
"key": "value"
},
"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,
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": [
"<string>"
],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"status": "active",
"storeLocationId": "123",
"externalStoreLocationId": "123",
"zoneIds": [
"123"
],
"externalZoneIds": [
"123"
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/shift"
payload = {
"name": "Shift 1",
"plannedStart": "2021-01-01T00:00:00Z",
"plannedEnd": "2021-01-01T00:00:00Z",
"id": "sft_fKUFVWZQGbEfsyMwJYntE2",
"plannedBreakDuration": 30,
"shiftMetadata": { "key": "value" },
"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,
"maxstops": 123,
"maxdistance": 123,
"maxduration": 123,
"speedfactor": 123,
"capabilities": ["<string>"],
"fixedcost": 123,
"costperunitdistance": 123,
"costperunittime": 123,
"vehicleprofile": "<string>",
"minordersperroute": 123,
"parkingtime": 123
}
},
"status": "active",
"storeLocationId": "123",
"externalStoreLocationId": "123",
"zoneIds": ["123"],
"externalZoneIds": ["123"]
}
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({
name: 'Shift 1',
plannedStart: '2021-01-01T00:00:00Z',
plannedEnd: '2021-01-01T00:00:00Z',
id: 'sft_fKUFVWZQGbEfsyMwJYntE2',
plannedBreakDuration: 30,
shiftMetadata: {key: 'value'},
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,
maxstops: 123,
maxdistance: 123,
maxduration: 123,
speedfactor: 123,
capabilities: ['<string>'],
fixedcost: 123,
costperunitdistance: 123,
costperunittime: 123,
vehicleprofile: '<string>',
minordersperroute: 123,
parkingtime: 123
}
},
status: 'active',
storeLocationId: '123',
externalStoreLocationId: '123',
zoneIds: ['123'],
externalZoneIds: ['123']
})
};
fetch('https://api.sandbox.usenash.com/v1/shift', 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",
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([
'name' => 'Shift 1',
'plannedStart' => '2021-01-01T00:00:00Z',
'plannedEnd' => '2021-01-01T00:00:00Z',
'id' => 'sft_fKUFVWZQGbEfsyMwJYntE2',
'plannedBreakDuration' => 30,
'shiftMetadata' => [
'key' => 'value'
],
'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,
'maxstops' => 123,
'maxdistance' => 123,
'maxduration' => 123,
'speedfactor' => 123,
'capabilities' => [
'<string>'
],
'fixedcost' => 123,
'costperunitdistance' => 123,
'costperunittime' => 123,
'vehicleprofile' => '<string>',
'minordersperroute' => 123,
'parkingtime' => 123
]
],
'status' => 'active',
'storeLocationId' => '123',
'externalStoreLocationId' => '123',
'zoneIds' => [
'123'
],
'externalZoneIds' => [
'123'
]
]),
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/shift"
payload := strings.NewReader("{\n \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\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/shift")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/shift")
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 \"name\": \"Shift 1\",\n \"plannedStart\": \"2021-01-01T00:00:00Z\",\n \"plannedEnd\": \"2021-01-01T00:00:00Z\",\n \"id\": \"sft_fKUFVWZQGbEfsyMwJYntE2\",\n \"plannedBreakDuration\": 30,\n \"shiftMetadata\": {\n \"key\": \"value\"\n },\n \"optimizationParams\": {\n \"serviceTimeRelativeEfficiency\": 1,\n \"plannedBreaks\": [\n {\n \"end\": 30,\n \"start\": 0\n }\n ],\n \"departureDelay\": 15,\n \"shiftEndServiceTimeMinutes\": 10,\n \"vehicleConfig\": {\n \"weight\": 123,\n \"height\": 123,\n \"length\": 123,\n \"width\": 123,\n \"axlecount\": 123,\n \"trailercount\": 123,\n \"maxstops\": 123,\n \"maxdistance\": 123,\n \"maxduration\": 123,\n \"speedfactor\": 123,\n \"capabilities\": [\n \"<string>\"\n ],\n \"fixedcost\": 123,\n \"costperunitdistance\": 123,\n \"costperunittime\": 123,\n \"vehicleprofile\": \"<string>\",\n \"minordersperroute\": 123,\n \"parkingtime\": 123\n }\n },\n \"status\": \"active\",\n \"storeLocationId\": \"123\",\n \"externalStoreLocationId\": \"123\",\n \"zoneIds\": [\n \"123\"\n ],\n \"externalZoneIds\": [\n \"123\"\n ]\n}"
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,
"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.
Body
Input for creating a shift.
The name of the shift.
"Shift 1"
The planned start timestamp of the shift.
"2021-01-01T00:00:00Z"
The planned end timestamp of the shift.
"2021-01-01T00:00:00Z"
The ID of the shift.
"sft_fKUFVWZQGbEfsyMwJYntE2"
The planned break duration of the shift.
30
The metadata of the shift.
{ "key": "value" }
The optimization parameters of the shift.
Show child attributes
Show child attributes
The status of the shift.
"active"
The store location ID of the shift.
"123"
The external store location ID of the shift.
"123"
The zone IDs of the shift.
["123"]
The external zone IDs of the shift.
["123"]
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?