Removing items from an order or reducing their number

The method is available for the DBS model.

If you are using an API Key token, one of the accesses in the list is required to call the method

If you work according to the FBS model

Deletes one or more items from the order if the store cannot deliver them all.

The order must have the status "status": "PROCESSING" the processing stage "substatus": "STARTED". The composition cannot be changed after the transfer of the status "substatus": "READY_TO_SHIP".

Reduce the number of identical products

Pass the updated value in the parameter count.

Delete an item from an order

Pass the value 0 in the parameter count or don't pass it on item.

You cannot delete or reduce the quantity of an item if it:

  • added by special offer;
  • amounts to 99% of the order value;
  • the only product in the order.

In this case, cancel the order in the method PUT campaigns/{campaignId}/orders/{orderId}/status send the order status CANCELLED with the reason for cancellation SHOP_FAILED.

How will the money be refunded

If the customer paid for the product at checkout, the Market will refund the money for the items removed from the order within two days:

  • when paying with a bank card — from the moment when the store transfers the order to the status SHIPPED;

  • when paying via Apple Pay or Google Pay — from the moment when the store removes the product from the order.

, Limit: 100,000 requests per hour

Request

PUT

https://api.partner.market.yandex.ru/campaigns/{campaignId}/orders/{orderId}/items

Path parameters

Name

Description

campaignId*

Type: integer<int64>

The campaign ID.

You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:

  • Modules and APIs → block Sending data to Yandex.Market.
  • Query log → drop-down list in the block Show logs.

, Do not send the store ID instead, which is indicated in the seller's account on the Market next to the store name and in some reports.

Min value: 1

orderId*

Type: integer<int64>

The order ID.

Body

application/json
{
    "items": [
        {
            "id": 0,
            "count": 0,
            "instances": [
                {
                    "cis": "string",
                    "uin": "string",
                    "rnpt": "string",
                    "gtd": "string",
                    "countryCode": "RU"
                }
            ]
        }
    ],
    "reason": "PARTNER_REQUESTED_REMOVE"
}

Name

Description

items*

Type: OrderItemModificationDTO[]

The list of products in the order.

If the store has not provided information about the product in the input data, it will be removed from the order.

Required parameter.
The list of products in the order.

If the store has not provided information about the product in the input data, it will be removed from the order.

Required parameter.

Min items: 1

reason

Type: OrderItemsModificationRequestReasonType

The reason why the order composition has been updated:

  • PARTNER_REQUESTED_REMOVE — the store has deleted the product.
  • USER_REQUESTED_REMOVE — the buyer asked to delete the product.

Enum: PARTNER_REQUESTED_REMOVE, USER_REQUESTED_REMOVE

OrderItemModificationDTO

The list of products in the order.

If the store has not provided information about the product in the input data, it will be removed from the order.

Required parameter.

Name

Description

count*

Type: integer<int32>

The new quantity of the product.

Min value: 0

id*

Type: integer<int64>

The identifier of the product within the order.

You can get the ID using resources GET campaigns/{campaignId}/orders or GET campaigns/{campaignId}/orders/{orderId}.

Required parameter.

instances

Type: BriefOrderItemInstanceDTO[]

Information about the labeling of product units.

In the request, specify all the items to be labeled.

A required parameter if the order from the business contains products that are subject to labeling in the system. "An honest SIGN" or «ASL BELGISI» (for sellers of the Yandex Go Market).
Product unit ID.

Fill in only one field, depending on which system the product is labeled in.

Detailed information about working with labeled goods is provided in the Help of the Market for sellers.

Min items: 1

OrderItemsModificationRequestReasonType

The reason why the order composition has been updated:

  • PARTNER_REQUESTED_REMOVE — the store has deleted the product.
  • USER_REQUESTED_REMOVE — the buyer asked to delete the product.

Type

Description

OrderItemsModificationRequestReasonType

Enum: PARTNER_REQUESTED_REMOVE, USER_REQUESTED_REMOVE

BriefOrderItemInstanceDTO

Product unit ID.

Fill in only one field, depending on which system the product is labeled in.

Detailed information about working with labeled goods is provided in the Help of the Market for sellers.

Name

Description

cis

Type: string

The unit identification code in the system "An honest SIGN" or «ASL BELGISI» (for sellers of the Yandex Go Market).

Do not escape the slash in the separator character code. \u001d

01030410947874432155Qbag!\u001d93Zjqw

01030410947874432155Qbag!\\u001d93Zjqw

Escape slashes and quotation marks in other places according to the JSON rules.: \\ and \"

countryCode

Type: string

The country of manufacture is in the ISO 3166-1 alpha-2 format. How to get

Example: RU

Min length: 2

Max length: 2

Pattern: ^[A-Z]{2}$

gtd

Type: string

Cargo customs declaration.

It is a string of three numbers separated by a slash: XXXXXXXXXX/XXXXXXXX/XXXXXXXX.

The first part is the code of the customs office that registered the declaration for imported goods. Next is the date and number of the declaration.

rnpt

Type: string

The registration number of the product batch.

It is a string of four numbers separated by slashes: XXXXXXXXXX/XXXXXXXX/XXXXXXXX/XXX.

The first part is the code of the customs office that registered the declaration for the shipment. Next is the date, the number of the declaration and the number of the marked product in the declaration.

uin

Type: string

The unique identification number of the jewelry.

It is a 16-digit number.

Responses

200 OK

Yandex. Market has successfully processed your request. No output is expected.

400 Bad Request

The request contains incorrect data. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

ApiErrorDTO

The general error format.

Name

Description

code*

Type: string

The error code.

message

Type: string

Description of the error.

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

401 Unauthorized

The authorization data is not specified in the request. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

403 Forbidden

The authorization data is incorrect or access to the resource is prohibited. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

404 Not Found

The requested resource was not found. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

420 Method Failure

The resource access limit has been exceeded. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

500 Internal Server Error

Internal error of Yandex. Market. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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