创建销售点

方法适用于模式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

广告系列(商店)的ID — 通过API工作时,代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接,但仅用于自动交互。

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

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

⚠️ 不要把它与:

  • 商店的标识符,显示在商家的个人帐户中。
  • 广告活动。

Min value: 1

Body

application/json
{
  "name": "example",
  "type": "DEPOT",
  "coords": "example",
  "isMain": true,
  "shopOutletCode": "example",
  "visibility": "HIDDEN",
  "address": {
    "regionId": 0,
    "street": "example",
    "number": "example",
    "building": "example",
    "estate": "example",
    "block": "example",
    "additional": "example",
    "km": 0,
    "city": "example"
  },
  "phones": [
    "example"
  ],
  "workingSchedule": {
    "workInHoliday": true,
    "scheduleItems": [
      {
        "startDay": "MONDAY",
        "endDay": "MONDAY",
        "startTime": "09:59",
        "endTime": "23:59"
      }
    ]
  },
  "deliveryRules": [
    {
      "minDeliveryDays": 0,
      "maxDeliveryDays": 0,
      "deliveryServiceId": 0,
      "orderBefore": 0,
      "priceFreePickup": 0.5,
      "unspecifiedDeliveryInterval": true
    }
  ],
  "storagePeriod": 0
}

Name

Description

address

Type: object

regionId

Type: integer

区域的ID。

您可以使用请求获取ID GET v2/regions.

创建和编辑销售点时的区域类型

仅指定以下类型的区域 TOWN (城市), CITY (大城市)及 REPUBLIC_AREA (联邦主体区)。 区域的类型在输出参数中指定 type 请求 GET v2/regionsGET v2/regions/{regionId}.

additional

Type: string

其他资料。

Example: example

block

Type: string

建筑物编号。

Max length: 16

Example: example

building

Type: string

建筑物编号。

Max length: 16

Example: example

city

Type: string

在响应中,参数中返回城市和城镇 regionId.

Max length: 200

Example: example

estate

Type: string

所有权号码。

Max length: 16

Example: example

km

Type: integer

销售点所在道路的公里数的序数,如果没有街道。

number

Type: string

门牌号。

Max length: 256

Example: example

street

Type: string

街道。

Max length: 512

Example: example

销售点的地址。

Example
{
  "regionId": 0,
  "street": "example",
  "number": "example",
  "building": "example",
  "estate": "example",
  "block": "example",
  "additional": "example",
  "km": 0,
  "city": "example"
}

name

Type: string

销售点的名称。

Example: example

phones

Type: string[]

销售点的电话号码。 发送格式的号码: +<国家代码>(<城市代码>)<号码>[#<分机>].

例子::

  • +7 (999) 999-99-99
  • +7 (999) 999-99-99#1234

Min items: 1

Unique items: true

Example
[
  "example"
]

type

Type: string

销售点的类型。

可能的值:

  • DEPOT — 接单点。
  • MIXED — 混合类型的销售点(销售楼层和订单提货点)。
  • RETAIL — 零售销售点(销售楼层)。
  • NOT_DEFINED — 未知类型的销售点。 确定类型时出错。

Enum: DEPOT, MIXED, RETAIL, NOT_DEFINED

workingSchedule

Type: object

scheduleItems

Type: object[]

endDay

Type: string

星期几:

  • MONDAY — 星期一。
  • TUESDAY — 星期二。
  • WEDNESDAY — 星期三。
  • THURSDAY — 星期四。
  • FRIDAY — 星期五。
  • SATURDAY — 星期六。
  • SUNDAY — 星期天。

Enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY

endTime

Type: string

销售点开放至指定时间。

格式: HH:MM.

Pattern: ^([0-1][0-9]&#124;2[0-3]):[0-5][0-9]$

Example: 23:59

startDay

Type: string

星期几:

  • MONDAY — 星期一。
  • TUESDAY — 星期二。
  • WEDNESDAY — 星期三。
  • THURSDAY — 星期四。
  • FRIDAY — 星期五。
  • SATURDAY — 星期六。
  • SUNDAY — 星期天。

Enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY

startTime

Type: string

销售点从指定的小时开始开放。

格式: HH:MM.

Pattern: ^([0-1][0-9]&#124;2[0-3]):[0-5][0-9]$

Example: 09:59

销售点的开放时间列表。

Min items: 1

Example
[
  {
    "startDay": "MONDAY",
    "endDay": "MONDAY",
    "startTime": "09:59",
    "endTime": "23:59"
  }
]

workInHoliday

Type: boolean

指示销售点是否在公众假期开放。

可能的值:

  • false — 销售点在公众假期休息。
  • true — 销售点在公众假期开放。

销售点的操作模式列表。

Example
{
  "workInHoliday": true,
  "scheduleItems": [
    {
      "startDay": "MONDAY",
      "endDay": "MONDAY",
      "startTime": "09:59",
      "endTime": "23:59"
    }
  ]
}

coords

Type: string

销售点的坐标。

格式:经度,纬度。 分隔符:逗号和/或空格。 例如, 20.4522144, 54.7104264.

如果没有传递参数,则坐标将由嵌套在其中的参数的值确定 address.

Example: example

deliveryRules

Type: object[]

deliveryServiceId

Type: integer

到销售点的产品交付服务的ID。

有关派递服务的资料,可透过要求 GET delivery/services.

maxDeliveryDays

Type: integer

货物到销售点的最长交货时间。 它以工作日指定。

最小值: 0 — 订单当天交货。

最大值: 60.

可接受的交货时间(两者之间的差异 minDeliveryDaysmaxDeliveryDays)取决于地区。

对于您所在地区的交货,差额不应超过两天。 例如,如果 minDeliveryDays 等于1,则为 maxDeliveryDays 允许从1到3的值。

运送至其他地区:

  • 如果 minDeliveryDays 最多18天,差异不应超过四天。 例如,如果 minDeliveryDays 等于10,则对于 maxDeliveryDays 允许值从10到14。
  • 如果 minDeliveryDays 超过18天,差异不应超过两倍。 例如,如果 minDeliveryDays 等于21,则对于 maxDeliveryDays 允许值从21到42。

如果需要参数 类型="仓库"类型="混合".

与参数互斥 unspecifiedDeliveryInterval.

Min value: 0

Max value: 60

minDeliveryDays

Type: integer

货物到销售点的最短交货时间。 它以工作日指定。

最小值: 0 — 订单当天交货。

最大值: 60.

可接受的交货时间(两者之间的差异 minDeliveryDaysmaxDeliveryDays)取决于地区。

对于您所在地区的交货,差额不应超过两天。 例如,如果 minDeliveryDays 等于1,则为 maxDeliveryDays 允许从1到3的值。

运送至其他地区:

  • 如果 minDeliveryDays 最多18天,差异不应超过四天。 例如,如果 minDeliveryDays 等于10,则对于 maxDeliveryDays 允许值从10到14。
  • 如果 minDeliveryDays 超过18天,差异不应超过两倍。 例如,如果 minDeliveryDays 等于21,则对于 maxDeliveryDays 允许值从21到42。

如果需要参数 类型="仓库"类型="混合".

与参数互斥 unspecifiedDeliveryInterval.

Min value: 0

Max value: 60

orderBefore

Type: integer

客户需要在下订单之前的一小时,以便它可以按时交付到销售点。 minDeliveryDays 以前 maxDeliveryDays.

如果客户在指定的小时后下订单,它将从 minDeliveryDays +1个工作日前 maxDeliveryDays +1个工作日。

默认值: 24.

Min value: 0

Max value: 24

priceFreePickup

Type: number

产品的价格,从该价格开始,从销售点免费提取产品是有效的。

unspecifiedDeliveryInterval

Type: boolean

指示按订单将货物交付到销售点。

此标志被设置,如果:

  • 到销售点的确切交货时间是事先未知的(例如,如果商店收集了几个订单以装运到销售点或地点)。
  • 所有产品都是按订单制造或交付的。

可能的值:

  • true — 货物按订单交付到销售点。

仅使用值指定参数 true.

与参数互斥 minDeliveryDaysmaxDeliveryDays.

有关此销售点的交货条款的信息。

必需的参数,如果参数 类型=仓库类型=混合.

Min items: 1

Example
[
  {
    "minDeliveryDays": 0,
    "maxDeliveryDays": 0,
    "deliveryServiceId": 0,
    "orderBefore": 0,
    "priceFreePickup": 0.5,
    "unspecifiedDeliveryInterval": true
  }
]

isMain

Type: boolean

表示主要销售点。

可能的值:

  • false — 非主要销售点。
  • true — 的主要销售点。

shopOutletCode

Type: string

店分配的销售点的ID。

Example: example

storagePeriod

Type: integer

订单在自己的接单点的存储期。 它以天计算。

visibility

Type: string

销售点的状态。

可能的值:

  • HIDDEN — 销售点被禁用。
  • VISIBLE — 销售点已启用。
  • UNKNOWN — 销售点状况不明。 确定状态时发生错误。

Enum: HIDDEN, VISIBLE, UNKNOWN

Responses

200 OK

有关创建的销售点的信息。

Body

application/json
{
  "status": "OK",
  "result": {
    "id": 0
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

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

    Enum: OK, ERROR

    服务器响应的标准包装器。

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    id

    Type: integer

    Yandex分配的销售点的ID。市场。

    查询执行的结果。 输出if 状态="OK".

    Example
    {
      "id": 0
    }
    
    Example
    {
      "result": {
        "id": 0
      }
    }
    

400 Bad Request

请求包含不正确的数据。 了解有关使用销售点时的错误的更多信息

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

401 Unauthorized

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

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

403 Forbidden

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

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

404 Not Found

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

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

420 Method Failure

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

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

500 Internal Server Error

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

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

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

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

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

下一篇