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:
⚠️ 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: |
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
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: Min length: Min items: Unique items |
||||||||||||||||||
|
type* |
Type: string The type of point of sale. Possible values:
Enum: |
||||||||||||||||||
|
workingSchedule* |
Type: object
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, If no parameter is passed, the coordinates will be determined by the values of the parameters nested in |
||||||||||||||||||
|
deliveryRules |
Type: object[] Information about the terms of delivery for this point of sale. Required parameter if the parameter Min items: |
||||||||||||||||||
|
isMain |
Type: boolean Indicates the main point of sale. Possible values:
|
||||||||||||||||||
|
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:
Enum: |
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:
Enum: |
||
|
result |
Type: object
The result of the query execution.
Output if |
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. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.