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:

  • 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

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.
License information.

Min items: 1

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

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

Responses

200 OK

An empty answer.

Body

application/json
{
    "status": "OK"
}

Name

Description

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

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

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.