Creating and changing licenses for points 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
Transmits information about new and existing licenses for points of sale. Only alcohol retail licenses are supported.
To place alcoholic beverages on the Market, you must also send a letter of guarantee (if you have not done this before) and correctly arrange the offers in the price list. Next, the license information is checked.
, Limit: 100,000 requests per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/campaigns/{campaignId}/outlets/licenses
Path parameters
Name |
Description |
campaignId* |
Type: integer<int64> The campaign ID. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
, 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
{
"licenses": [
{
"id": 0,
"outletId": 0,
"licenseType": "ALCOHOL",
"number": "string",
"dateOfIssue": "2017-11-13T00:00:00+03:00",
"dateOfExpiry": "2022-11-20T00:00:00+03:00"
}
]
}
Name |
Description |
licenses* |
Type: OutletLicenseDTO[] List of licenses.
A required parameter must contain information about at least one license.
Min items: |
OutletLicenseDTO
License information.
Name |
Description |
dateOfExpiry* |
Type: string<date-time> The license expiration date. Date format: ISO 8601 with an offset relative to UTC. It is necessary to transmit the date indicated on the license, the time It cannot be earlier than the issue date specified in the parameter Example: |
dateOfIssue* |
Type: string<date-time> The date the license was issued. Date format: ISO 8601 with an offset relative to UTC. It is necessary to transmit the date indicated on the license, the time It cannot be later than the expiration date specified in the parameter. Example: |
licenseType* |
Type: LicenseType License type:
Enum: |
number* |
Type: string License number. |
outletId* |
Type: integer<int64> ID of the point of sale for which the license is valid. Min value: |
id |
Type: integer<int64> The license ID. This parameter is specified only if you need to change the information about an existing license. You can find out its ID using a request. GET campaigns/{campaignId}/outlets/licenses. When transmitting information about the new license, you do not need to specify the ID. The license ID is assigned by Yandex.Market. Do not confuse it with the license number: it is passed in the parameter |
LicenseType
License type:
ALCOHOL
— a license for the retail sale of alcoholic beverages.UNKNOWN
— unknown license type.
Type |
Description |
Enum: |
Responses
200 OK
An empty answer.
Body
application/json
{
"status": "OK"
}
Name |
Description |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
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: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType 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: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType 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: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType 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: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error in Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.