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, and 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 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:
, 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: |
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 Min items: Max items: |
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: |
id* |
Type: integer<int64> The product ID in the order. It comes in response to a request GET campaigns/{campaignId}/orders/{orderId} — parameter |
slip* |
Type: string Activation instructions. You can use HTML tags to format the text:
Max length: |
code ⦸
|
Type: string Instead, use Using both parameters together will result in an error. The key itself. |
codes |
Type: string[] Keys related to the product. Min items: Max items: 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:
Enum: |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.