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 — 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 — 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"
    }
  ]
}
⚙️ Limit: 100,000 requests per hour

Request

POST

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

Path parameters

Name

Description

campaignId*

Type: integer<int64>

The store's campaign ID.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market — click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ It does not match the store's ID (which is indicated in the merchant's account on the Market next to the store's name and in some reports). It is linked to the store one-to-one. Does not apply to advertising campaigns.

Min value: 1

orderId*

Type: integer<int64>

The order ID.

Body

application/json
{
    "items": [
        {
            "id": 0,
            "codes": [
                "string"
            ],
            "slip": "string",
            "activate_till": "string"
        }
    ]
}

Name

Description

items*

Type: object[]

A list of products sold.

For a product with the same id pass a single element and an array codes by the number of keys.
A digital product.

Min items: 1

Max items: 100

Responses

200 OK

An empty answer.

Answer 200 By itself, it 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.

You can find out the order status using one of the following methods:

Body

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

Name

Description

status*

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • 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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • 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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • 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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

500 Internal Server Error

Internal error of the Market. More information about the error

Body

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

Name

Description

errors

Type: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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