Transfer of digital goods keys

The method is available for the DBS model.

Not yet available for Market Yandex Go sellers.

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

Transfers the keys of the digital goods that the buyer ordered and paid for. After completing the request, yandex.Market will send him an email with the keys and activation instructions. If the email is delivered, yandex.Market will transfer the order to the final status. DELIVERED.

After sending the code to the buyer, the order status will not change immediately.

Enable API notifications, and yandex.Market will send you a request. POST notification When the order status changes to DELIVERED.

How to work with notifications

The key must be transferred within 30 minutes after the order status changes. PROCESSING.

If one order includes several keys, send them all in one request.

Each product has a unique id pass it as a separate element in the array. items, and the product keys are in the array codes.

Example
{
  "items": [
    {
      "id": 1,
      "codes": [
        "code1", "code2", "code3"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    },
    {
      "id": 2,
      "codes": [
        "code4", "code5", "code6"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    }
  ]
}

Products with the same id you can also pass different elements in the array. items.

Example
{
  "items": [
    {
      "id": 1,
      "codes": [
        "code1", "code2"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    },
    {
      "id": 1,
      "codes": [
        "code3"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    }
  ]
}
, Limit: 100,000 requests per hour

Request

POST

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

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,
            "code": "string",
            "codes": [
                "string"
            ],
            "slip": "string",
            "activate_till": "string"
        }
    ]
}

Name

Description

items*

Type: OrderDigitalItemDTO[]

The list of products sold.

If there are several items in the order identical products (for example, multiple keys to the same subscription), pass the keys as an array to this product. Parameter id these elements should have the same one.
A digital product.

Min items: 1

Max items: 100

OrderDigitalItemDTO

A digital product.

Name

Description

activate_till*

Type: string<date>

The date before which you need to activate the keys. If the keys are valid indefinitely, specify any date in the distant future.

Date format: YYYY-MM-DD.

id*

Type: integer<int64>

The product ID in the order.

It comes in response to a request GET campaigns/{campaignId}/orders/{orderId} — parameter id in items.

slip*

Type: string

Activation instructions.

You can use HTML tags to format the text:

  • <h>, <h1>, <h2> and so on — for headings;
  • <br> and <p> — for line breaks.
  • <ol> — for a numbered list.
  • <ul> — for a bulleted list.
  • <li> — to create list items (must be inside <ol> or <ul>);
  • <div> — supported, but does not affect the text display.

Max length: 10000

code

Type: string

Instead, use codes

Using both parameters together will result in an error.

The key itself.

codes

Type: string[]

Keys related to the product.

Min items: 1

Max items: 5000

Unique items  

Responses

200 OK

An empty answer.

The 200 response by itself does not mean that the keys have been transferred to the buyer.

If the email with the keys was delivered, yandex.Market will transfer the order to the final status. DELIVERED.

The order status can be found using the method GET campaigns/{campaignId}/orders/{orderId} or GET campaigns/{campaignId}/orders.

Body

application/json
{
    "status": "OK"
}

Name

Description

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

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

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.

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 in 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.