Adds order items request for procesing

Adds order items request for procesing. In case of success, specified items will be added to specified orders. You can get information about the request processing using a GET /api/v1/companies/{company_id}/orders/-/items-addings/{order_items_adding_id}.

Request

POST

https://courier.yandex.ru/api/v1/companies/{company_id}/orders/-/items-addings

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company.

Body

application/json
[
    {
        "order_id": 0,
        "order_items": [
            {
                "number": "string",
                "description": "string",
                "price": "string",
                "total_count": 0,
                "code": "string"
            }
        ]
    }
]

OrderItemsPostRequest[]

OrderItemsPostRequest

Name

Description

order_id*

Type: integer

The ID of the order.

order_items*

Type: OrderItemsPostRequestElem[]

Min items: 1

OrderItemsPostRequestElem

Name

Description

description*

Type: string

Description of the item.

Max length: 1023

number*

Type: string

Item number. It is the identifier of the item created by client. Must be unique within a single order.

Min length: 1

Max length: 80

price*

Type: string

Цена одной единицы товара.

Pattern: ^(0<code>&#124;</code>[1-9][0-9]*)(\.[0-9]{1,4})?$

total_count*

Type: integer

Общее количество товаров.

Min value: 1

Max value: 2147483647

code

Type: string

Code, necessary for grouping same order items.

Max length: 300

Responses

202 Accepted

Request successfully queued.

Body

application/json
{
    "order_items_adding_id": "string",
    "message": "string"
}

Name

Description

message*

Type: string

Human-readable description of request result.

order_items_adding_id*

Type: string

The ID of add items request.

400 Bad Request

Deprecated

Invalid parameters were passed.

401 Unauthorized

Deprecated

Authorization failed. Send the correct OAuth token in the authorization header.

403 Forbidden

Deprecated

You do not have access to this object.

422 Unprocessable Entity

Deprecated

Incorrect input.

504 Gateway Timeout

Deprecated

Server error during request processing.