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:

  • Modules and APIs → block Sending data to Yandex.Market.
  • 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

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 outletIds, or the parameter ids. A request with or without both parameters will result in an error.

Min value: 1

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 outletIds, or the parameter ids. A request with or without both parameters will result in an error.

Min value: 1

Min items: 1

Max items: 500

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:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

OutletLicensesResponseDTO

Response to a request for information about licenses for points of sale.

Name

Description

licenses*

Type: FullOutletLicenseDTO[]

List of licenses.
License information.
License information.

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

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 00:00:00 and the time zone corresponding to the region of the point of sale. For example, if the license for a point of sale in Moscow ends on November 20, 2022, then the parameter should have the value 2022-11-20T00:00:00+03:00.

It cannot be earlier than the issue date specified in the parameter dateOfIssue.

Example: 2022-11-20T00:00:00+03:00

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 00:00:00 and the time zone corresponding to the region of the point of sale. For example, if the license for a point of sale in Moscow was issued on November 13, 2017, then the parameter should have the value 2017-11-13T00:00:00+03:00.

It cannot be later than the expiration date specified in the parameter. dateOfExpiry.

Example: 2017-11-13T00:00:00+03:00

licenseType*

Type: LicenseType

License type:

  • ALCOHOL — a license for the retail sale of alcoholic beverages.
  • UNKNOWN — unknown license type.

Enum: ALCOHOL, UNKNOWN

number*

Type: string

License number.

outletId*

Type: integer<int64>

ID of the point of sale for which the license is valid.

Min value: 1

checkComment

Type: string

The reason why the license failed verification.

The parameter is returned only if the parameter checkStatus it matters FAIL.

checkStatus

Type: 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.

Enum: NEW, SUCCESS, FAIL, REVOKE, DONT_WANT, FAIL_MANUAL

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 number.

LicenseType

License type:

  • ALCOHOL — a license for the retail sale of alcoholic beverages.
  • UNKNOWN — unknown license type.

Type

Description

LicenseType

Enum: ALCOHOL, UNKNOWN

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

LicenseCheckStatusType

Enum: NEW, SUCCESS, FAIL, REVOKE, DONT_WANT, FAIL_MANUAL

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • 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: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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