Download OpenAPI specification:Download
HomeStretch API
This method allows to get a bearer token for subsequent access to private API methods.
Token request options:
The received token will have an infinite TTL. Contact our support to get the client_id and client_secret. Specify the name of your company.
Obtaining a JWT token by id and client's secret key
client_id required | string Client ID |
client_secret required | string Client's secret key |
{- "client_id": "705b36a9-c095-496b-aa4a-20bc31ba1991",
- "client_secret": "recall$shrewd9Cobalt!Style"
}
{- "requestId": "705b36a9-c095-496b-aa4a-20bc31ba1991",
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "string",
- "canSeeEachOther": false,
- "accountIds": [
- "ChIJ9w44P7s0K4gRzfPYR32rXME"
], - "branches": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "string",
- "accountIds": [
- "ChIJ9w44P7s0K4gRzfPYR32rXME"
], - "canSeeEachOther": false,
- "branches": [
- null
]
}
]
}
Method for changing company structure
accountIds | Array of strings (accountIds) [ items [ 1 .. 48 ] characters ] |
Array of objects (branches) |
{- "accountIds": [
- "dqwbnyYRf6VqwdpoQZOQwef",
- "wegbnyYRfroigjwQZOopge"
], - "branches": [
- {
- "id": "RXLgFjcpDkE9XSs3wXp5",
- "name": "Head",
- "canSeeEachOther": false,
- "branches": [
- {
- "id": "RXLgFjcpOIj9XSs3wXp5",
- "name": "Sub 1",
- "isDefault": true,
- "accountIds": [
- "dqwbnyYRf6VqwdpoQZOQwef",
- "wegbnyYRfroigjwQZOopge"
], - "branches": [
- {
- "id": "WdfeFjcpDkE9XSs3wXp5",
- "name": "Sub sub 1",
- "canSeeEachOther": true,
- "accountIds": [
- "CWeoiOWCIjwoWIEFOW",
- "WFIJWEOfJWEOifWEFIUL"
]
}
]
}, - {
- "id": "PlfeFjcpDkE9XSs3wXp5",
- "name": "Sub 2",
- "accountIds": [
- "DWUQiuqhwdiqufhIHlIWUefh",
- "WfunewkjnwiwUNWLCeiwbelf"
]
}
]
}
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "string",
- "canSeeEachOther": false,
- "accountIds": [
- "ChIJ9w44P7s0K4gRzfPYR32rXME"
], - "branches": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "string",
- "accountIds": [
- "ChIJ9w44P7s0K4gRzfPYR32rXME"
], - "canSeeEachOther": false,
- "branches": [
- null
]
}
]
}
Get a list of places
sort | string Value: "title" |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
- "title": "Important place",
- "tags": [
- "Important place"
], - "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create a place
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
title required | string Place name |
contractorId | string Contractor identifier which this place belongs to |
comment | string Comment or additional information to the place |
required | object Location, geographical position |
tags | Array of strings Tags (for example, to indicate the type of business) |
{- "id": "EGpTdIRP5cuLuzMMDY6O",
- "title": "Important place",
- "tags": [
- "Important place"
], - "contractorId": "cLaEEcGpI16RbkLAutLB",
- "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
- "title": "Important place",
- "tags": [
- "Important place"
], - "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Update a place
title | string Place name |
contractorId | string Contractor identifier which this place belongs to |
comment | string Comment or additional information to the place |
tags | Array of strings Tags (for example, to indicate the type of business) |
object Location, geographical position |
{- "title": "Important place",
- "tags": [
- "Important place"
], - "contractorId": "cLaEEcGpI16RbkLAutLB",
- "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
- "title": "Important place",
- "tags": [
- "Important place"
], - "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Get a place
id | string Example: 9EQbnyYRf6VVwwQZOQAA Place ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
- "title": "Important place",
- "tags": [
- "Important place"
], - "comment": "Reception number: 02",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Get a trip
id | string Example: 9EQbnyYRf6VVwwQZOQAA Trip ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Go to the market for buckwheat",
- "status": "pending",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "transportId": "8KNjsbHAq0HSccUHJNCG",
- "way": {
- "optimize": false
}, - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}
], - "plannedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Update a trip
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
title | string Trip name |
executorId | string ID of the account that performs the trip (driver/executor) |
transportId | string Transport identifier on which the trip is performed |
object | |
plannedAt | string The date on which the trip is planned in RFC 3339, section 5.6 format |
Array of objects or objects or objects or objects [ 2 .. 24 ] items |
{- "id": "dOSD8m0XMj0Y9XlyBkD2",
- "title": "Go to the market for buckwheat",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "way": {
- "optimize": true
}, - "tripPoints": [
- {
- "id": "RXLgFjcpDkE9XSs3wXp5",
- "title": "Beautiful place",
- "stayTime": 1800,
- "comment": "Madmen inside",
- "demandIds": [
- "f934pf934fp9h",
- "woiefjp4938"
], - "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "smsNotification": {
- "minutesToArrival": 15,
- "text": "Petr will arrive in 15 minutes",
- "contact": "+79990000000"
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "functions": {
- "id": "dOSD8m0XMj0Y9XlyBkD2"
}
}
], - "plannedAt": "2020-02-15T07:00:00.000Z"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Go to the market for buckwheat",
- "status": "pending",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "transportId": "8KNjsbHAq0HSccUHJNCG",
- "way": {
- "optimize": false
}, - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}
], - "plannedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Get a list of coordinates of the passed path
id | string Example: 9EQbnyYRf6VVwwQZOQAA Trip ID |
{- "passedWay": [
- {
- "lat": 104.423452,
- "lng": 52.343952,
- "timestamp": 1730082010
}
]
}
Get a list of trips
sort | string Enum: "title" "plannedAt" |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Go to the market for buckwheat",
- "status": "pending",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "transportId": "8KNjsbHAq0HSccUHJNCG",
- "way": {
- "optimize": false
}, - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}
], - "plannedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create a trip
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
title | string Trip name |
executorId required | string ID of the account that performs the trip (driver/executor) |
transportId | string Transport identifier on which the trip is performed |
object | |
plannedAt | string The date on which the trip is planned in RFC 3339, section 5.6 format |
required | Array of objects or objects or objects or objects [ 2 .. 24 ] items |
object Параметры поездки |
{- "id": "dOSD8m0XMj0Y9XlyBkD2",
- "title": "Go to the market for buckwheat",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "way": {
- "optimize": true
}, - "tripPoints": [
- {
- "id": "RXLgFjcpDkE9XSs3wXp5",
- "title": "Beautiful place",
- "stayTime": 1800,
- "comment": "Madmen inside",
- "demandIds": [
- "f934pf934fp9h",
- "woiefjp4938"
], - "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "smsNotification": {
- "minutesToArrival": 15,
- "text": "Petr will arrive in 15 minutes",
- "contact": "+79990000000"
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "functions": {
- "id": "dOSD8m0XMj0Y9XlyBkD2"
}
}
], - "plannedAt": "2020-02-15T07:00:00.000Z"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Go to the market for buckwheat",
- "status": "pending",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "transportId": "8KNjsbHAq0HSccUHJNCG",
- "way": {
- "optimize": false
}, - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Beautiful place",
- "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "demandId": "9EQbnyYRf6VVwwQZOQAA",
- "status": "planned",
- "demandIds": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "type": "scheduled",
- "stayTime": 1800,
- "maxStayTime": 1800,
- "plannedWorkTime": 1800,
- "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "smsNotification": {
- "minutesToArrival": 5,
- "text": "Courier will arrive in 5 minutes",
- "contact": "+79990000000"
}, - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "workingHours": [
- {
- "from": "14:00",
- "to": "16:00"
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "arrivalPlanAt": "2018-04-03T02:17:14.756Z"
}
], - "plannedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Получение изменений в поездках
tripIds | Array of arrays Массив идентификаторов сущности Trips |
timeFrom required | string Время, начиная с которого возвращаются изменения |
{- "timeFrom": [
- "2020-02-15T09:00:00.000Z"
]
}
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "accountId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "tripId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "pointId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "pointChange",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "data": {
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "placeLink": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA"
}, - "title": "Beautiful place",
- "type": "scheduled",
- "comment": "There are wonderful people inside",
- "stayTime": "There are wonderful people inside",
- "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "Pass the envelope",
- "selected": true
}
]
}
}, - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "attachFiles": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "tripPointId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "attachType": null,
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}, - "radius": {
- "checkin": 0,
- "checkout": 0
}, - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "status": "planned",
- "orders": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "number": "string",
- "demand": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- { }
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": null,
- "address": null
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
}
], - "checkin": [
- {
- "inDate": "2018-04-03T02:17:14.756Z",
- "outDate": "2018-04-03T02:19:14.756Z",
- "type": "auto",
- "batteryInfo": {
- "level": 0.97,
- "state": "charging",
- "savePowerModeEnabled": false
}
}
], - "waypointCheckin": [
- {
- "inDate": "2018-04-03T02:17:14.756Z",
- "outDate": "2018-04-03T02:20:43.020Z"
}
], - "arrivalPlanAt": "2020-02-15T09:00:00.000Z",
- "timeInPoint": 3600,
- "workTimeExceeded": 300,
- "deliveryWindowsExceeded": 1800
}
}
], - "timestamp": "2018-04-03T02:17:14.756Z"
}
Get a list of accounts
sort | string Enum: "email" "firstName" "lastName" "jobTitle" "phone" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contactPhones": [
- "+79990000001",
- "+79990000002"
], - "contacts": [
- {
- "note": "6337",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Special"
], - "transportRestrictions": [
- "Ref"
], - "defaultShift": {
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}, - "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create an account
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
firstName required | string First name |
lastName required | string Last name |
email required | string |
phone | string Phone number |
jobTitle required | string Job Description |
contactPhones | Array of strings [ 0, .. 2, ] items unique Deprecated Поле устарело, оно будет автоматически преобразовано в contacts |
Array of objects Список контактов аккаунта | |
ownTransportType | string Default: "car" Enum: "car" "truck" "bus" "motorcycle" "bicycle" "pedestrian" Transport types:
|
features | Array of strings [ 0 .. 1000 ] items unique [ items [ 0 .. 255 ] characters ] List of executor features |
transportRestrictions | Array of strings [ 0 .. 1000 ] items unique [ items [ 0 .. 255 ] characters ] List of requirements for transport, which determines the possibility of using transport by the executor |
object Смена исполнителя по-умолчанию. Используется при создании смен в ручном распределении. |
{- "id": "gK1dnklOr5Ry7v5dTHNw",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contacts": [
- {
- "note": "7654",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Moto"
], - "transportRestrictions": [
- "Ref"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contactPhones": [
- "+79990000001",
- "+79990000002"
], - "contacts": [
- {
- "note": "6337",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Special"
], - "transportRestrictions": [
- "Ref"
], - "defaultShift": {
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}, - "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Get an account by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Account ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contactPhones": [
- "+79990000001",
- "+79990000002"
], - "contacts": [
- {
- "note": "6337",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Special"
], - "transportRestrictions": [
- "Ref"
], - "defaultShift": {
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}, - "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Update an account
firstName | string First name |
lastName | string Last name |
string | |
phone | string Phone number |
jobTitle | string Job Description |
contactPhones | Array of strings [ 0, .. 2, ] items unique Deprecated Поле устарело, оно будет автоматически преобразовано в contacts |
Array of objects Список контактов аккаунта | |
ownTransportType | string Default: "car" Enum: "car" "truck" "bus" "motorcycle" "bicycle" "pedestrian" Transport types:
|
features | Array of strings [ 0 .. 1000 ] items unique [ items [ 0 .. 255 ] characters ] List of executor features |
transportRestrictions | Array of strings [ 0 .. 1000 ] items unique [ items [ 0 .. 255 ] characters ] List of requirements for transport, which determines the possibility of using transport by the executor |
object Смена исполнителя по-умолчанию. Используется при создании смен в ручном распределении. |
{- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contacts": [
- {
- "note": "3546",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Moto"
], - "transportRestrictions": [
- "Ref"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contactPhones": [
- "+79990000001",
- "+79990000002"
], - "contacts": [
- {
- "note": "6337",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Special"
], - "transportRestrictions": [
- "Ref"
], - "defaultShift": {
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}, - "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Обновление роли аккаунта
roleId | string ID роли |
{- "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6"
}
{- "message": "Credentials are required",
- "code": "CredentialsRequired"
}
Get a list of waypoint functions
sort | string Enum: "name" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Good",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
]
}
}, - "total": 1
}
Create a waypoint function
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
name | string First name |
object Point functions |
{- "id": "os8hi3dhqw",
- "name": "Special conditions",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Arrive",
- "selected": false
}
], - "droplist": [
- {
- "id": 0,
- "text": "See",
- "selected": false
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Good",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
]
}
}
Get a waypoint functions by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Идентификатор маршрутной точки |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Good",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
]
}
}
Update a waypoint function
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
name | string First name |
object Point functions |
{- "id": "os8hi3dhqw",
- "name": "Special conditions",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "Arrive",
- "selected": false
}
], - "droplist": [
- {
- "id": 0,
- "text": "See",
- "selected": false
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Good",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "functions": {
- "checklist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
], - "droplist": [
- {
- "id": 0,
- "text": "string",
- "selected": true
}
]
}
}
Get a list of contractors
sort | string Enum: "name" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "9EQbnyYRf6VVwwQZOQAA",
- "name": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create a contractor
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
name required | string Contractor name |
{- "id": "nrIuUHdy2aRd9n2AOkly",
- "name": "Good contractor"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "9EQbnyYRf6VVwwQZOQAA",
- "name": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a contractor by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Contractor ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "9EQbnyYRf6VVwwQZOQAA",
- "name": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Update a contractor
name | string Contractor name |
{- "name": "Good contractor"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "9EQbnyYRf6VVwwQZOQAA",
- "name": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a list of shifts
sort | string Enum: "type" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "transport",
- "resourceId": "9EQbnyYRf6VVwwQZOQAA",
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "currentPosition": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}, - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create a shift
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
type required | string Enum: "executor" "transport" Shift type. Can be an executor or a transport |
resourceId required | string Resource ID referenced by the change (executor ID or transport ID) |
object Working time window in which the executor or transport can perform work at locations | |
object Координаты текущей позиции ресурса смены. Используется для актуализации начала смены по текущим поездкам | |
object Location, geographical position | |
object Location, geographical position | |
object Rate. determines the cost and restrictions of the shift |
{- "type": "executor",
- "resourceId": "nrIuUHdy2aRd9n2AOkly",
- "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "transport",
- "resourceId": "9EQbnyYRf6VVwwQZOQAA",
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "currentPosition": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}, - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a shift by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Shift's ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "transport",
- "resourceId": "9EQbnyYRf6VVwwQZOQAA",
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "currentPosition": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}, - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Update a shift
id | string Example: 9EQbnyYRf6VVwwQZOQAA Shift's ID |
type required | string Enum: "executor" "transport" Shift type. Can be an executor or a transport |
resourceId required | string Resource ID referenced by the change (executor ID or transport ID) |
object Working time window in which the executor or transport can perform work at locations | |
object Координаты текущей позиции ресурса смены. Используется для актуализации начала смены по текущим поездкам | |
object Location, geographical position | |
object Location, geographical position | |
object Rate. determines the cost and restrictions of the shift |
{- "type": "executor",
- "resourceId": "nrIuUHdy2aRd9n2AOkly",
- "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "transport",
- "resourceId": "9EQbnyYRf6VVwwQZOQAA",
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "currentPosition": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}, - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a list of transports
sort | string Enum: "name" "number" "type" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "string",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
], - "boxes": [
- {
- "id": "box01",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "features": [
- "Freezer"
]
}
], - "comment": "Бензин АИ-95",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Сreate a transport
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
name | string Transport name |
number | string Transport number |
type | string Default: "car" Enum: "car" "truck" "bus" "motorcycle" "bicycle" "pedestrian" Transport types:
|
features | Array of strings [ 0 .. 1000 ] items unique The list of transport options is used to check the compatibility of transport with orders, locations and executors. |
executorRestrictions | Array of strings [ 0 .. 1000 ] items unique List of requirements for the executor, which determines the possibility of using the transport by executors |
Array of objects or null [ 1 .. 100 ] items unique List of transport boxes that can accommodate cargo | |
comment | string Comment |
ownerId | string Идентификатор владельца транспорта |
{- "id": "pnAn95dXhdpgMwGOMjxl",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "string",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
], - "boxes": [
- {
- "id": "box01",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "features": [
- "Freezer"
]
}
], - "comment": "Бензин АИ-95",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a transport by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Transport ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "string",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
], - "boxes": [
- {
- "id": "box01",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "features": [
- "Freezer"
]
}
], - "comment": "Бензин АИ-95",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Update a transport
name | string Transport name |
number | string Transport number |
type | string Default: "car" Enum: "car" "truck" "bus" "motorcycle" "bicycle" "pedestrian" Transport types:
|
features | Array of strings [ 0 .. 1000 ] items unique The list of transport options is used to check the compatibility of transport with orders, locations and executors. |
executorRestrictions | Array of strings [ 0 .. 1000 ] items unique List of requirements for the executor, which determines the possibility of using the transport by executors |
Array of objects or null [ 1 .. 100 ] items unique List of transport boxes that can accommodate cargo | |
comment | string Comment |
ownerId | string Идентификатор владельца транспорта |
{- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "string",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
], - "boxes": [
- {
- "id": "box01",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "features": [
- "Freezer"
]
}
], - "comment": "Бензин АИ-95",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a list of orders
sort | string Enum: "documentNumber" "status" "total" "paymentForm" "number" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "features": [
- "Special"
], - "restrictions": [
- "Special"
], - "executorRestrictions": [
- "B1"
], - "cargos": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "restrictions": [
- "Freezer"
]
}
], - "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "executorId": "string",
- "tripId": "string",
- "total": 0,
- "comment": "string",
- "status": "free",
- "paymentStatus": "readyForPayment",
- "number": "string",
- "documentNumber": "string",
- "paymentForm": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create an order
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
number | string Order number to display to the user |
documentNumber | string Order document number |
executorId | string Executor ID |
ownerId | string Идентификатор владельца заказа |
comment | string Order comment |
total | number the total amount of the order |
paymentForm | string Payment form |
paymentStatus | string Default: "undefined" Enum: "readyForPayment" "payedByCash" "readyForCredit" "payedByCredit" "payedByCard" "payedByBill" "payed" "cancelled" "refund" "undefined" Статус оплаты заказа:
|
features | Array of strings [ 0 .. 1000 ] items unique List of order features |
restrictions | Array of strings [ 0 .. 1000 ] items unique List of restrictions for an order carried out on the same flight |
executorRestrictions | Array of strings [ 0 .. 1000 ] items unique The list of restrictions for the executor of the work is used to check the compatibility of the executor with this work according to the list of executor's features |
required | Array of objects or null [ 0 .. 1000 ] items unique List of cargos (can contain one cargo for drop, some for pickup, empty for work) |
required | Array of objects [ 2 .. 1000 ] items unique List of demands |
{- "id": "RXLgFjcpDkE9XSs3wXp5",
- "number": "A350WE",
- "documentNumber": "3C-797359",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "comment": "Order delivery",
- "total": 1000,
- "paymentForm": "Cash to courier",
- "paymentStatus": "readyForPayment",
- "cargos": [
- {
- "id": "C0001",
- "capacity": {
- "mass": 0,
- "volume": 0.113
}, - "width": 0,
- "height": 0,
- "length": 0,
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg"
}
], - "demands": [
- {
- "type": "pickup",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "reward": 10000
}, - {
- "type": "drop",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "60c0e8c4-ddc2-4953-8a79-7ce4602878d0",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "reward": 10000
}
], - "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "features": [
- "Special"
], - "restrictions": [
- "Special"
], - "executorRestrictions": [
- "B1"
], - "cargos": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "restrictions": [
- "Freezer"
]
}
], - "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "executorId": "string",
- "tripId": "string",
- "total": 0,
- "comment": "string",
- "status": "free",
- "paymentStatus": "readyForPayment",
- "number": "string",
- "documentNumber": "string",
- "paymentForm": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get an order by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Order ID |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "features": [
- "Special"
], - "restrictions": [
- "Special"
], - "executorRestrictions": [
- "B1"
], - "cargos": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "restrictions": [
- "Freezer"
]
}
], - "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "executorId": "string",
- "tripId": "string",
- "total": 0,
- "comment": "string",
- "status": "free",
- "paymentStatus": "readyForPayment",
- "number": "string",
- "documentNumber": "string",
- "paymentForm": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Update an order
number | string Order number to display to the user |
documentNumber | string Order document number |
executorId | string Executor ID |
ownerId | string Идентификатор владельца заказа |
tripId | string ID of the trip within which this order will be executed |
comment | string Order comment |
total | number the total amount of the order |
paymentForm | string Payment form |
paymentStatus | string Default: "undefined" Enum: "readyForPayment" "payedByCash" "readyForCredit" "payedByCredit" "payedByCard" "payedByBill" "payed" "cancelled" "refund" "undefined" Статус оплаты заказа:
|
features | Array of strings [ 0 .. 1000 ] items unique List of order features |
restrictions | Array of strings [ 0 .. 1000 ] items unique List of restrictions for an order carried out on the same flight |
executorRestrictions | Array of strings [ 0 .. 1000 ] items unique The list of restrictions for the executor of the work is used to check the compatibility of the executor with this work according to the list of executor's features |
Array of objects or null [ 0 .. 1000 ] items unique List of cargos (can contain one cargo for drop, some for pickup, empty for work) | |
Array of objects |
{- "number": "A350WE",
- "documentNumber": "3C-797359",
- "executorId": "9EQbnyYRf6VVwwQZOQAA",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "comment": "Order delivery",
- "total": 1000,
- "paymentForm": "Cash to courier",
- "paymentStatus": "readyForPayment",
- "cargos": [
- {
- "id": "C0001",
- "capacity": {
- "mass": 0,
- "volume": 0.113
}, - "width": 0,
- "height": 0,
- "length": 0,
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg"
}
], - "demands": [
- {
- "type": "pickup",
- "targetCargos": [
- "C0001"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "reward": 10000
}, - {
- "type": "drop",
- "placeId": "60c0e8c4-ddc2-4953-8a79-7ce4602878d0",
- "location": {
- "coordinates": {
- "lat": 55.83730739,
- "lng": 37.62006685
}, - "addresses": [
- {
- "address": "Moscow, Hidden st., 999"
}
]
}, - "reward": 10000
}
], - "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
]
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "features": [
- "Special"
], - "restrictions": [
- "Special"
], - "executorRestrictions": [
- "B1"
], - "cargos": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "restrictions": [
- "Freezer"
]
}
], - "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "executorId": "string",
- "tripId": "string",
- "total": 0,
- "comment": "string",
- "status": "free",
- "paymentStatus": "readyForPayment",
- "number": "string",
- "documentNumber": "string",
- "paymentForm": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get information for a dashboard
sort | string Enum: "documentNumber" "status" "total" "paymentForm" "number" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
finishDateFrom | string Начиная с какого времени завершения искать поездки в формате RFC 3339, section 5.6 |
finishDateTo | string До какого времени завершения искать поездки в формате RFC 3339, section 5.6 |
{- "result": [
- {
- "tripId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "tripDate": "2018-04-03T02:17:14.756Z",
- "tripStatus": "pending",
- "documentNumber": "string",
- "firstPoint": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "title": "Important place",
- "tripPointId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "tripPointStatus": "planned",
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "depart": {
- "plan": "2018-04-03T02:17:14.756Z",
- "actual": "2018-04-03T02:17:14.756Z"
}
}, - "warehouse": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "title": "Important place",
- "tripPointId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "tripPointStatus": "planned",
- "depart": {
- "plan": "2018-04-03T02:17:14.756Z",
- "actual": "2018-04-03T02:17:14.756Z"
}
}, - "client": {
- "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "tripPointId": "7UJHyNxhHzwreYo4Pfoh",
- "tripPointStatus": "planned",
- "contractorId": "XvU9LEAKmdxptgmRes3w",
- "title": "Important place",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}, - "arrival": {
- "plan": "2018-04-03T02:17:14.756Z",
- "prediction": "2018-04-03T02:17:14.756Z",
- "actual": "2018-04-03T02:17:14.756Z"
}, - "stayTime": {
- "plan": 1800,
- "actual": 1493.458
}
}, - "executor": {
- "id": "FtncypFjYmVn4CzAiosc",
- "firstName": "Good",
- "lastName": "Man",
- "jobTitle": "Just good man"
}, - "transport": {
- "id": "R3qHC9ikeFn3dY7WCVEM",
- "name": "Truck",
- "number": "P999XE777"
}
}
], - "total": 1
}
Get a report on trips in the context of "expected-actual"
By default, 1 page is returned with a list of 5 reports for the current day.
To select a different time period, use the date
parameter (to select a day)
or parameters dateFrom
/ dateTo
(to select a range of dates and times).
To switch between pages with lists of reports, use the page
parameter.
Examples of using parameters:
?date = 2020-10-30
- selection of reports for October 30?dateFrom = 2020-10-30T06:00:00+03:00&dateFrom = 2020-10-30T10:00:00+03:00
- select reports in the interval from 6 to 10 hours for October 30?date=2020-10-30&page=12
- selection of the 12th page of reports for October 30page | number Example: page=7 Reports page number |
tripIds | string Example: tripIds=4f8934f,29e8d29fh8,9we8fh98h4f Selection of reports by trip ID from 1 or more (separated by commas) |
date | string Example: date=2020-10-30T00:00:00.000Z Selection by trip date on the specified day in the format YYYY-MM-DD (2020-10-30) (Ignored if dateFrom or dateTo is passed) |
dateFrom | string Example: dateFrom=2020-10-30T06:00:00.000Z Selection by trip date "from exclusive" in [RFC 3339, section 5.6] format (https://tools.ietf.org/html/rfc3339#section-5.6) |
dateTo | string Example: dateTo=2020-10-30T10:00:00.000Z Selection by trip date "before" in RFC 3339, section 5.6 format |
dateOffset | string Timezone in [RFC 3339, section 5.6] format (https://tools.ietf.org/html/rfc3339#section-5.6) (for example +03:00) |
{- "result": [
- {
- "expected": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "startedAt": "2018-04-03T02:17:14.756Z",
- "syncAt": "2018-04-03T02:17:14.756Z",
- "finishedPlanAt": "2018-04-03T02:17:14.756Z",
- "finishedAt": "2018-04-03T02:17:14.756Z",
- "plannedAt": "2018-04-03T02:17:14.756Z",
- "status": "cancelled",
- "mobileDeviceInfo": {
- "os": "ios",
- "osVersion": "12.1.1",
- "vendor": "iPhone",
- "clientVersion": "12.2.2",
- "isOutdated": false,
- "locale": "en"
}, - "settings": {
- "canChange": false
}, - "summaryIndicators": {
- "activeWayDistance": 12300,
- "passedWayDistance": 12300,
- "totalAtNonClients": 12300,
- "unladenDistance": 12300
}, - "way": {
- "activeWay": {
- "legs": [
- {
- "summary": {
- "length": 100,
- "travelTime": 1230
}, - "toTripPointId": "2982398ud"
}
], - "summary": {
- "length": 1024,
- "travelTime": 36000
}
}, - "passedWay": {
- "legs": [
- {
- "summary": {
- "arrivedAt": "string",
- "length": 120
}, - "toTripPointId": "wefj982h3f9328u"
}
], - "summary": {
- "length": 1023
}
}
}, - "transport": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Truck",
- "number": "P999XE777"
}, - "executor": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "phone": "+79990000000",
- "firstName": "Good",
- "lastName": "Man"
}, - "orders": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "number": "string",
- "documentNumber": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "tripPointId": "string"
}
]
}
], - "events": [
- {
- "accountId": "2398239fhwef",
- "type": "tripSettingsChange",
- "timestamp": "2018-04-03T02:17:14.756Z",
- "data": {
- "settings": {
- "canChange": true
}
}
}
], - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "checkins": [
- {
- "inDate": "2018-04-03T02:17:14.756Z",
- "outDate": "2018-04-03T02:19:14.756Z",
- "type": "auto",
- "batteryInfo": {
- "level": 0.97,
- "state": "charging",
- "savePowerModeEnabled": false
}
}
], - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": null
}
]
}
], - "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": null,
- "text": null,
- "selected": null
}
], - "droplist": [
- {
- "id": null,
- "text": null,
- "selected": null
}
]
}
}, - "stayTime": 1800,
- "arrivalAt": "2018-04-03T02:17:14.756Z",
- "leftAt": "2018-04-03T02:17:14.756Z",
- "workTime": 303808,
- "place": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Important place",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- { }
]
}
], - "tags": [
- "Important place"
]
}, - "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "order": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME"
}
}
]
}
]
}, - "actual": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "startedAt": "2018-04-03T02:17:14.756Z",
- "syncAt": "2018-04-03T02:17:14.756Z",
- "finishedPlanAt": "2018-04-03T02:17:14.756Z",
- "finishedAt": "2018-04-03T02:17:14.756Z",
- "plannedAt": "2018-04-03T02:17:14.756Z",
- "status": "cancelled",
- "mobileDeviceInfo": {
- "os": "ios",
- "osVersion": "12.1.1",
- "vendor": "iPhone",
- "clientVersion": "12.2.2",
- "isOutdated": false,
- "locale": "en"
}, - "settings": {
- "canChange": false
}, - "summaryIndicators": {
- "activeWayDistance": 12300,
- "passedWayDistance": 12300,
- "totalAtNonClients": 12300,
- "unladenDistance": 12300
}, - "way": {
- "activeWay": {
- "legs": [
- {
- "summary": {
- "length": 100,
- "travelTime": 1230
}, - "toTripPointId": "2982398ud"
}
], - "summary": {
- "length": 1024,
- "travelTime": 36000
}
}, - "passedWay": {
- "legs": [
- {
- "summary": {
- "arrivedAt": "string",
- "length": 120
}, - "toTripPointId": "wefj982h3f9328u"
}
], - "summary": {
- "length": 1023
}
}
}, - "transport": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Truck",
- "number": "P999XE777"
}, - "executor": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "phone": "+79990000000",
- "firstName": "Good",
- "lastName": "Man"
}, - "orders": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "number": "string",
- "documentNumber": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "tripPointId": "string"
}
]
}
], - "events": [
- {
- "accountId": "2398239fhwef",
- "type": "tripSettingsChange",
- "timestamp": "2018-04-03T02:17:14.756Z",
- "data": {
- "settings": {
- "canChange": true
}
}
}
], - "tripPoints": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "checkins": [
- {
- "inDate": "2018-04-03T02:17:14.756Z",
- "outDate": "2018-04-03T02:19:14.756Z",
- "type": "auto",
- "batteryInfo": {
- "level": 0.97,
- "state": "charging",
- "savePowerModeEnabled": false
}
}
], - "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": null
}
]
}
], - "comment": "There are wonderful people inside",
- "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "functions": {
- "id": "9EQbnyYRf6VVwwQZOQAA",
- "name": "Urgent matters",
- "functions": {
- "checklist": [
- {
- "id": null,
- "text": null,
- "selected": null
}
], - "droplist": [
- {
- "id": null,
- "text": null,
- "selected": null
}
]
}
}, - "stayTime": 1800,
- "arrivalAt": "2018-04-03T02:17:14.756Z",
- "leftAt": "2018-04-03T02:17:14.756Z",
- "workTime": 303808,
- "place": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "title": "Important place",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- { }
]
}
], - "tags": [
- "Important place"
]
}, - "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "order": {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME"
}
}
]
}
]
}
}
], - "total": 290,
- "currentCount": 5,
- "currentPage": 3,
- "pages": 58
}
Get a list of mobile devices
sort | string Enum: "id" "deviceId" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "deviceId": "c5de5c165d1b6ce6",
- "phoneNumber": "+79251234567",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Create a mobile device
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
deviceId | string Device ID displayed in Homestretch app |
phoneNumber | string Номер телефона устройства |
{- "id": "129874981279472",
- "deviceId": "sshd8asd345gdd7w8"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "deviceId": "c5de5c165d1b6ce6",
- "phoneNumber": "+79251234567",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Get a mobile device by ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Идентификатор моб. устройства |
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "deviceId": "c5de5c165d1b6ce6",
- "phoneNumber": "+79251234567",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Update mobile device
deviceId | string Device ID displayed in Homestretch app |
phoneNumber | string Номер телефона устройства |
{- "deviceId": "sshd8asd345gdd7w8"
}
{- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "deviceId": "c5de5c165d1b6ce6",
- "phoneNumber": "+79251234567",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
Start a distribution
ownerId | string Owner ID of distribution. If it's not set then one will set as the company owner |
name | string Название распределения |
required | Array of objects [ 0 .. 5000 ] items Array with a list of distributed orders |
required | Array of objects or objects [ 0 .. 5000 ] items Array with a list of executors |
required | Array of objects [ 0 .. 5000 ] items Array with the list of transports |
required | Array of objects [ 0 .. 5000 ] items Array with the list of shifts |
Array of objects [ 0 .. 1000 ] items Массив со списком назначений | |
object Distribution settings |
{- "name": "Distribution 1",
- "orders": [
- {
- "id": "1",
- "cargos": [
- {
- "id": "C0001",
- "capacity": {
- "mass": 0,
- "volume": 0.113
}, - "width": 0,
- "height": 0,
- "length": 0,
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg"
}
], - "demands": [
- {
- "id": "DP0001",
- "type": "pickup",
- "targetCargos": [
- "C0001"
], - "location": {
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "arrivalDuration": 1800,
- "departureDuration": 0
}, - "reward": 100000,
- "duration": 0,
- "deliveryWindows": [
- {
- "from": "2020-07-26T05:30:00.000Z",
- "to": "2020-07-26T19:30:00.000Z"
}
]
}, - {
- "id": "DD0001",
- "type": "drop",
- "targetCargos": [
- "C0001"
], - "location": {
- "addresses": [
- {
- "address": "University"
}
], - "coordinates": {
- "lat": 55.692612,
- "lng": 37.533517
}, - "arrivalDuration": 1800,
- "departureDuration": 0
}, - "duration": 0,
- "deliveryWindows": [
- {
- "from": "2020-07-26T06:30:00.000Z",
- "to": "2020-07-26T19:30:00.000Z"
}
]
}
]
}
], - "executors": [
- {
- "id": "P0001",
- "email": "test@abc.com",
- "firstName": "P",
- "lastName": "P",
- "jobTitle": "J"
}
], - "transports": [
- {
- "id": "T0001",
- "name": "T0001",
- "boxes": [
- {
- "id": "BT0001",
- "capacity": {
- "capacityX": 1,
- "capacityZ": 1,
- "capacityY": 1,
- "mass": 1500,
- "volume": 6
}, - "width": 1,
- "height": 1,
- "length": 1
}
]
}
], - "shifts": [
- {
- "id": "fa203e23-0cbd-4801-8418-6a8570960fe1",
- "type": "transport",
- "resourceId": "T0001",
- "workingTime": {
- "from": "2020-07-25T21:00:00.000Z",
- "to": "2020-07-26T20:59:59.000Z"
}, - "startLocation": {
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "arrivalDuration": 1800,
- "departureDuration": 0
}, - "finishLocation": {
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "arrivalDuration": 1800,
- "departureDuration": 0
}, - "tariff": {
- "costPerShift": 2600,
- "constraints": [
- {
- "costPerUnit": 0.005,
- "stageLength": 800000
}
]
}
}, - {
- "id": "39d3cbcd-b631-4775-86f9-fa6a00156104",
- "type": "executor",
- "resourceId": "P0001",
- "workingTime": {
- "from": "2020-07-26T05:30:00.000Z",
- "to": "2020-07-26T20:30:00.000Z"
}, - "tariff": {
- "costPerShift": 1000,
- "constraints": [
- {
- "costPerUnit": 5,
- "stageLength": 28800
}
]
}
}
], - "settings": {
- "configuration": "optimizeCarsThenDistance",
- "assumptions": {
- "disableTrafficJams": false,
- "flightDistance": false,
- "disableCompatibility": false,
- "disableCapacity": false,
- "sameOrderTimeWindow": false,
- "expandShiftTimeWindow": false
}, - "tripStartTimeStrategy": "earliestFinish",
- "planningTime": 20
}
}
{- "id": "4fbc8797-bde6-4f01-bdd5-618e897dfaf9"
}
Get the result of distribution
id required | string Example: 71b11838-f8a9-4986-b9ab-448ecc94305f Distribution ID |
{- "requestId": "f16288a8-e695-4742-a203-849206a522d5",
- "trips": [
- {
- "id": "trip_39d3cbcd-b631-4775-86f9-fa6a00156104",
- "executorId": "P0001",
- "status": "planned",
- "createdAt": "2020-07-02T20:01:58.037Z",
- "updatedAt": "2020-07-02T20:01:58.038Z",
- "plannedAt": "2020-07-26T05:38:00.000Z",
- "tripPoints": [
- {
- "id": "0b229911-f9e0-4703-8356-a1646f825ab5",
- "status": "planned",
- "workingHours": [ ],
- "demandIds": [
- "DP0001"
], - "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}, - {
- "id": "95ca5eae-9972-4182-af37-9b7ce6368968",
- "status": "planned",
- "workingHours": [ ],
- "demandId": "DD0001",
- "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "University"
}
], - "coordinates": {
- "lat": 55.692612,
- "lng": 37.533517
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}, - {
- "id": "f1d8317e-cbce-437a-aa8e-b537548f385f",
- "status": "planned",
- "workingHours": [ ],
- "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}
]
}
], - "statistics": {
- "TotalStatistics": {
- "cost": 37616.674425,
- "reward": 110000,
- "measurements": {
- "drivingTime": 4680,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 5400,
- "departureTime": 0,
- "totalTime": 10080,
- "distance": 22570,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "ordersCount": 1,
- "performersCount": 1,
- "capacityUtilization": {
- "mass": 0,
- "volume": 0.019,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "TripsStatistics": [
- {
- "statistics": {
- "cost": 37616.674425,
- "reward": 110000,
- "measurements": {
- "drivingTime": 78,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 90,
- "departureTime": 0,
- "totalTime": 168,
- "distance": 22570,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "ordersCount": 1,
- "performersCount": 1,
- "capacityUtilization": {
- "mass": 0,
- "volume": 0.019,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "stopStatistics": [
- {
- "location": {
- "id": "b95d3df7-a4fc-461a-9813-af1d6149dde3",
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [
- "1#DP0001"
], - "measurements": {
- "drivingTime": 0,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 1800,
- "distance": 0,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T05:38:00Z"
}
}, - "upload": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "download": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}, - {
- "location": {
- "id": "0f98cc63-9279-4f94-8f77-326b28bf52ea",
- "addresses": [
- {
- "address": "University"
}
], - "coordinates": {
- "lat": 55.692612,
- "lng": 37.533517,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [
- "1#DD0001"
], - "measurements": {
- "drivingTime": 1320,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 3120,
- "distance": 10451,
- "timeWindow": {
- "from": "2020-07-26T06:00:00Z",
- "to": "2020-07-26T06:30:00Z"
}
}, - "download": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}, - {
- "location": {
- "id": "b95d3df7-a4fc-461a-9813-af1d6149dde3",
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [ ],
- "measurements": {
- "drivingTime": 3360,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 5160,
- "distance": 12119,
- "timeWindow": {
- "from": "2020-07-26T07:26:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "upload": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "download": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}
], - "totalLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "maxLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "tripId": "trip_39d3cbcd-b631-4775-86f9-fa6a00156104"
}
]
}, - "validations": [ ],
- "unplannedOrders": [ ],
- "unassignedOrders": [ ],
- "progress": 100,
- "info": {
- "status": "FINISHED_IN_TIME",
- "resultVersion": 0,
- "planningTime": 0,
- "waitingTime": 0
}, - "inProgress": false,
- "settings": {
- "planningTime": 20,
- "configuration": "optimizeCarsThenDistance",
- "assumptions": {
- "disableTrafficJams": false,
- "flightDistance": false,
- "disableCompatibility": false,
- "disableCapacity": false,
- "sameOrderTimeWindow": false,
- "expandShiftTimeWindow": false
}, - "tripStartTimeStrategy": "earliestFinish",
- "strategy": {
- "reorder": false,
- "planNewOrders": false,
- "createNewTrips": false
}
}
}
Accept distribution result
id required | string Example: 71b11838-f8a9-4986-b9ab-448ecc94305f Distribution ID |
{- "requestId": "f16288a8-e695-4742-a203-849206a522d5",
- "trips": [
- {
- "id": "trip_39d3cbcd-b631-4775-86f9-fa6a00156104",
- "executorId": "P0001",
- "status": "planned",
- "createdAt": "2020-07-02T20:01:58.037Z",
- "updatedAt": "2020-07-02T20:01:58.038Z",
- "plannedAt": "2020-07-26T05:38:00.000Z",
- "tripPoints": [
- {
- "id": "0b229911-f9e0-4703-8356-a1646f825ab5",
- "status": "planned",
- "workingHours": [ ],
- "demandIds": [
- "DP0001"
], - "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}, - {
- "id": "95ca5eae-9972-4182-af37-9b7ce6368968",
- "status": "planned",
- "workingHours": [ ],
- "demandId": "DD0001",
- "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "University"
}
], - "coordinates": {
- "lat": 55.692612,
- "lng": 37.533517
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}, - {
- "id": "f1d8317e-cbce-437a-aa8e-b537548f385f",
- "status": "planned",
- "workingHours": [ ],
- "contacts": [ ],
- "checkins": [ ],
- "location": {
- "addresses": [
- {
- "locale": "ru",
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504
}, - "timezone": {
- "name": "Europe/Moscow",
- "offset": 10800
}
}
}
]
}
], - "statistics": {
- "TotalStatistics": {
- "cost": 37616.674425,
- "reward": 110000,
- "measurements": {
- "drivingTime": 4680,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 5400,
- "departureTime": 0,
- "totalTime": 10080,
- "distance": 22570,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "ordersCount": 1,
- "performersCount": 1,
- "capacityUtilization": {
- "mass": 0,
- "volume": 0.019,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "TripsStatistics": [
- {
- "statistics": {
- "cost": 37616.674425,
- "reward": 110000,
- "measurements": {
- "drivingTime": 78,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 90,
- "departureTime": 0,
- "totalTime": 168,
- "distance": 22570,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "ordersCount": 1,
- "performersCount": 1,
- "capacityUtilization": {
- "mass": 0,
- "volume": 0.019,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "stopStatistics": [
- {
- "location": {
- "id": "b95d3df7-a4fc-461a-9813-af1d6149dde3",
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [
- "1#DP0001"
], - "measurements": {
- "drivingTime": 0,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 1800,
- "distance": 0,
- "timeWindow": {
- "from": "2020-07-26T05:38:00Z",
- "to": "2020-07-26T05:38:00Z"
}
}, - "upload": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "download": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}, - {
- "location": {
- "id": "0f98cc63-9279-4f94-8f77-326b28bf52ea",
- "addresses": [
- {
- "address": "University"
}
], - "coordinates": {
- "lat": 55.692612,
- "lng": 37.533517,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [
- "1#DD0001"
], - "measurements": {
- "drivingTime": 1320,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 3120,
- "distance": 10451,
- "timeWindow": {
- "from": "2020-07-26T06:00:00Z",
- "to": "2020-07-26T06:30:00Z"
}
}, - "download": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}, - {
- "location": {
- "id": "b95d3df7-a4fc-461a-9813-af1d6149dde3",
- "addresses": [
- {
- "address": "Moscow"
}
], - "coordinates": {
- "lat": 55.753215,
- "lng": 37.622504,
- "type": null,
- "timestamp": 0
}, - "googlePlaceId": null,
- "arrivalDuration": 1800,
- "departureDuration": 0
}, - "demandIds": [ ],
- "measurements": {
- "drivingTime": 3360,
- "waitingTime": 0,
- "workingTime": 0,
- "arrivingTime": 1800,
- "departureTime": 0,
- "totalTime": 5160,
- "distance": 12119,
- "timeWindow": {
- "from": "2020-07-26T07:26:00Z",
- "to": "2020-07-26T07:26:00Z"
}
}, - "upload": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "download": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "currentLoad": {
- "count": 0,
- "capacity": {
- "mass": 0,
- "volume": 0,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}
}
], - "totalLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "maxLoad": {
- "count": 1,
- "capacity": {
- "mass": 0,
- "volume": 0.113,
- "capacityX": 0,
- "capacityY": 0,
- "capacityZ": 0
}
}, - "tripId": "trip_39d3cbcd-b631-4775-86f9-fa6a00156104"
}
]
}, - "validations": [ ],
- "unplannedOrders": [ ],
- "unassignedOrders": [ ],
- "progress": 100,
- "info": {
- "status": "FINISHED_IN_TIME",
- "resultVersion": 0,
- "planningTime": 0,
- "waitingTime": 0
}, - "inProgress": false,
- "settings": {
- "planningTime": 20,
- "configuration": "optimizeCarsThenDistance",
- "assumptions": {
- "disableTrafficJams": false,
- "flightDistance": false,
- "disableCompatibility": false,
- "disableCapacity": false,
- "sameOrderTimeWindow": false,
- "expandShiftTimeWindow": false
}, - "tripStartTimeStrategy": "earliestFinish",
- "strategy": {
- "reorder": false,
- "planNewOrders": false,
- "createNewTrips": false
}
}
}
Аналитика по незапланированным заказам
id required | string Example: 71b11838-f8a9-4986-b9ab-448ecc94305f Distribution ID |
{- "type": "shortTimeWindowByDuration",
- "group": "shortTimeWindow",
- "details": "строка",
- "orders": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "features": [
- "Special"
], - "restrictions": [
- "Special"
], - "executorRestrictions": [
- "B1"
], - "cargos": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "name": "Товар 1",
- "price": 100,
- "amount": 20,
- "unit": "kg",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "restrictions": [
- "Freezer"
]
}
], - "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "executorId": "string",
- "tripId": "string",
- "total": 0,
- "comment": "string",
- "status": "free",
- "paymentStatus": "readyForPayment",
- "number": "string",
- "documentNumber": "string",
- "paymentForm": "string",
- "demands": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}, - {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "type": "work",
- "targetCargos": [
- "9EQbnyYRf6VVwwQZOQAA"
], - "placeId": "9EQbnyYRf6VVwwQZOQAA",
- "contractorId": "9EQbnyYRf6VVwwQZOQAA",
- "contacts": [
- {
- "name": "Good man",
- "note": "Call after 19:00",
- "phones": [
- {
- "phone": "+79990000000"
}
]
}
], - "location": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "duration": 900,
- "deliveryWindows": [
- {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}
], - "reward": 10000,
- "precedenceInTrip": 0,
- "tagIds": [
- "FFFF0000-22AA-CC44-66BB-99AACCWWPP11"
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "executors": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "firstName": "Good",
- "lastName": "Man",
- "email": "foo@bar.com",
- "phone": "+79990000000",
- "jobTitle": "Just good man",
- "contactPhones": [
- "+79990000001",
- "+79990000002"
], - "contacts": [
- {
- "note": "6337",
- "phone": "+79990000000"
}
], - "ownTransportType": "car",
- "features": [
- "B1",
- "Special"
], - "transportRestrictions": [
- "Ref"
], - "defaultShift": {
- "workingTime": {
- "from": "2020-02-15T09:00:00.000Z",
- "to": "2020-02-15T18:00:00.000Z"
}, - "startLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "finishLocation": {
- "coordinates": {
- "lat": 55.692789,
- "lng": 37.554554
}, - "addresses": [
- {
- "locale": "ru",
- "address": "Moscow, Znamenka st., 19"
}
], - "arrivalDuration": 900,
- "departureDuration": 300,
- "transportRestrictions": [
- "14T"
]
}, - "tariff": {
- "costPerShift": 2000,
- "constraints": [
- {
- "stageLength": 400,
- "costPerUnit": 1.5
}
]
}
}, - "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "transports": [
- {
- "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
- "companyId": "string",
- "name": "Truck",
- "number": "P999XE777",
- "type": "car",
- "features": [
- "20T"
], - "executorRestrictions": [
- "B1"
], - "boxes": [
- {
- "id": "box01",
- "capacity": {
- "mass": 10,
- "volume": 2,
- "capacityX": 2,
- "capacityY": 2,
- "capacityZ": 2
}, - "width": 1,
- "height": 0.3,
- "length": 2.2,
- "features": [
- "Freezer"
]
}
], - "comment": "Бензин АИ-95",
- "ownerId": "9EQbnyYRf6VVwwQZOQAA",
- "createdBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
- "updatedAt": "2018-04-03T02:17:14.756Z",
- "createdAt": "2018-04-03T02:17:14.756Z"
}
], - "hardlinks": null
}
Метод для создание тега
id | string [ 1 .. 48 ] characters Entity ID. This field is optional. If the identifier is not passed, the UUID V4 will be generated |
name required | string Имя тега |
color required | string Enum: "red" "pink" "purple" "deepPurple" "indigo" "blue" "lightBlue" "cyan" "teal" "green" "lightGreen" "lime" "yellow" "amber" "orange" "deepOrange" "brown" "blueGrey" "grey" Цвет тега |
{- "id": "dOSD8m0XMj0Y9XlyBkD2",
- "name": "Открыто",
- "color": "green"
}
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Открыто",
- "color": "green",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Метод для получения тегов
sort | string Enum: "id" "name" "color" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Открыто",
- "color": "green",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Метод для получения тега по ID
id | string Example: 9EQbnyYRf6VVwwQZOQAA Идентификатор тега |
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Открыто",
- "color": "green",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Метод для обновления тега по ID
name required | string Имя тега |
color required | string Enum: "red" "pink" "purple" "deepPurple" "indigo" "blue" "lightBlue" "cyan" "teal" "green" "lightGreen" "lime" "yellow" "amber" "orange" "deepOrange" "brown" "blueGrey" "grey" Цвет тега |
{- "name": "Открыто",
- "color": "green"
}
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Открыто",
- "color": "green",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Метод для получения ролей
sort | string Enum: "id" "name" "createdAt" "updatedAt" Name of the field by which you want to sort |
sortDir | string Enum: "desc" "asc" Sorting direction |
skip | integer Default: 0 The number of items to skip before fetching the result |
limit | integer <= 150 Default: 25 The number of items in the sample |
{- "result": [
- {
- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Employer",
- "rules": [
- "create account",
- "update_account"
], - "type": "account",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
], - "total": 19082
}
Метод для создание роли
name required | string Имя роли |
rules required | Array of arrays Правила роли |
{- "name": "Employer",
- "rules": [
- "create account",
- "update account"
]
}
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Employer",
- "rules": [
- "create account",
- "update_account"
], - "type": "account",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Метод для получения роли по ID
id | string Example: 43d87097-f16f-4de0-9891-f7bf32a97624 Идентификатор роль |
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Employer",
- "rules": [
- "create account",
- "update_account"
], - "type": "account",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}
Метод для обновления роли по ID
name | string Имя роли |
rules | Array of arrays Правила роли |
{- "name": "Employer",
- "rules": [
- "delete account"
]
}
{- "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "name": "Employer",
- "rules": [
- "create account",
- "update_account"
], - "type": "account",
- "createdBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "updatedBy": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
- "createdAt": "2018-04-03T02:17:14.756Z",
- "updatedAt": "2018-04-03T02:17:14.756Z"
}