Получить доступные организации с ролью заказчика
Порядок работы для агента · Методы API и схема OpenAPI.
Назначение
Получите организации с ролью заказчика, от имени которых можно создать заказ. Выберите организацию в data.items и передайте её id в data.forwarder.forwarderId при создании заказа.
Блоки запроса и ответов ниже сгенерированы из OpenAPI. Подстановки вроде
exampleпоказывают структуру JSON. Для вызова возьмите значения из сценария, справочников или предыдущих ответов API.
Request
GET
https://partner-test-yamagistrali.ru/api/orders/v0/transferOrder/forwarder/allow
Тестовый стенд
Responses
200 OK
OK
Body
application/json
{
"data": {
"items": [
{
"country": "example",
"defaultCurrency": "example",
"dropPartnerFailOnCreateOrder": true,
"id": "example",
"legalAddress": "example",
"legalType": "example",
"name": "example",
"orderDefaultIsNotVatPayer": true,
"orderDefaultVat": 0.5,
"phone": "example",
"ruEdoEnabled": true,
"tin": "example"
}
]
}
}
|
Name |
Description |
|
data |
Type: OrderAllowedForwardersResponse Example
|
OrderAllowedForwardersUserAllowRespItem
|
Name |
Description |
|
country |
Type: string Example: |
|
id |
Type: string Example: |
|
legalType |
Type: string Example: |
|
name |
Type: string Example: |
|
tin |
Type: string Example: |
|
defaultCurrency |
Type: string | null Example: |
|
dropPartnerFailOnCreateOrder |
Type: boolean | null |
|
legalAddress |
Type: string | null Example: |
|
orderDefaultIsNotVatPayer |
Type: boolean | null |
|
orderDefaultVat |
Type: number | null |
|
phone |
Type: string | null Example: |
|
ruEdoEnabled |
Type: boolean | null |
Example
{
"country": "example",
"defaultCurrency": "example",
"dropPartnerFailOnCreateOrder": true,
"id": "example",
"legalAddress": "example",
"legalType": "example",
"name": "example",
"orderDefaultIsNotVatPayer": true,
"orderDefaultVat": 0.5,
"phone": "example",
"ruEdoEnabled": true,
"tin": "example"
}
OrderAllowedForwardersResponse
|
Name |
Description |
|
items |
Type: OrderAllowedForwardersUserAllowRespItem[] | null Example
|
Example
{
"items": [
{
"country": "example",
"defaultCurrency": "example",
"dropPartnerFailOnCreateOrder": true,
"id": "example",
"legalAddress": "example",
"legalType": "example",
"name": "example",
"orderDefaultIsNotVatPayer": true,
"orderDefaultVat": 0.5,
"phone": "example",
"ruEdoEnabled": true,
"tin": "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
|