Введение
Документация к API
Документация к основным системам
Аутентификация
Для аутентификации запросов включите заголовок Authorization в форме "Bearer {token}".
Все конечные точки, требующие аутентификации, помечены значком requires authentication в документации ниже.
Для доступа к API необходимо получить ключ доступа у администратора системы.
Грузы
Получить список грузов
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v2/pb/cargos"
);
const params = {
"limit": "1",
"offset": "0",
"sort": "-updated_at",
"filter[price]": "100000",
"filter[truck_types][0]": "1",
"filter[load_types][0]": "1",
"filter[weight]": "1000",
"filter[volume]": "50.5",
"filter[distance]": "100",
"filter[start_point_id]": "1",
"filter[start_point_type]": "2",
"filter[start_point_radius]": "10",
"filter[finish_point_id]": "1",
"filter[finish_point_type]": "2",
"filter[finish_point_radius]": "10",
"filter[type]": "auction",
"filter[wv]": "20-83",
"filter[load_date]": "2024-04-04 09:52:38",
"filter[unload_date]": "2024-04-04 09:52:38",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v2/pb/cargos?limit=1&offset=0&sort=-updated_at&filter%5Bprice%5D=100000&filter%5Btruck_types%5D[]=1&filter%5Bload_types%5D[]=1&filter%5Bweight%5D=1000&filter%5Bvolume%5D=50.5&filter%5Bdistance%5D=100&filter%5Bstart_point_id%5D=1&filter%5Bstart_point_type%5D=2&filter%5Bstart_point_radius%5D=10&filter%5Bfinish_point_id%5D=1&filter%5Bfinish_point_type%5D=2&filter%5Bfinish_point_radius%5D=10&filter%5Btype%5D=auction&filter%5Bwv%5D=20-83&filter%5Bload_date%5D=2024-04-04+09%3A52%3A38&filter%5Bunload_date%5D=2024-04-04+09%3A52%3A38" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
{
"data": [
{
"id": null,
"uuid": null,
"status": "open",
"auction": null,
"type": "auction",
"price": 10000000,
"price_vat": 8333333,
"price_carrier": 8799995,
"price_carrier_vat": 8799995,
"weight": 20000,
"volume": 82,
"route": {
"distance": 0,
"price_per_km": 0,
"price_per_km_carrier": 0,
"platon_road_length": 0,
"platon_price": 0,
"travel_time": 0
},
"size": {
"height": 0,
"length": 0,
"width": 0,
"diameter": 0
},
"payment": {
"type": "original",
"prepay": 0,
"vat": 20,
"prepay_in_fuel": false,
"tax_rate": 20,
"credit_score": 0,
"payday": 0,
"pay_on_unload": false,
"bargain": false,
"hide_responses": true,
"cargo_price": 0,
"advance_amount": 0,
"advance_percent": 0,
"margin_percent": 0
},
"truck": {
"tir": false,
"cmr": false,
"t1": false,
"quantity": 1,
"belt_count": 0,
"place_count": 0,
"pallet_count": 0,
"san_passport": false,
"medical_book": false,
"coupling": false,
"koniki": false,
"temperature_from": null,
"temperature_to": null,
"adr": 0,
"height": 0,
"length": 0,
"width": 0,
"weight": 0,
"volume": 0
},
"extra": {
"note": null
},
"load_first_date": null,
"load_last_date": null,
"unload_first_date": null,
"unload_last_date": null,
"created_at": null,
"updated_at": null,
"publication_at": "2024-04-04T09:52:38.000000Z",
"export_disabled_at": null,
"export_enabled_at": null
},
{
"id": null,
"uuid": null,
"status": "open",
"auction": null,
"type": "express",
"price": 10000000,
"price_vat": 8333333,
"price_carrier": 8799995,
"price_carrier_vat": 8799995,
"weight": 20000,
"volume": 82,
"route": {
"distance": 0,
"price_per_km": 0,
"price_per_km_carrier": 0,
"platon_road_length": 0,
"platon_price": 0,
"travel_time": 0
},
"size": {
"height": 0,
"length": 0,
"width": 0,
"diameter": 0
},
"payment": {
"type": "original",
"prepay": 0,
"vat": 20,
"prepay_in_fuel": false,
"tax_rate": 20,
"credit_score": 0,
"payday": 0,
"pay_on_unload": false,
"bargain": false,
"hide_responses": true,
"cargo_price": 0,
"advance_amount": 0,
"advance_percent": 0,
"margin_percent": 0
},
"truck": {
"tir": false,
"cmr": false,
"t1": false,
"quantity": 1,
"belt_count": 0,
"place_count": 0,
"pallet_count": 0,
"san_passport": false,
"medical_book": false,
"coupling": false,
"koniki": false,
"temperature_from": null,
"temperature_to": null,
"adr": 0,
"height": 0,
"length": 0,
"width": 0,
"weight": 0,
"volume": 0
},
"extra": {
"note": null
},
"load_first_date": null,
"load_last_date": null,
"unload_first_date": null,
"unload_last_date": null,
"created_at": null,
"updated_at": null,
"publication_at": "2024-04-04T09:52:38.000000Z",
"export_disabled_at": null,
"export_enabled_at": null,
"pack_type": {
"id": 2,
"name": "другое"
}
}
]
}
Received response:
Request failed with error:
Получить груз
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v2/pb/cargos/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"external_id": "9472d68e-418d-4f22-af16-eb33667309d2",
"pack_type_id": 1,
"cargo_type_id": 1,
"cargo_type": "Свой тип груза",
"money_type_id": 1,
"currency_id": 1,
"load_types": [
1
],
"unload_types": [
1
],
"type": "express",
"price": 10000000,
"weight": 10000000,
"volume": 82
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v2/pb/cargos/18" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"external_id\": \"9472d68e-418d-4f22-af16-eb33667309d2\",
\"pack_type_id\": 1,
\"cargo_type_id\": 1,
\"cargo_type\": \"Свой тип груза\",
\"money_type_id\": 1,
\"currency_id\": 1,
\"load_types\": [
1
],
\"unload_types\": [
1
],
\"type\": \"express\",
\"price\": 10000000,
\"weight\": 10000000,
\"volume\": 82
}"
Example response (200):
{
"data": {
"id": null,
"uuid": null,
"status": "open",
"auction": null,
"type": "express",
"price": 10000000,
"price_vat": 8333333,
"price_carrier": 8799995,
"price_carrier_vat": 8799995,
"weight": 20000,
"volume": 82,
"route": {
"distance": 0,
"price_per_km": 0,
"price_per_km_carrier": 0,
"platon_road_length": 0,
"platon_price": 0,
"travel_time": 0
},
"size": {
"height": 0,
"length": 0,
"width": 0,
"diameter": 0
},
"payment": {
"type": "original",
"prepay": 0,
"vat": 20,
"prepay_in_fuel": false,
"tax_rate": 20,
"credit_score": 0,
"payday": 0,
"pay_on_unload": false,
"bargain": false,
"hide_responses": true,
"cargo_price": 0,
"advance_amount": 0,
"advance_percent": 0,
"margin_percent": 0
},
"truck": {
"tir": false,
"cmr": false,
"t1": false,
"quantity": 1,
"belt_count": 0,
"place_count": 0,
"pallet_count": 0,
"san_passport": false,
"medical_book": false,
"coupling": false,
"koniki": false,
"temperature_from": null,
"temperature_to": null,
"adr": 0,
"height": 0,
"length": 0,
"width": 0,
"weight": 0,
"volume": 0
},
"extra": {
"note": null
},
"load_first_date": null,
"load_last_date": null,
"unload_first_date": null,
"unload_last_date": null,
"created_at": null,
"updated_at": null,
"publication_at": "2024-04-04T09:52:38.000000Z",
"export_disabled_at": null,
"export_enabled_at": null
}
}
Received response:
Request failed with error:
Справочники
Валюты
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/currencies"
);
const params = {
"filter[name]": "14",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/currencies?filter%5Bname%5D=14&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 5
},
"data": [
{
"id": 1,
"name": "руб",
"vat": 20
}
]
}
Received response:
Request failed with error:
Страны
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/countries"
);
const params = {
"filter[name]": "15",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/countries?filter%5Bname%5D=15&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 89
},
"data": [
{
"id": 1,
"name": "Россия"
}
]
}
Received response:
Request failed with error:
Регионы
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/regions"
);
const params = {
"filter[name]": "14",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/regions?filter%5Bname%5D=14&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 707
},
"data": [
{
"id": 1,
"name": "Московская область"
}
]
}
Received response:
Request failed with error:
Города
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/cities"
);
const params = {
"filter[name]": "Моск",
"filter[fias]": "laborum",
"filter[country_id]": "exercitationem",
"filter[region_id]": "ut",
"include": "region",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/cities?filter%5Bname%5D=%D0%9C%D0%BE%D1%81%D0%BA&filter%5Bfias%5D=laborum&filter%5Bcountry_id%5D=exercitationem&filter%5Bregion_id%5D=ut&include=region&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 56073
},
"data": [
{
"id": 1,
"name": "Москва",
"fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
"latitude": 55.750446,
"longitude": 37.617494,
"region": {
"id": 54,
"name": "Москва (регион)"
}
}
]
}
Received response:
Request failed with error:
Ближайшие города
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/cities/nearest"
);
const params = {
"latitude": "55.753559",
"longitude": "37.609218",
"name": "моск",
"radius": "10",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/cities/nearest?latitude=55.753559&longitude=37.609218&name=%D0%BC%D0%BE%D1%81%D0%BA&radius=10&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 1
},
"data": [
{
"id": 1,
"name": "Москва",
"fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
"latitude": 55.750446,
"longitude": 37.617494
}
]
}
Received response:
Request failed with error:
Типы кузовов
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/truck_types"
);
const params = {
"filter[name]": "7",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/truck_types?filter%5Bname%5D=7&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 67
},
"data": [
{
"id": 17,
"name": "реф",
"short_name": "реф"
}
]
}
Received response:
Request failed with error:
Тип оплаты
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/money_types"
);
const params = {
"filter[name]": "14",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/money_types?filter%5Bname%5D=14&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 3
},
"data": [
{
"id": 1,
"name": "б/нал без НДС"
}
]
}
Received response:
Request failed with error:
Типы упаковок
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/pack_types"
);
const params = {
"filter[name]": "10",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/pack_types?filter%5Bname%5D=10&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 19
},
"data": [
{
"id": 1,
"name": "не указано"
}
]
}
Received response:
Request failed with error:
Типы грузов
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/cargo_types"
);
const params = {
"filter[name]": "5",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/cargo_types?filter%5Bname%5D=5&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 110
},
"data": [
{
"id": 77,
"name": "тнп"
}
]
}
Received response:
Request failed with error:
Типы загрузок
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/load_types"
);
const params = {
"filter[name]": "4",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/load_types?filter%5Bname%5D=4&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 65
},
"data": [
{
"id": 17,
"name": "боковая",
"short_name": "боковая"
}
]
}
Received response:
Request failed with error:
Марки машин
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/vehicles"
);
const params = {
"filter[name]": "3",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/vehicles?filter%5Bname%5D=3&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 0
},
"data": []
}
Received response:
Request failed with error:
Дополнительные условия
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/additional-conditions"
);
const params = {
"filter[name]": "6",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/additional-conditions?filter%5Bname%5D=6&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 5
},
"data": [
{
"id": 1,
"name": "Температурный режим"
}
]
}
Received response:
Request failed with error:
Additional Equipments
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/additional-equipments"
);
const params = {
"filter[name]": "8",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/additional-equipments?filter%5Bname%5D=8&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 6
},
"data": [
{
"id": 1,
"name": "Коники"
}
]
}
Received response:
Request failed with error:
Точки загрузки и выгрузки
requires authentication
Example request:
const url = new URL(
"https://api.cargotech.pro/v1/dictionaries/points"
);
const params = {
"filter[name]": "10",
"limit": "1",
"offset": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://api.cargotech.pro/v1/dictionaries/points?filter%5Bname%5D=10&limit=1&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"meta": {
"offset": 0,
"limit": 1,
"size": 0
},
"data": []
}
Received response:
Request failed with error: