Gets order items request validation information

Gets order items request validation information. Validation 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-validations/{order_items_validation_id}

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company.

order_items_validation_id*

Type: string

The ID of order items validation request. It is obtained in response to a request to add a list of items for validation.

Responses

200 OK

Information about the asynchronous validation of the request to add 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<integer>

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<integer>

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

The ID of the order.

description

Type: string

Error description.

OrderItemsAddingPerOrderWarning

Name

Description

order_id*

Type: integer

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

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.