Shifts
Upsert shifts
Create or update multiple courier shifts in a single request. Existing shifts are matched by ID for updates; new shifts are created.
post/v1/shifts/upsert
Request
- Base URLhttps://api.sandbox.usenash.com
- Authnone declared
Request body
Example request
{
"shifts": [
{
"id": "sft_fKUFVWZQGbEfsyMwJYntE2",
"name": "Shift 1",
"plannedStart": "2021-01-01T00:00:00Z",
"plannedEnd": "2021-01-01T00:00:00Z",
"plannedBreakDuration": 30,
"shiftMetadata": {
"key": "value"
},
"optimizationParams": {
"serviceTimeRelativeEfficiency": 1,
"plannedBreaks": [
{
"end": 30,
"start": 0
}
],
"departureDelay": 15,
"shiftEndServiceTimeMinutes": 10
},
"status": "active",
"storeLocationId": "123",
"externalStoreLocationId": "123",
"zoneIds": [
"123"
],
"externalZoneIds": [
"123"
]
}
]
}Response
OK
Example response
{
"optimizationParams": {
"serviceTimeRelativeEfficiency": 1,
"plannedBreaks": [
{
"end": 30,
"start": 0
}
],
"departureDelay": 15,
"shiftEndServiceTimeMinutes": 10
}
}Changes
No recorded changes to this operation across all 1 revision of this API.