获取股票列表
方法适用于所有模式.
目前不适用于卖家Market Yandex Go.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
返回有关市场促销的信息。 它不返回有关卖方创建的股票的数据。
默认情况下,卖方参与或可能参与的促销活动将被退回。
要获取当前或已完成的促销,请传递参数 participation.
响应中返回的共享类型:
- 直接折扣;
- flash推广;
- 通过促销代码折扣.
| ⚙️ 限制: 每小时1,000个请求 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/businesses/{businessId}/promos
Path parameters
|
Name |
Description |
|
businessId* |
Type: integer<int64> 内阁ID。 要找到答案,请使用请求 GET v2/campaigns. Min value: |
Body
application/json
{
"participation": "PARTICIPATING_NOW",
"mechanics": "DIRECT_DISCOUNT"
}
|
Name |
Description |
|
mechanics |
Type: string 推广类别:
Enum: |
|
participation |
Type: string 哪些促销活动将返回:
Enum: |
Responses
200 OK
的市场份额列表。
Body
application/json
{
"status": "OK",
"result": {
"promos": [
{
"id": "string",
"name": "string",
"period": {
"dateTimeFrom": "2022-12-29T18:02:01Z",
"dateTimeTo": "2022-12-29T18:02:01Z"
},
"participating": false,
"assortmentInfo": {
"activeOffers": 0,
"potentialOffers": 0,
"processing": false
},
"mechanicsInfo": {
"type": "DIRECT_DISCOUNT",
"promocodeInfo": {
"promocode": "string",
"discount": 0
}
},
"bestsellerInfo": {
"bestseller": false,
"entryDeadline": "2022-12-29T18:02:01Z",
"renewalEnabled": false
},
"channels": [
"PUSH"
],
"constraints": {
"warehouseIds": [
0
]
}
}
]
}
}
|
Name |
Description |
||
|
status* |
Type: string 响应的类型。 可能的值:
Enum: |
||
|
result |
Type: object
有关市场促销活动的信息。 |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.