Information about 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
- all-methods:read-only — View all data
Returns information about licenses for points of sale.
, Limit: 100,000 requests per hour |
---|
Request
GET
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: |
Query parameters
Name |
Description |
ids |
Type: integer<int64>[] A list of license IDs to get information about. The identifiers are separated by commas. The license ID is assigned by Yandex.Market. Do not confuse it with the license number. The request must contain either the parameter Min value: Unique items |
outletIds |
Type: integer<int64>[] A list of IDs of points of sale for which you need to get information about licenses. The identifiers are separated by commas. The request must contain either the parameter Min value: Min items: Max items: Unique items |
Responses
200 OK
The found licenses of your own points of sale.
Body
application/json
{
"status": "OK",
"result": {
"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",
"checkStatus": "NEW",
"checkComment": "string"
}
]
}
}
Name |
Description |
result |
Type: OutletLicensesResponseDTO Response to a request for information about licenses for points of sale. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
OutletLicensesResponseDTO
Response to a request for information about licenses for points of sale.
Name |
Description |
licenses* |
Type: FullOutletLicenseDTO[] List of licenses. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
FullOutletLicenseDTO
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: |
checkComment |
Type: string The reason why the license failed verification. The parameter is returned only if the parameter |
checkStatus |
Type: LicenseCheckStatusType License verification status:
Enum: |
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: |
LicenseCheckStatusType
License verification status:
NEW
— the license is being checked.SUCCESS
— the license has been verified.FAIL
— the license failed verification.REVOKE
— the license has been revoked by the quality service.DONT_WANT
— it is not checked.FAIL_MANUAL
— the license has not passed the quality control check.
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.