数码商品钥匙的转让

方法适用于模式DBS.

目前不适用于卖家Market Yandex Go.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

转让买方订购并支付的数字商品的密钥。 完成请求后,yandex的。Market将向他发送一封电子邮件,其中包含密钥和激活说明。 如果电子邮件交付,yandex的。市场将把订单转移到最终状态. DELIVERED.

将代码发送给买家后,订单状态不会立即更改。

启用API通知 — 燕基科斯.Market会向您发送请求。 POST notification 当订单状态更改为 DELIVERED.

如何使用通知

密钥必须在订单状态更改后30分钟内转移。 PROCESSING.

如果一个订单包含多个密钥,请在一个请求中发送所有密钥。

每个产品都有一个独特的 id 将其作为数组中的单独元素传递。 items,以及产品密钥 — 在阵列中 codes.

例子:
{
  "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"
    }
  ]
}

同的产品 id 您还可以在数组中传递不同的元素。 items.

例子:
{
  "items": [
    {
      "id": 1,
      "codes": [
        "code1", "code2"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    },
    {
      "id": 1,
      "codes": [
        "code3"
      ],
      "slip": "slip",
      "activate_till": "2025-02-18"
    }
  ]
}
⚙️ 限制: 每小时100,000次请求

Request

POST

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

Path parameters

Name

Description

campaignId*

Type: integer<int64>

活动ID。

您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:

  • 运动ID;
  • 标签 查询日志 →块中的下拉列表 显示日志.

⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。

Min value: 1

orderId*

Type: integer<int64>

的订单ID。

Body

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

Name

Description

items*

Type: OrderDigitalItemDTO[]

售出的产品清单。

如果订单包含多个相同产品(例如,同一订阅的多个密钥),请将密钥作为数组传递到此产品。 参数 id 这些元素应该具有相同的元素。
一个数字产品。

Min items: 1

Max items: 100

OrderDigitalItemDTO

一个数字产品。

Name

Description

activate_till*

Type: string<date>

您需要激活密钥的日期。 如果密钥无限期有效,请指定遥远未来的任何日期。

日期格式: YYYY-MM-DD.

id*

Type: integer<int64>

订单中的产品ID。

它是为了响应一个请求 GET v2/campaigns/{campaignId}/orders/{orderId} — 参数 iditems.

slip*

Type: string

激活指令。

HTML标签可用于格式化文本:

  • <h>,<h1>,<h2>等等 — 新闻标题;
  • <br>和<p> — 对于换行符;
  • <ol> — 对于编号列表;
  • <ul> — 对于项目符号列表。
  • <李> — 创建列表项(必须在<ol>或<ul>内);
  • <div> — 支持,但不影响文本显示。

Max length: 10000

code

Type: string

相反,使用 codes

同时使用这两个参数将导致错误。

钥匙本身。

codes

Type: string[]

品相关的密钥。

Min items: 1

Max items: 5000

Unique items  

Responses

200 OK

一个空洞的答案。

回答 200 就其本身而言,这并不意味着钥匙已转移给买方。

如果与钥匙的电子邮件交付,yandex的。市场将把订单转移到最终状态. DELIVERED.

可以使用该方法找到订单状态 GET v2/campaigns/{campaignId}/orders/{orderId}GET v2/campaigns/{campaignId}/orders.

Body

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

Name

Description

status*

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

400 Bad Request

请求包含不正确的数据。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

ApiErrorDTO

一般错误格式。

Name

Description

code*

Type: string

的错误代码。

message

Type: string

错误的描述。

401 Unauthorized

请求中未指定授权数据。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

403 Forbidden

授权数据不正确或禁止访问资源。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

404 Not Found

找不到请求的资源。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

420 Method Failure

已超出资源访问限制。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

500 Internal Server Error

市场的内部错误。 有关错误的更多信息

Body

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

Name

Description

errors

Type: ApiErrorDTO[]

错误列表。
一般错误格式。

Min items: 1

status

Type: ApiResponseStatusType

响应的类型。 可能的值:

  • OK — 没有错误。
  • ERROR — 处理请求时出错。

Enum: OK, ERROR

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