HomeStretch Public API (5.4.6)

Download OpenAPI specification:Download

HomeStretch support: support@homestretch.ru

HomeStretch API

Authorization

Authorization

This method allows to get a bearer token for subsequent access to private API methods.

Token request options:

  • Pass the Authorization header with the value received as Basic base64(client_id:client_secret),
  • Pass the client_id and client_secret parameters in the request body, specifying application/x-www-form-urlencoded or application/json in the Content-Type header.

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.

Request Body schema:

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

Responses

Request samples

Content type
{
  • "client_id": "705b36a9-c095-496b-aa4a-20bc31ba1991",
  • "client_secret": "recall$shrewd9Cobalt!Style"
}

Response samples

Content type
application/json
{
  • "requestId": "705b36a9-c095-496b-aa4a-20bc31ba1991",
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Company

Get company structure

Method for obtaining company structure

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "name": "string",
  • "canSeeEachOther": false,
  • "accountIds": [
    ],
  • "branches": [
    ]
}

Change company structure

Method for changing company structure

Authorizations:
ApiKeyAuth
Request Body schema: application/json
accountIds
Array of strings (accountIds) [ items [ 1 .. 48 ] characters ]
Array of objects (branches)

Responses

Request samples

Content type
application/json
{
  • "accountIds": [
    ],
  • "branches": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "name": "string",
  • "canSeeEachOther": false,
  • "accountIds": [
    ],
  • "branches": [
    ]
}

Places

Get a list of places

Get a list of places

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create a place

Create a place

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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)

Responses

Request samples

Content type
application/json
{
  • "id": "EGpTdIRP5cuLuzMMDY6O",
  • "title": "Important place",
  • "tags": [
    ],
  • "contractorId": "cLaEEcGpI16RbkLAutLB",
  • "comment": "Reception number: 02",
  • "location": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
  • "title": "Important place",
  • "tags": [
    ],
  • "comment": "Reception number: 02",
  • "location": {
    },
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Remove a place

Remove a place

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Place ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Update a place

Update a place

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "title": "Important place",
  • "tags": [
    ],
  • "contractorId": "cLaEEcGpI16RbkLAutLB",
  • "comment": "Reception number: 02",
  • "location": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
  • "title": "Important place",
  • "tags": [
    ],
  • "comment": "Reception number: 02",
  • "location": {
    },
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Get a place

Get a place

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Place ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "contractorId": "6c42de8c-f068-46be-9e35-b0070614ec81",
  • "title": "Important place",
  • "tags": [
    ],
  • "comment": "Reception number: 02",
  • "location": {
    },
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Trips

Get a trip

Get a trip

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Trip ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "title": "Go to the market for buckwheat",
  • "status": "pending",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "transportId": "8KNjsbHAq0HSccUHJNCG",
  • "way": {
    },
  • "tripPoints": [
    ],
  • "plannedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Update a trip

Update a trip

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "id": "dOSD8m0XMj0Y9XlyBkD2",
  • "title": "Go to the market for buckwheat",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "way": {
    },
  • "tripPoints": [
    ],
  • "plannedAt": "2020-02-15T07:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "title": "Go to the market for buckwheat",
  • "status": "pending",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "transportId": "8KNjsbHAq0HSccUHJNCG",
  • "way": {
    },
  • "tripPoints": [
    ],
  • "plannedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Delete a trip

Delete a trip

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Trip ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get a list of coordinates of the passed path

Get a list of coordinates of the passed path

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Trip ID

Responses

Response samples

Content type
application/json
{
  • "passedWay": [
    ]
}

Get a list of trips

Get a list of trips

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create a trip

Create a trip

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Параметры поездки

Responses

Request samples

Content type
application/json
{
  • "id": "dOSD8m0XMj0Y9XlyBkD2",
  • "title": "Go to the market for buckwheat",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "way": {
    },
  • "tripPoints": [
    ],
  • "plannedAt": "2020-02-15T07:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "title": "Go to the market for buckwheat",
  • "status": "pending",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "transportId": "8KNjsbHAq0HSccUHJNCG",
  • "way": {
    },
  • "tripPoints": [
    ],
  • "plannedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Получение изменений в поездках

Получение изменений в поездках

Authorizations:
ApiKeyAuth
Request Body schema: application/json
tripIds
Array of arrays

Массив идентификаторов сущности Trips

timeFrom
required
string

Время, начиная с которого возвращаются изменения

Responses

Request samples

Content type
application/json
{
  • "timeFrom": [
    ]
}

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "timestamp": "2018-04-03T02:17:14.756Z"
}

Accounts

Get a list of accounts

Get a list of accounts

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create an account

Create an account

Authorizations:
ApiKeyAuth
Request Body schema: application/json
Any of
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

E-mail

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:

  • car - Car
  • truck - Truck
  • bus - Public transport
  • motorcycle - Motorcycle
  • bicycle - Bicycle
  • pedestrian - Pedestrian
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

Смена исполнителя по-умолчанию. Используется при создании смен в ручном распределении.

Responses

Request samples

Content type
application/json
{
  • "id": "gK1dnklOr5Ry7v5dTHNw",
  • "firstName": "Good",
  • "lastName": "Man",
  • "email": "foo@bar.com",
  • "phone": "+79990000000",
  • "jobTitle": "Just good man",
  • "contacts": [
    ],
  • "ownTransportType": "car",
  • "features": [
    ],
  • "transportRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "firstName": "Good",
  • "lastName": "Man",
  • "email": "foo@bar.com",
  • "phone": "+79990000000",
  • "jobTitle": "Just good man",
  • "contactPhones": [
    ],
  • "contacts": [
    ],
  • "ownTransportType": "car",
  • "features": [
    ],
  • "transportRestrictions": [
    ],
  • "defaultShift": {
    },
  • "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

Get an account by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Account ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "firstName": "Good",
  • "lastName": "Man",
  • "email": "foo@bar.com",
  • "phone": "+79990000000",
  • "jobTitle": "Just good man",
  • "contactPhones": [
    ],
  • "contacts": [
    ],
  • "ownTransportType": "car",
  • "features": [
    ],
  • "transportRestrictions": [
    ],
  • "defaultShift": {
    },
  • "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Delete an account

Delete an account

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Account ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Update an account

Update an account

Authorizations:
ApiKeyAuth
Request Body schema: application/json
firstName
string

First name

lastName
string

Last name

email
string

E-mail

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:

  • car - Car
  • truck - Truck
  • bus - Public transport
  • motorcycle - Motorcycle
  • bicycle - Bicycle
  • pedestrian - Pedestrian
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

Смена исполнителя по-умолчанию. Используется при создании смен в ручном распределении.

Responses

Request samples

Content type
application/json
{
  • "firstName": "Good",
  • "lastName": "Man",
  • "email": "foo@bar.com",
  • "phone": "+79990000000",
  • "jobTitle": "Just good man",
  • "contacts": [
    ],
  • "ownTransportType": "car",
  • "features": [
    ],
  • "transportRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "firstName": "Good",
  • "lastName": "Man",
  • "email": "foo@bar.com",
  • "phone": "+79990000000",
  • "jobTitle": "Just good man",
  • "contactPhones": [
    ],
  • "contacts": [
    ],
  • "ownTransportType": "car",
  • "features": [
    ],
  • "transportRestrictions": [
    ],
  • "defaultShift": {
    },
  • "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z"
}

Обновление роли аккаунта

Обновление роли аккаунта

Authorizations:
ApiKeyAuth
Request Body schema: application/json
roleId
string

ID роли

Responses

Request samples

Content type
application/json
{
  • "roleId": "0100e5da-7c6a-4d5d-907d-bf5e33684ab6"
}

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

PointFunctions

Get a list of waypoint functions

Get a list of waypoint functions

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "total": 1
}

Create a waypoint function

Create a waypoint function

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "id": "os8hi3dhqw",
  • "name": "Special conditions",
  • "functions": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "name": "Good",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "functions": {
    }
}

Get a waypoint functions by ID

Get a waypoint functions by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Идентификатор маршрутной точки

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "name": "Good",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "functions": {
    }
}

Update a waypoint function

Update a waypoint function

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "id": "os8hi3dhqw",
  • "name": "Special conditions",
  • "functions": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "name": "Good",
  • "createdAt": "2018-04-03T02:17:14.756Z",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "functions": {
    }
}

Contractors

Get a list of contractors

Get a list of contractors

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create a contractor

Create a contractor

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "id": "nrIuUHdy2aRd9n2AOkly",
  • "name": "Good contractor"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "companyId": "9EQbnyYRf6VVwwQZOQAA",
  • "name": "9EQbnyYRf6VVwwQZOQAA",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Delete a contractor

Delete a contractor

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Contractor ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get a contractor by ID

Get a contractor by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Contractor ID

Responses

Response samples

Content type
application/json
{
  • "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

Update a contractor

Authorizations:
ApiKeyAuth
Request Body schema: application/json
name
string

Contractor name

Responses

Request samples

Content type
application/json
{
  • "name": "Good contractor"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "companyId": "9EQbnyYRf6VVwwQZOQAA",
  • "name": "9EQbnyYRf6VVwwQZOQAA",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Shifts

Get a list of shifts

Get a list of shifts

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create a shift

Create a shift

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "type": "executor",
  • "resourceId": "nrIuUHdy2aRd9n2AOkly",
  • "tariff": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "type": "transport",
  • "resourceId": "9EQbnyYRf6VVwwQZOQAA",
  • "workingTime": {
    },
  • "startLocation": {
    },
  • "finishLocation": {
    },
  • "currentPosition": {
    },
  • "tariff": {
    },
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Delete a shift

Delete a shift

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Shift's ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get a shift by ID

Get a shift by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Shift's ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "type": "transport",
  • "resourceId": "9EQbnyYRf6VVwwQZOQAA",
  • "workingTime": {
    },
  • "startLocation": {
    },
  • "finishLocation": {
    },
  • "currentPosition": {
    },
  • "tariff": {
    },
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Update a shift

Update a shift

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Shift's ID

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "type": "executor",
  • "resourceId": "nrIuUHdy2aRd9n2AOkly",
  • "tariff": {
    }
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "type": "transport",
  • "resourceId": "9EQbnyYRf6VVwwQZOQAA",
  • "workingTime": {
    },
  • "startLocation": {
    },
  • "finishLocation": {
    },
  • "currentPosition": {
    },
  • "tariff": {
    },
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Transports

Get a list of transports

Get a list of transports

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Сreate a transport

Сreate a transport

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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:

  • car - Car
  • truck - Truck
  • bus - Public transport
  • motorcycle - Motorcycle
  • bicycle - Bicycle
  • pedestrian - Pedestrian
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

Идентификатор владельца транспорта

Responses

Request samples

Content type
application/json
{
  • "id": "pnAn95dXhdpgMwGOMjxl",
  • "name": "Truck",
  • "number": "P999XE777",
  • "type": "car",
  • "features": [
    ],
  • "executorRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "companyId": "string",
  • "name": "Truck",
  • "number": "P999XE777",
  • "type": "car",
  • "features": [
    ],
  • "executorRestrictions": [
    ],
  • "boxes": [
    ],
  • "comment": "Бензин АИ-95",
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Remove a transport

Remove a transport

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Transport ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get a transport by ID

Get a transport by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Transport ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "companyId": "string",
  • "name": "Truck",
  • "number": "P999XE777",
  • "type": "car",
  • "features": [
    ],
  • "executorRestrictions": [
    ],
  • "boxes": [
    ],
  • "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

Update a transport

Authorizations:
ApiKeyAuth
Request Body schema: application/json
name
string

Transport name

number
string

Transport number

type
string
Default: "car"
Enum: "car" "truck" "bus" "motorcycle" "bicycle" "pedestrian"

Transport types:

  • car - Car
  • truck - Truck
  • bus - Public transport
  • motorcycle - Motorcycle
  • bicycle - Bicycle
  • pedestrian - Pedestrian
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

Идентификатор владельца транспорта

Responses

Request samples

Content type
application/json
{
  • "name": "Truck",
  • "number": "P999XE777",
  • "type": "car",
  • "features": [
    ],
  • "executorRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "companyId": "string",
  • "name": "Truck",
  • "number": "P999XE777",
  • "type": "car",
  • "features": [
    ],
  • "executorRestrictions": [
    ],
  • "boxes": [
    ],
  • "comment": "Бензин АИ-95",
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Orders

Get a list of orders

Get a list of orders

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create an order

Create an order

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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"

Статус оплаты заказа:

  • 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

Responses

Request samples

Content type
application/json
{
  • "id": "RXLgFjcpDkE9XSs3wXp5",
  • "number": "A350WE",
  • "documentNumber": "3C-797359",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "comment": "Order delivery",
  • "total": 1000,
  • "paymentForm": "Cash to courier",
  • "paymentStatus": "readyForPayment",
  • "cargos": [
    ],
  • "demands": [
    ],
  • "features": [
    ],
  • "executorRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "features": [
    ],
  • "restrictions": [
    ],
  • "executorRestrictions": [
    ],
  • "cargos": [
    ],
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "executorId": "string",
  • "tripId": "string",
  • "total": 0,
  • "comment": "string",
  • "status": "free",
  • "paymentStatus": "readyForPayment",
  • "number": "string",
  • "documentNumber": "string",
  • "paymentForm": "string",
  • "demands": [
    ],
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Delete order

Delete order

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Order ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get an order by ID

Get an order by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Order ID

Responses

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "features": [
    ],
  • "restrictions": [
    ],
  • "executorRestrictions": [
    ],
  • "cargos": [
    ],
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "executorId": "string",
  • "tripId": "string",
  • "total": 0,
  • "comment": "string",
  • "status": "free",
  • "paymentStatus": "readyForPayment",
  • "number": "string",
  • "documentNumber": "string",
  • "paymentForm": "string",
  • "demands": [
    ],
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Update an order

Update an order

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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"

Статус оплаты заказа:

  • 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

Responses

Request samples

Content type
application/json
{
  • "number": "A350WE",
  • "documentNumber": "3C-797359",
  • "executorId": "9EQbnyYRf6VVwwQZOQAA",
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "comment": "Order delivery",
  • "total": 1000,
  • "paymentForm": "Cash to courier",
  • "paymentStatus": "readyForPayment",
  • "cargos": [
    ],
  • "demands": [
    ],
  • "features": [
    ],
  • "executorRestrictions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "features": [
    ],
  • "restrictions": [
    ],
  • "executorRestrictions": [
    ],
  • "cargos": [
    ],
  • "ownerId": "9EQbnyYRf6VVwwQZOQAA",
  • "executorId": "string",
  • "tripId": "string",
  • "total": 0,
  • "comment": "string",
  • "status": "free",
  • "paymentStatus": "readyForPayment",
  • "number": "string",
  • "documentNumber": "string",
  • "paymentForm": "string",
  • "demands": [
    ],
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Get information for a dashboard

Get information for a dashboard

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 1
}

Reports

Get a report of trips

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 30
Authorizations:
ApiKeyAuth
query Parameters
page
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)

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 290,
  • "currentCount": 5,
  • "currentPage": 3,
  • "pages": 58
}

Devices

Get a list of mobile devices

Get a list of mobile devices

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Create a mobile device

Create a mobile device

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Номер телефона устройства

Responses

Request samples

Content type
application/json
{
  • "id": "129874981279472",
  • "deviceId": "sshd8asd345gdd7w8"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "deviceId": "c5de5c165d1b6ce6",
  • "phoneNumber": "+79251234567",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Remove a mobile device

Remove a mobile device

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Mobile device ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Get a mobile device by ID

Get a mobile device by ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Идентификатор моб. устройства

Responses

Response samples

Content type
application/json
{
  • "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

Update mobile device

Authorizations:
ApiKeyAuth
Request Body schema: application/json
deviceId
string

Device ID displayed in Homestretch app

phoneNumber
string

Номер телефона устройства

Responses

Request samples

Content type
application/json
{
  • "deviceId": "sshd8asd345gdd7w8"
}

Response samples

Content type
application/json
{
  • "id": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "deviceId": "c5de5c165d1b6ce6",
  • "phoneNumber": "+79251234567",
  • "createdBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedBy": "9EQbnyYRf6VVwwQZOQAA",
  • "updatedAt": "2018-04-03T02:17:14.756Z",
  • "createdAt": "2018-04-03T02:17:14.756Z"
}

Distribute

Start a distribution

Start a distribution

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
Example
{
  • "name": "Distribution 1",
  • "orders": [
    ],
  • "executors": [
    ],
  • "transports": [
    ],
  • "shifts": [
    ],
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": "4fbc8797-bde6-4f01-bdd5-618e897dfaf9"
}

Get the result of distribution

Get the result of distribution

Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Example: 71b11838-f8a9-4986-b9ab-448ecc94305f

Distribution ID

Responses

Response samples

Content type
application/json
{
  • "requestId": "f16288a8-e695-4742-a203-849206a522d5",
  • "trips": [
    ],
  • "statistics": {
    },
  • "validations": [ ],
  • "unplannedOrders": [ ],
  • "unassignedOrders": [ ],
  • "progress": 100,
  • "info": {
    },
  • "inProgress": false,
  • "settings": {
    }
}

Delete distribution result

Delete distribution result

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 71b11838-f8a9-4986-b9ab-448ecc94305f

Distribution ID

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Accept distribution result

Accept distribution result

Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Example: 71b11838-f8a9-4986-b9ab-448ecc94305f

Distribution ID

Responses

Response samples

Content type
application/json
{
  • "requestId": "f16288a8-e695-4742-a203-849206a522d5",
  • "trips": [
    ],
  • "statistics": {
    },
  • "validations": [ ],
  • "unplannedOrders": [ ],
  • "unassignedOrders": [ ],
  • "progress": 100,
  • "info": {
    },
  • "inProgress": false,
  • "settings": {
    }
}

Аналитика по незапланированным заказам

Аналитика по незапланированным заказам

Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Example: 71b11838-f8a9-4986-b9ab-448ecc94305f

Distribution ID

Responses

Response samples

Content type
application/json
{
  • "type": "shortTimeWindowByDuration",
  • "group": "shortTimeWindow",
  • "details": "строка",
  • "orders": [
    ],
  • "executors": [
    ],
  • "transports": [
    ],
  • "hardlinks": null
}

Tags

Создание тега

Метод для создание тега

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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"

Цвет тега

Responses

Request samples

Content type
application/json
{
  • "id": "dOSD8m0XMj0Y9XlyBkD2",
  • "name": "Открыто",
  • "color": "green"
}

Response samples

Content type
application/json
{
  • "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"
}

Получение тегов

Метод для получения тегов

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Получение тега по ID

Метод для получения тега по ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Идентификатор тега

Responses

Response samples

Content type
application/json
{
  • "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

Метод для удаления тега по ID

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 9EQbnyYRf6VVwwQZOQAA

Идентификатор тега

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Обновление тега по ID

Метод для обновления тега по ID

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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"

Цвет тега

Responses

Request samples

Content type
application/json
{
  • "name": "Открыто",
  • "color": "green"
}

Response samples

Content type
application/json
{
  • "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"
}

Roles

Получение ролей

Метод для получения ролей

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "total": 19082
}

Создание роли

Метод для создание роли

Authorizations:
ApiKeyAuth
Request Body schema: application/json
name
required
string

Имя роли

rules
required
Array of arrays

Правила роли

Responses

Request samples

Content type
application/json
{
  • "name": "Employer",
  • "rules": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "name": "Employer",
  • "rules": [
    ],
  • "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

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 43d87097-f16f-4de0-9891-f7bf32a97624

Идентификатор роль

Responses

Response samples

Content type
application/json
{
  • "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "name": "Employer",
  • "rules": [
    ],
  • "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

Authorizations:
ApiKeyAuth
Request Body schema: application/json
name
string

Имя роли

rules
Array of arrays

Правила роли

Responses

Request samples

Content type
application/json
{
  • "name": "Employer",
  • "rules": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "companyId": "FFFF0000-22AA-CC44-66BB-99AACCWWPP11",
  • "name": "Employer",
  • "rules": [
    ],
  • "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

Authorizations:
ApiKeyAuth
path Parameters
id
string
Example: 43d87097-f16f-4de0-9891-f7bf32a97624

Идентификатор роли

Responses

Response samples

Content type
application/json
{
  • "message": "Credentials are required",
  • "code": "CredentialsRequired"
}

Rules

Получение правил

Метод для получения правил

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • "create account"
]