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
- inventory-and-order-processing — Order processing and inventory
- all-methods — Full account management
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.
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 The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction. 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:
⚠️ Do not confuse it with:
Min value: |
|
orderId |
Type: integer The order ID. |
Body
application/json
{
"items": [
{
"id": 0,
"code": "example",
"codes": [
"example"
],
"slip": "example",
"activate_till": "2025-01-01"
}
]
}
|
Name |
Description |
||||||||||
|
items |
Type: object[]
The list of products sold. For a product with the same Min items: Max items: Example
|
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.
The order status can be found using the method POST v1/businesses/{businessId}/orders.
Body
application/json
{
"status": "OK"
}
Type: object
400 Bad Request
The request contains incorrect data. Learn more about errors when working with orders
Body
application/json
{
"status": "OK"
}
Type: object
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
500 Internal Server Error
Internal error of the Market. More information about the error
Body
application/json
{
"status": "OK"
}
Type: object
pathParams:
- description: "The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.\n\nYou can find it using a query [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md) 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**:\n\n* block **Campaign ID**;\n* tab **Query log** → drop-down list in the block **Show logs**.\n\n⚠️ Do not confuse it with:\n- the store's identifier, which is displayed in the merchant's personal account.\n- advertising campaigns.\n"
name: campaignId
in: path
required: true
schema:
type: integer
format: int64
minimum: 1
- description: The order ID.
name: orderId
in: path
required: true
schema:
type: integer
format: int64
searchParams: []
headers: []
body: |-
{
"items": [
{
"id": 0,
"code": "example",
"codes": [
"example"
],
"slip": "example",
"activate_till": "2025-01-01"
}
]
}
schema:
description: Request for the transfer of digital goods keys.
type: object
required:
- items
properties:
items:
description: >
The list of products sold.
For a product with the same `id` pass a single element
and an array `codes` by the number of keys.
type: array
minItems: 1
maxItems: 100
items:
description: A digital product.
type: object
required:
- id
- slip
- activate_till
properties:
id:
description: "The product ID in the order.\n\nIt comes in the response of the method [POST\_v1/businesses/{businessId}/orders](../../reference/orders/getBusinessOrders.md) — parameter `id` in `items`.\n"
type: integer
format: int64
code:
description: |
{% note warning "Instead, use `codes`" %}
Using both parameters together will result in an error.
{% endnote %}
The key itself.
type: string
deprecated: true
x-hidden: true
codes:
description: |
Keys related to the product.
The field must be filled in.
type: array
items:
type: string
minItems: 1
maxItems: 5000
uniqueItems: true
nullable: true
slip:
description: >
Activation instructions.
You can use HTML tags to format the text:
* \<h>, \<h1>, \<h2> and so on — for headlines;
* \<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> — It is supported, but it does not affect
the text display.
type: string
maxLength: 10000
activate_till:
description: >
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`.
type: string
format: date
bodyType: application/json
method: post
security:
- type: apiKey
name: 'Api-Key'
in: header
- type: oauth2
x-inline: true
flows:
implicit:
authorizationUrl: https://oauth.yandex.ru/authorize
scopes:
market:partner-api: API Яндекс.Маркета / Поиска по товарам для партнеров
path: v2/campaigns/{campaignId}/orders/{orderId}/deliverDigitalGoods
host: https://api.partner.market.yandex.ru
No longer supported, please use an alternative and newer version.