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: 32

Max length: 64

Example: ``

request_id

Type: string

Unique edit request ID (idempotency token)

Min length: 1

Max length: 63

Example: ``

Headers

Name

Description

Accept-Language

Type: string

Preferred response language. Examples: "en" — English

Example: en

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: 1

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": {},
        "weight": 2,
        "cost_value": "2.00",
        "cost_currency": "RUB",
        "quantity": 1,
        "fiscalization": {}
      }
    ]
  }
]

last_known_revision

Type: string

The latest claim version that the customer knows (version obtained from claims/info)

Example: 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: 444D00000000003741

kind

Type: string

Marking type.
Possible values:

  1. compiled — disassembled stamp with dedicated GTIN and Serial.
    Example:
    - 444D00000000003741
  2. gs1_data_matrix_base64 — unit code in GS1 Data Matrix format
    subject to marking using identification.
    Maximum 200 characters.
    The unit code must be entered in full
    by encoding the string in base64 format.

Example: gs1_data_matrix_base64

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.
Must be unique for items delivered from one point.

Example: 20ML50OWKY4FC86

excise

Type: Money

Amount of excise tax

Delivery cost in Decimal(18, 4) format

Pattern: ^-?[0-9]{1,14}(\.[0-9]{0,4})?$

Example: 12.50

item_type

Type: ItemType

Name type: product or service.
Default value: product

Enum: product, service

mark

Type: 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

Example
{
  "kind": "gs1_data_matrix_base64",
  "code": "444D00000000003741"
}

supplier_inn

Type: SupplierInn

Supplier's ITN (10 or 12 digits).

Pattern: ^(\d{10}|\d{12})$

Example: 3664069397

vat_code_str

Type: VatCodeStrApi

VAT rate. Possible values:
vat_none — without VAT.
vat0 — 0% VAT (applied in rare cases).
vat10 — 10% VAT.
vat20 — 20% VAT.

Example: vat_none

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: 3

Max length: 3

Example: RUB

cost_value

Type: string

Price per item in cost_currency.
To insure the cost, enter the actual cargo price

Example: 2.00

droppof_point

Type: integer

ID of the point (int64) to deliver the item to. Differs from the ID in the claim.
It can be any number. Must match the route_points[].point_id value of the destination point

pickup_point

Type: integer

ID of the point (int64) to pick up the item from. Differs from the ID in the claim.
It can be any number. Must match the route_points[].point_id value of the dispatch point

quantity

Type: integer

Number of units (int64)

Min value: 1

title

Type: string

Item name

Example: Plumbus

extra_id

Type: string

Short unique item ID (order number in the claim, usually identical to external_order_id)

Max length: 512

Example: BP-208

fiscalization

Type: ItemFiscalization

Fiscalization information (valid for payment upon receipt)

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"
}

size

Type: 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
Example
{
  "length": 0.1,
  "width": 0.2,
  "height": 0.3
}

weight

Type: number

Item weight in kg. The actual values should be entered in the field.
If the weight isn't added, the order is placed, taking into account the maximum dimensions allowed for the selected rate.
If the actual characteristics of the parcel 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 10 kg
Express: up to 20 kg
Cargo:

  • Small body: up to 300 kg
  • Medium body: up to 700 kg
  • Large body: up to 1400 kg

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: 1

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"
    }
  }
]

kind

Type: string

Change type (change_items)

Const: change_items

Example: change_items

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: 7000

Example: example

kind

Type: string

Change type (change_comment)

Const: change_comment

Example: change_comment

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: Rick

phone

Type: string

Phone number of the contact person

Max length: 30

Pattern: [0-9 \\(\\)\\-\\+]+

Example: +79123456789

email

Type: string

Email is a mandatory parameter for source and return points

Max length: 320

Pattern: \S+@\S+.\S+

Example: example@yandex.ru

phone_additional_code

Type: string

Extension number to call the courier

Example: 602 17 500

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
{
  "name": "Rick",
  "phone": "+79123456789",
  "phone_additional_code": "602 17 500",
  "email": "example@yandex.ru"
}

kind

Type: string

Change type (change_contact)

Const: change_contact

Example: change_contact

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: max_apply_changes

Example: max_apply_changes

message

Type: string

The person understood the error message

Example: Claim changed, refresh the page

404 Not Found

Claim not found

Body

application/json
{
  "code": "not_found",
  "message": "Claim not found"
}

Name

Description

code

Type: string

Error code

Const: not_found

Example: not_found

message

Type: string

Error description

Example: Claim not found

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: old_version

Example: old_version

message

Type: string

The person understood the error message

Example: Claim changed, refresh the page

No longer supported, please use an alternative and newer version.