Creating a point of sale

The method is available for the DBS model.

If you are using an API Key token, one of the accesses in the list is required to call the method
  • settings-management — Store settings
  • all-methods — Full account management

Creates a store's point of sale on the Market.

⚙️ Limit: 100,000 requests per hour

Request

POST

https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/outlets

Path parameters

Name

Description

campaignId*

Type: integer<int64>

The campaign ID.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market — click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ 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: 1

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

regionId*

Type: integer<int64>

ID of the region.

You can get the ID using a request GET v2/regions.

Types of regions when creating and editing points of sale

Specify only the following types of regions TOWN (city), CITY (large city) and REPUBLIC_AREA (district of the federal subject). The type of the region is specified in the output parameters type requests GET v2/regions and GET v2/regions/{regionId}.

additional

Type: string

Additional information.

block

Type: string

Building number.

Max length: 16

building

Type: string

Building number.

Max length: 16

city

Type: string

In the responses, cities and towns are returned in the parameter regionId.

Max length: 200

estate

Type: string

Ownership number.

Max length: 16

km

Type: integer<int32>

The ordinal number of the kilometer of the road where the point of sale is located, if there is no street.

number

Type: string

The house number.

Max length: 256

street

Type: string

Street.

Max length: 512

The address of the point of sale.

name*

Type: string

The name of the point of sale.

phones*

Type: string[]

The phone numbers of the point of sale. Send in the format: +7 (999) 999-99-99.

Min length: 1

Min items: 1

Unique items  

type*

Type: string

The type of point of sale.

Possible values:

  • DEPOT — the order pick-up point.
  • MIXED — a mixed type of point of sale (sales floor and order pick-up point).
  • RETAIL — retail point of sale (sales floor).
  • NOT_DEFINED — unknown type of point of sale. An error occurred when determining the type.

Enum: DEPOT, MIXED, RETAIL, NOT_DEFINED

workingSchedule*

Type: object

scheduleItems*

Type: object[]

A list of the point of sale's opening hours.
The opening hours of the point of sale.

Min items: 1

workInHoliday

Type: boolean

Indicates whether the point of sale is open on public holidays.

Possible values:

  • false — The point of sale is closed on public holidays.
  • true — The point of sale is open on public holidays.

The list of operating modes of the point of sale.

coords

Type: string

Coordinates of the point of sale.

Format: longitude, latitude. Delimiters: comma and/or space. For example, 20.4522144, 54.7104264.

If no parameter is passed, the coordinates will be determined by the values of the parameters nested in address.

deliveryRules

Type: object[]

Information about the terms of delivery for this point of sale.

Required parameter if the parameter type=DEPOT or type=MIXED.
Information about the terms of delivery for this point of sale.

Min items: 1

isMain

Type: boolean

Indicates the main point of sale.

Possible values:

  • false — a non-primary point of sale.
  • true — the main point of sale.

shopOutletCode

Type: string

The ID of the point of sale assigned by the store.

storagePeriod

Type: integer<int64>

The storage period of the order at its own order pick-up point. It is calculated in days.

visibility

Type: string

The status of the point of sale.

Possible values:

  • HIDDEN — the point of sale is disabled.
  • VISIBLE — The point of sale is enabled.
  • UNKNOWN — unknown condition of the point of sale. An error occurred when determining the status.

Enum: HIDDEN, VISIBLE, UNKNOWN

Responses

200 OK

Information about the created point of sale.

Body

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

Name

Description

status*

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

result

Type: object

id

Type: integer<int64>

The ID of the point of sale assigned by Yandex.Market.

The result of the query execution. Output if status="OK".

400 Bad Request

Description Explanation Solution methods
datediff-is-to-big-local For delivery in your region, the difference between the maximum and minimum delivery time should not exceed two days. Make sure that the difference between maxDeliveryDays and minDeliveryDays not more than two days.
datediff-is-to-big-remote For delivery to other regions, the difference between the maximum and minimum delivery time should not exceed four days. Make sure that the difference between maxDeliveryDays and minDeliveryDays not more than four days.
datediff-is-to-big-long-period When delivering to other regions where the minimum delivery time is more than 18 days, the difference between the maximum and minimum delivery time should not exceed the minimum time. Make sure that the difference between maxDeliveryDays and minDeliveryDays does not exceed minDeliveryDays.

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

500 Internal Server Error

Internal error of the Market. More information about the error

Body

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

Name

Description

errors

Type: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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