Validation of the courier code
Validation of the code for receiving an order by courier
Request
POST
/platform/orders/{orderId}/codes/validate
Path parameters
|
Name |
Description |
|
orderId |
Type: string The order ID in the external system Example: `` |
Headers
|
Name |
Description |
|
Authorization |
Type: string A token generated on the side of the Yandex Example: `` |
|
Partner-Name |
Type: string Partner name Example: `` |
Body
application/json
{
"code": "example"
}
|
Name |
Description |
|
code |
Type: string The code that needs to be validated Example: |
Responses
200 OK
OK
Body
application/json
{
"is_valid": true,
"validation_attempts_left": 0
}
|
Name |
Description |
|
is_valid |
Type: boolean Validation result. |
|
validation_attempts_left |
Type: integer The number of remaining validation attempts. |
400 Bad Request
Request error
Body
application/json
{
"message": "example",
"code": 0
}
|
Name |
Description |
|
code |
Type: integer Error code |
|
message |
Type: string Erroe message Example: |
403 Forbidden
Access denied
404 Not Found
The place was not found
Body
application/json
{
"message": "example",
"code": 0
}
|
Name |
Description |
|
code |
Type: integer Error code |
|
message |
Type: string Erroe message Example: |
409 Conflict
Conflict. Possible reasons:
- 1001: All validation attempts have been used.
Body
application/json
{
"message": "example",
"code": 0
}
|
Name |
Description |
|
code |
Type: integer Error code |
|
message |
Type: string Erroe message Example: |
500 Internal Server Error
Internal server error
Body
application/json
{
"message": "example",
"code": 0
}
|
Name |
Description |
|
code |
Type: integer Error code |
|
message |
Type: string Erroe message Example: |