Edit a claim after confirmation
The method enables you to change some parameters of the claim after it is confirmed
Request
POST
b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/apply-changes/request
Service URL
Query parameters
|
Name |
Description |
|
claim_id |
Type: string Claim ID received at the claim creation stage Min length: Max length: Example: `` |
|
request_id |
Type: string Unique edit request ID (idempotency token) Min length: Max length: Example: `` |
Headers
|
Name |
Description |
|
Accept-Language |
Type: string Preferred response language. Examples: "en" — English Example: |
Body
application/json
{
"last_known_revision": "example",
"changes": [
{
"kind": "change_items",
"pickup_point_id": 1,
"dropoff_point_id": 2,
"items": [
{}
]
}
]
}
|
Name |
Description |
|
changes |
Type: ChangeRequest[] A set of changes to the claim (the entire set or nothing will apply). Min items: Example
|
|
last_known_revision |
Type: string The latest claim version that the customer knows (version obtained from claims/info) Example: |
CargoItemSizes
Unit dimensions in meters. The actual values should be added to the fields.
If the dimensions aren't added, the order is placed, taking into account the maximum dimensions allowed for the selected rate.
If the actual characteristics of the unit exceed the allowed dimensions, the courier has the right to refuse to fulfill the order on site.
In this case, the minimum fee will be withheld.
Courier: up to 0.80 m × 0.50 m × 0.50 м
Express: up to 1.00 m × 0.60 m × 0.50 m
Cargo:
- Small body: up to 1.70 m × 0.96 m × 0.90 m
- Medium body: up to 2.60 m × 1.30 m × 1.50 m
- Large body: up to 3.80 m × 1.80 m × 1.80 m
|
Name |
Description |
|
height |
Type: number Height in meters |
|
length |
Type: number Length in meters |
|
width |
Type: number Width in meters |
Example
{
"length": 0.1,
"width": 0.2,
"height": 0.3
}
Currency
Three-digit code of the payment currency
Type: string
Min length: 3
Max length: 3
Example: RUB
Money
Delivery cost in Decimal(18, 4) format
Type: string
Pattern: ^-?[0-9]{1,14}(\.[0-9]{0,4})?$
Example: 12.50
VatCodeStrApi
VAT rate. Possible values:
vat_none — without VAT.
vat0 — 0% VAT (applied in rare cases).
vat10 — 10% VAT.
vat20 — 20% VAT.
Type: string
Example: vat_none
SupplierInn
Supplier's ITN (10 or 12 digits).
Type: string
Pattern: ^(\d{10}|\d{12})$
Example: 3664069397
ItemArticle
Item SKU.
Must be unique for items delivered from one point.
Type: string
Example: 20ML50OWKY4FC86
ItemMark
Unique item code (control identification sign). Valid for Russia.
If items have a unique code, a separate block must be created for each of them
|
Name |
Description |
|
code |
Type: string Unit marking code in accordance with the format ''kind'' Example: |
|
kind |
Type: string Marking type.
Example: |
Example
{
"kind": "gs1_data_matrix_base64",
"code": "444D00000000003741"
}
ItemType
Name type: product or service.
Default value: product
Type: string
Enum: product, service
ItemFiscalization
Fiscalization information (valid for payment upon receipt)
|
Name |
Description |
|
article |
Type: ItemArticle Item SKU. Example: |
|
excise |
Type: Money Amount of excise tax Delivery cost in Decimal(18, 4) format Pattern: Example: |
|
item_type |
Type: ItemType Name type: product or service. Enum: |
|
mark |
Type: ItemMark Unique item code (control identification sign). Valid for Russia. Example
|
|
supplier_inn |
Type: SupplierInn Supplier's ITN (10 or 12 digits). Pattern: Example: |
|
vat_code_str |
Type: VatCodeStrApi VAT rate. Possible values: Example: |
Example
{
"excise": "12.50",
"vat_code_str": "vat_none",
"supplier_inn": "3664069397",
"article": "20ML50OWKY4FC86",
"mark": {
"kind": "gs1_data_matrix_base64",
"code": "444D00000000003741"
},
"item_type": "product"
}
V2CargoItem
|
Name |
Description |
|
cost_currency |
Type: Currency Three-digit code of the payment currency Min length: Max length: Example: |
|
cost_value |
Type: string Price per item in cost_currency. Example: |
|
droppof_point |
Type: integer ID of the point (int64) to deliver the item to. Differs from the ID in the claim. |
|
pickup_point |
Type: integer ID of the point (int64) to pick up the item from. Differs from the ID in the claim. |
|
quantity |
Type: integer Number of units (int64) Min value: |
|
title |
Type: string Item name Example: |
|
extra_id |
Type: string Short unique item ID (order number in the claim, usually identical to external_order_id) Max length: Example: |
|
fiscalization |
Type: ItemFiscalization Fiscalization information (valid for payment upon receipt) Example
|
|
size |
Type: CargoItemSizes Unit dimensions in meters. The actual values should be added to the fields.
Example
|
|
weight |
Type: number Item weight in kg. The actual values should be entered in the field.
|
Example
{
"extra_id": "BP-208",
"pickup_point": 1,
"droppof_point": 2,
"title": "Plumbus",
"size": {
"length": 0.1,
"width": 0.2,
"height": 0.3
},
"weight": 2,
"cost_value": "2.00",
"cost_currency": "RUB",
"quantity": 1,
"fiscalization": {
"excise": "12.50",
"vat_code_str": "vat_none",
"supplier_inn": "3664069397",
"article": "20ML50OWKY4FC86",
"mark": {
"kind": "gs1_data_matrix_base64",
"code": "444D00000000003741"
},
"item_type": "product"
}
}
ChangeItemsRequest
Request to change a list of items in the order
|
Name |
Description |
|
dropoff_point_id |
Type: integer ID of the destination point where a list of items is changed (int64) |
|
items |
Type: V2CargoItem[] A new list of items for this combination of points Min items: Example
|
|
kind |
Type: string Change type (change_items) Const: Example: |
|
pickup_point_id |
Type: integer ID of the dispatch point where a list of items is changed (int64) |
Example
{
"kind": "change_items",
"pickup_point_id": 1,
"dropoff_point_id": 2,
"items": [
{
"extra_id": "BP-208",
"pickup_point": 1,
"droppof_point": 2,
"title": "Plumbus",
"size": {
"length": 0.1,
"width": 0.2,
"height": 0.3
},
"weight": 2,
"cost_value": "2.00",
"cost_currency": "RUB",
"quantity": 1,
"fiscalization": {
"excise": "12.50",
"vat_code_str": "vat_none",
"supplier_inn": "3664069397",
"article": "20ML50OWKY4FC86",
"mark": {
"kind": "gs1_data_matrix_base64",
"code": "444D00000000003741"
},
"item_type": "product"
}
}
]
}
ChangeCommentRequest
Request to change a comment at the route point
|
Name |
Description |
|
comment |
Type: string A new comment at the point Max length: Example: |
|
kind |
Type: string Change type (change_comment) Const: Example: |
|
point_id |
Type: integer ID of the point for which a comment is changed (int64) |
Example
{
"kind": "change_comment",
"point_id": 1,
"comment": "example"
}
ContactOnPoint
Information about the contact person
|
Name |
Description |
|
name |
Type: string Name of the contact person Example: |
|
phone |
Type: string Phone number of the contact person Max length: Pattern: Example: |
|
|
Type: string Email is a mandatory parameter for source and return points Max length: Pattern: Example: |
|
phone_additional_code |
Type: string Extension number to call the courier Example: |
Example
{
"name": "Rick",
"phone": "+79123456789",
"phone_additional_code": "602 17 500",
"email": "example@yandex.ru"
}
ChangeContactRequest
Request to change the contact person at the point
|
Name |
Description |
|
contact |
Type: ContactOnPoint Information about the contact person Example
|
|
kind |
Type: string Change type (change_contact) Const: Example: |
|
point_id |
Type: integer ID of the point where the contact person is changed (int64) |
Example
{
"kind": "change_contact",
"point_id": 1,
"contact": {
"name": "Rick",
"phone": "+79123456789",
"phone_additional_code": "602 17 500",
"email": "example@yandex.ru"
}
}
ChangeRequest
One of 3 types
-
Type: ChangeItemsRequest
Request to change a list of items in the order
Example
{ "kind": "change_items", "pickup_point_id": 1, "dropoff_point_id": 2, "items": [ { "extra_id": "BP-208", "pickup_point": 1, "droppof_point": 2, "title": "Plumbus", "size": { "length": 0.1, "width": 0.2, "height": 0.3 }, "weight": 2, "cost_value": "2.00", "cost_currency": "RUB", "quantity": 1, "fiscalization": { "excise": "12.50", "vat_code_str": "vat_none", "supplier_inn": "3664069397", "article": "20ML50OWKY4FC86", "mark": { "kind": "gs1_data_matrix_base64", "code": "444D00000000003741" }, "item_type": "product" } } ] } -
Type: ChangeCommentRequest
Request to change a comment at the route point
Example
{ "kind": "change_comment", "point_id": 1, "comment": "example" } -
Type: ChangeContactRequest
Request to change the contact person at the point
Example
{ "kind": "change_contact", "point_id": 1, "contact": { "name": "Rick", "phone": "+79123456789", "phone_additional_code": "602 17 500", "email": "example@yandex.ru" } }
Example
{
"kind": "change_items",
"pickup_point_id": 1,
"dropoff_point_id": 2,
"items": [
{
"extra_id": "BP-208",
"pickup_point": 1,
"droppof_point": 2,
"title": "Plumbus",
"size": {
"length": 0.1,
"width": 0.2,
"height": 0.3
},
"weight": 2,
"cost_value": "2.00",
"cost_currency": "RUB",
"quantity": 1,
"fiscalization": {
"excise": "12.50",
"vat_code_str": "vat_none",
"supplier_inn": "3664069397",
"article": "20ML50OWKY4FC86",
"mark": {},
"item_type": "product"
}
}
]
}
Responses
200 OK
OK
400 Bad Request
Limit on the maximum number of apply-changes request calls reached
Body
application/json
{
"code": "max_apply_changes",
"message": "Claim changed, refresh the page"
}
|
Name |
Description |
|
code |
Type: string Error code Const: Example: |
|
message |
Type: string The person understood the error message Example: |
404 Not Found
Claim not found
Body
application/json
{
"code": "not_found",
"message": "Claim not found"
}
|
Name |
Description |
|
code |
Type: string Error code Const: Example: |
|
message |
Type: string Error description Example: |
409 Conflict
The entered request revision is outdated. You need to update the data via claims/info.
Body
application/json
{
"code": "old_version",
"message": "Claim changed, refresh the page"
}
|
Name |
Description |
|
code |
Type: string Error code Const: Example: |
|
message |
Type: string The person understood the error message Example: |
No longer supported, please use an alternative and newer version.