创建销售点
方法适用于模式DBS.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- settings-management — 店铺设置
- all-methods — 全面管理账户
在市场上创建商店的销售点。
| ⚙️ 限制: 每小时100,000次请求 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/outlets
Path parameters
|
Name |
Description |
|
campaignId* |
Type: integer<int64> 活动ID。 您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:
⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。
Min value: |
Body
application/json
{
"name": "string",
"type": "DEPOT",
"coords": "string",
"isMain": false,
"shopOutletCode": "string",
"visibility": "HIDDEN",
"address": {
"regionId": 0,
"street": "string",
"number": "string",
"building": "string",
"estate": "string",
"block": "string",
"additional": "string",
"km": 0,
"city": "string"
},
"phones": [
"string"
],
"workingSchedule": {
"workInHoliday": false,
"scheduleItems": [
{
"startDay": "MONDAY",
"endDay": "MONDAY",
"startTime": "09:59",
"endTime": "23:59"
}
]
},
"deliveryRules": [
{
"minDeliveryDays": 0,
"maxDeliveryDays": 0,
"deliveryServiceId": 0,
"orderBefore": 0,
"priceFreePickup": 0,
"unspecifiedDeliveryInterval": false
}
],
"storagePeriod": 0
}
|
Name |
Description |
||||||||||||||||||
|
address* |
Type: object
销售点的地址。 |
||||||||||||||||||
|
name* |
Type: string 销售点的名称。 |
||||||||||||||||||
|
phones* |
Type: string[] 销售点的电话号码。 格式发送: Min length: Min items: Unique items |
||||||||||||||||||
|
type* |
Type: string 销售点的类型。 可能的值:
Enum: |
||||||||||||||||||
|
workingSchedule* |
Type: object
销售点的操作模式列表。 |
||||||||||||||||||
|
coords |
Type: string 销售点的坐标。 格式:经度,纬度。 分隔符:逗号和/或空格。 例如, 如果没有传递参数,则坐标将由嵌套在其中的参数的值确定 |
||||||||||||||||||
|
deliveryRules |
Type: object[] 有关此销售点的交货条款的信息。 必需的参数,如果参数 Min items: |
||||||||||||||||||
|
isMain |
Type: boolean 表示主要销售点。 可能的值:
|
||||||||||||||||||
|
shopOutletCode |
Type: string 店分配的销售点的ID。 |
||||||||||||||||||
|
storagePeriod |
Type: integer<int64> 订单在自己的订单提货点的存储期。 它以天计算。 |
||||||||||||||||||
|
visibility |
Type: string 销售点的状态。 可能的值:
Enum: |
Responses
200 OK
有关创建的销售点的信息。
Body
application/json
{
"status": "OK",
"result": {
"id": 0
}
}
|
Name |
Description |
||
|
status* |
Type: string 响应的类型。 可能的值:
Enum: |
||
|
result |
Type: object
请求执行的结果。
输出if |
400 Bad Request
| 资料描述 | 解释说明 | 解决方法 |
|---|---|---|
| datediff-is-to-big-local | 对于您所在地区的交货,最长和最短交货时间之间的差异不应超过两天。 | 确保两者之间的区别 maxDeliveryDays 和 minDeliveryDays 不超过两天。 |
| datediff-is-to-big-remote | 对于交付到其他地区,最长和最短交付时间之间的差异不应超过四天。 | 确保两者之间的区别 maxDeliveryDays 和 minDeliveryDays 不超过四天。 |
| datediff-is-to-big-long-period | 配送至最短配送时间超过18天的其他地区时,最长配送时间与最短配送时间之差不应超过最短配送时间。 | 确保两者之间的区别 maxDeliveryDays 和 minDeliveryDays 不超过 minDeliveryDays. |
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.