Gets order items request information

Gets order items request information. Items adding is asynchronously, as it can take a long time. The user must wait for the operation status to be either success, error or warning.

Request

GET

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

Path parameters

Name

Description

company_id*

Type: integer<int64>

The ID of the company.

order_items_adding_id*

Type: string

The ID of order items request. It is obtained in response to a request to add items to orders.

Responses

200 OK

Information about the asynchronous operation of adding items to orders.

Body

application/json
{
    "status": "queued",
    "error": {
        "error_type": "internal_error",
        "total_error": "string",
        "per_order_errors": [
            {
                "order_id": 0,
                "error_type": "item_numbers_not_unique",
                "description": "string"
            }
        ]
    },
    "warning": {
        "per_order_warnings": [
            {
                "order_id": 0,
                "warning_type": "order_contains_items",
                "description": "string"
            }
        ]
    },
    "updated_at": {
        "value": 0,
        "text": "string"
    },
    "created_at": {
        "value": 0,
        "text": "string"
    }
}

Name

Description

created_at*

Type: OrderItemsAddingResult_created_at

status*

Type: string

Status of request processing. error: if an error occurs with at least one item, the entire request is transferred to the error status, and no items are added to the orders. queued/in_progress: request processing in progress, You must wait several time. warning: request is correct, some warnings was occured, but all items was successfully added to orders. success: all items was successfully added to orders.

Enum: queued, in_progress, success, error, warning

updated_at*

Type: OrderItemsAddingResult_updated_at

error

Type: OrderItemsAddingResultError

Will be presented in case of status = error.

warning

Type: OrderItemsAddingResultWarning

Will be presented in case of status = warning.

OrderItemsAddingResult_created_at

Name

Description

text*

Type: string

The time of request creation, in ISO 8601 format. Example - '2018-09-06T10:15:00+00:00'.

value*

Type: number

UNIX timestamp of request creation.

OrderItemsAddingResult_updated_at

Name

Description

text*

Type: string

The time of request update, in ISO 8601 format. Example - '2018-09-06T10:15:00+00:00'.

value*

Type: number

UNIX timestamp of request update.

OrderItemsAddingResultError

Will be presented in case of status = error.

Name

Description

error_type*

Type: string

The type of error. internal_error: internal error. request_is_not_json: failed to parse request body to JSON format. json_validation_failed: the request does not match the scheme. error_in_items: some item contains errors. duplicate_order_ids: two or more same order_id was specified in request.

Enum: internal_error, request_is_not_json, json_validation_failed, error_in_items, duplicate_order_ids

total_error*

Type: string

Description of error related to the whole request. For exapmple if falied JSON parsing.

per_order_errors

Type: OrderItemsAddingPerOrderError[]

Descriptions of error related to the certain orders.

OrderItemsAddingResultWarning

Will be presented in case of status = warning.

Name

Description

per_order_warnings*

Type: OrderItemsAddingPerOrderWarning[]

Descriptions of warnings related to the certain orders.

OrderItemsAddingPerOrderError

Name

Description

error_type*

Type: string

The type of error.

Enum: item_numbers_not_unique, order_not_found, order_finished, order_partially_finished, order_cancelled, other

order_id*

Type: integer<int64>

The ID of the order.

description

Type: string

Error description.

OrderItemsAddingPerOrderWarning

Name

Description

order_id*

Type: integer<int64>

The ID of the order.

warning_type*

Type: string

Warning type. order_contains_items: the order contains items, they will be replaced with new.

Enum: order_contains_items

description

Type: string

Warning description.

401 Unauthorized

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

403 Forbidden

You do not have access to this object.

422 Unprocessable Entity

Incorrect input.

504 Gateway Timeout

Server error during request processing.