Получить категории груза
Порядок работы для агента · Методы API и схема OpenAPI.
Назначение
Получите справочник категорий груза, чтобы указать категорию при подготовке заказа.
Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде
exampleпоказывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.
Request
GET
https://partner-test-yamagistrali.ru/api/dicts/productCategories/v0/productCategoriesGet
Тестовый стенд
Responses
200 OK
OK
Body
application/json
{
"data": {
"categories": [
{
"code": "example",
"title": "example"
}
]
}
}
|
Name |
Description |
|
data |
Type: DictsProductCategoriesV0ProductCategoriesGetResponse Example
|
ProductCategoriesItem
|
Name |
Description |
|
code |
Type: string Example: |
|
title |
Type: string Example: |
Example
{
"code": "example",
"title": "example"
}
DictsProductCategoriesV0ProductCategoriesGetResponse
|
Name |
Description |
|
categories |
Type: ProductCategoriesItem[] | null Example
|
Example
{
"categories": [
{
"code": "example",
"title": "example"
}
]
}
400 Bad Request
Bad Request
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|
Error
|
Name |
Description |
|
info |
Type: object Example
|
|
message |
Type: string Example: |
|
message_code |
Type: string Example: |
Example
{
"info": {},
"message": "example",
"message_code": "example"
}
403 Forbidden
Forbidden
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|
500 Internal Server Error
Internal Server Error
Body
application/json
{
"error": {
"info": {},
"message": "example",
"message_code": "example"
}
}
|
Name |
Description |
|
error |
Type: Error Example
|