Getting a barcode file
The method is available for the FBY model.
If you are using an API Key token, one of the accesses in the list is required to call the method
- inventory-and-order-processing — Order processing and inventory
- all-methods — Full account management
Starts generation PDF-a file with barcodes of the transferred goods or goods in the specified delivery request.
The file cannot be generated if it contains more than 1,500 barcodes.
You can find out the generation status and get a link to the finished file using a request. GET v2/reports/info/{reportId}.
| ⚙️ Limit: 1,000 requests per hour |
|---|
Request
POST
https://api.partner.market.yandex.ru/v1/reports/documents/barcodes/generate
Body
application/json
{
"campaignId": 0,
"barcodeFormat": "F_30_20",
"barcodeOfferInfos": [
{
"offerId": "string",
"barcodeCount": 0
}
],
"supplyRequestId": 0
}
|
Name |
Description |
|
barcodeFormat* |
Type: string Page format and barcode size:
Enum: |
|
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. |
|
barcodeOfferInfos |
Type: object[] The list of products. Pass this parameter and the unique The request must contain either If information about a product that has several barcodes is transmitted, all barcodes will be added to the file, their number will be set by the parameter Min items: Max items: |
|
supplyRequestId |
Type: integer<int64> The application ID. Used only in the API It will not be possible to find applications in the seller's account on the Market. To do this, use Min value: |
Responses
200 OK
In response, you receive an identifier that allows you to find out the generation status and download the finished file.
Body
application/json
{
"status": "OK",
"result": {
"reportId": "string",
"estimatedGenerationTime": 0
}
}
|
Name |
Description |
||||
|
status* |
Type: string The type of response. Possible values:
Enum: |
||||
|
result |
Type: object
The ID that will be needed to track the generation status and receive the finished report or document. |
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: object[] A list of errors. Min items: |
|
status |
Type: string The type of response. Possible values:
Enum: |
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: |
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.