Wildberries Digital (wbd)
For questions regarding working with the WBD API, please contact technical support
For questions regarding working with the WBD API, please contact technical support
Welcome to Wildberries Digital (WBD) API — an interface for Wildberries Digital sellers, providing capabilities for shop management and obtaining operational and statistical information via HTTP protocol.
- Managing offers and content
- Downloading and managing media files
- Obtaining content and offers information
- Managing activation keys
To access WBD API it is required to authorize using the JWT token. Follow the instruction below for obtaining and using the token.
Obtaining the token 1. Follow the link to the WBD website. 2. Click the Get token button. 3. Copy the generated JWT token.
Using the token
In every WBD API request pass the token in the Authorization
header, where <api_token>
is your authorization token (JWT):
Authorization: Bearer <api_token>
Request example:
GET /api/v1/offers/author HTTP/1.1
Host: devapi-digital.wildberries.ru
Authorization: Bearer eyJhbGciOdJIUzI1NiIsInR5cCIkIkpXVCJ9.eyJhJjo0ODM2MTE5NawiYiI6NDI4NTk1MjMsImV4cCI6MTc0OTU0MjQ0MH0.DOWjZBSLwCxvU_kKkneCcJ_E-GuflHSsre8nAUr0xFo
- Store the token in a secure place
- Do not pass the token in the URL
- Do not expose the token publicly
For all requests, use the devapi-digital.wildberries.ru
host.
Example of the full URL: https://devapi-digital.wildberries.ru/api/v1/offers/author
.
Following these recommendations will ensure the secure use of the WBD API.
Create new offer{{ /api/v1/offers }}
This method allows you to create a new offer.
Required fields
title
— Offer namedescription
— Offer descriptiontags
— Offer tagssection
— Offer categorycatalog_path
— Offer subcategoryage_rating
— Offer age ratingprice
— Offer price
Add a cover
The cover for the offer is uploaded separately after the offer is created.
You need to use the Add or update offer cover method.
Add additional media files
- Upload media files using the Upload media file for an offer method. The method returns a list of URI addresses of the uploaded media files.
- Add the media file URIs to the
gallery
field.
Offer category and subcategory
Use the Get categories and their subcategories method to get the subcategory ID and correctly match it with the category.
Offer from the "Services" category
section
— 8
Access to publish content in this category is granted through a request to technical support.
Offer with unique keys
Offers with unique keys belong to the following categories (section
):
- Activation keys —
3
- Coupons and entertainment —
12
- Gift certificates —
13
Required data:
- Keys for the offer
- Key activation instructions
Uploading keys
The list of keys is passed in the keys
parameter of your request when creating the offer.
You can add more keys later using the Add activation keys method.
Adding key activation instructions
The key activation instructions must be added to the meta
field in JSON format using the following example.
To make the text more attractive and readable, use a line break \n
.
Example:
{
"meta":{
"key_instruction": "Инструкция по активации\n1. Зайдите на сайт ...\n2.Вставьте ключ в поле ..."
}
}
Offer with content
Offers with content belong to the following categories (section
):
- Video content —
1
- Audio content —
2
- E-books —
4
- Audiobooks —
5
- Digital goods —
6
Required data:
- Content for the offer
Adding content
If you have not yet added content to your seller's personal account, you can do so following these instructions.
To add content, you need to pass a list of data in the content
parameter using the example below.
Example:
"content": [
{
"category_id": 1,
"content": 8942
},
{
"category_id": 1,
"content": 4211
}
]
where:
category_id
— Content category IDcontent
— Content ID
You can get this information using the Get a list of your content method.
Authorizations:
Request Body schema: application/jsonrequired
title required | string <= 500 characters Offer name. |
description required | string <= 5000 characters Offer description. This is the text that describes your offer and helps people understand what your product is and how it can be useful. It's important to name the offer correctly and provide a detailed description so that users can learn as much information as possible before making a purchase. |
tags required | Array of strings [ 1 .. 5 ] items [ items <= 45 characters ] List of tags. Tags are used for grouping, ranking, and facilitating the search for your product. Restrictions:
|
section required | integer <int32> Enum: 1 2 3 4 5 6 8 9 12 13 Offer category ID:
|
catalog_path required | Array of integers <int64> non-empty [ items <int64 > ] Array of subcategory IDs where the offer is located. |
age_rating required | string Enum: "0+" "6+" "12+" "14+" "16+" "18+" Age rating. This is a system used to determine if your offer is suitable for a specific age group |
price required | integer <int64> Offer price, ₽ |
discount_price | integer <int64> Discounted price, ₽ |
gallery | Array of strings <= 8 items List of URLs for additional images and video previews. |
keys | Array of strings <= 1000 items [ items <= 200 characters ] List of keys.
Restrictions:
|
status | integer <int32> Default: 0 Enum: 0 1 Sets the status of your offer:
|
Array of objects (OfferCreateContent) Content list | |
object (OfferMetaRequest) Offer metadata |
Responses
Request samples
- Payload
{- "title": "Книга `Спортивное питание`",
- "description": "Очень хорошая книга о спортивном питании.",
- "tags": [
- "life",
- "work",
- "gym"
], - "section": 4,
- "catalog_path": [
- 10
], - "age_rating": "16+",
- "price": 849,
- "discount_price": 799,
- "gallery": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
], - "keys": [
- "0181-c2a38--6379-69d8ae",
- "1983-454e4--5379-0edbbc",
- "6860-f1f20--8421-c1e6a1"
], - "status": 1,
- "content": [
- {
- "category_id": 4,
- "content": 8942
}, - {
- "category_id": 4,
- "content": 4211
}
], - "meta": {
- "addresses": "Москва, Нагатинская д. 1",
- "key_instruction": "Инструкция по активации\n1. Зайдите на сайт ...\n2.Вставьте ключ в поле ..."
}
}
Response samples
- 200
- 400
- 401
- 500
{- "id": 42,
- "title": "Книга `Спортивное питание`",
- "description": "Очень хорошая книга о спортивном питании.",
- "section": 4,
- "catalog_path": [
- 10
], - "price": 849,
- "discount_price": 799,
- "gallery": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
], - "meta": "string",
- "tags": [
- {
- "id": 1,
- "value": "бизнес",
- "value_translit": "biznes",
- "weight": 100
}
], - "thumbnail": [
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/480.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1280.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1920.jpg"
], - "content": [
- {
- "content": 542342523,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "meta": "string",
- "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "category_id": 4
}
], - "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z",
- "deleted": "2024-06-19T22:12:13Z",
- "status": 1,
- "view_count": 47,
- "purchase_count": 10,
- "adult": false,
- "age_rating": "16+",
- "rating": 50
}
Add or update offer cover{{ /api/v1/offers/thumb }}
The method allows you to add or update an offer's cover.
For a more attractive offer card, we recommend:
- Add images with a 1:1 aspect ratio.
- Minimum image size is 1200x1200 pixels.
- A background that contrasts with white.
Allowed formats: PNG, JPEG
Authorizations:
header Parameters
X-Content-Type required | string Enum: "image/jpeg" "image/png" Image type |
X-Wbd-OfferId required | integer <int64> Offer ID |
Request Body schema: application/octet-streamrequired
File bytes
Responses
Response samples
- 400
- 401
- 500
{- "status": 400,
- "title": "bad request",
- "detail": "value 'five' is invalid for parameter offer_id",
- "code": "string",
- "errors": [
- { }
], - "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Edit offer{{ /api/v1/offers/{offer_id} }}
The method allows you to edit offer information.
Offer category and subcategory
Use the Get categories and their subcategories method to get the subcategory ID and correctly match it with the category.
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
Request Body schema: application/jsonrequired
title | string <= 500 characters Offer name. |
description | string <= 5000 characters Offer description. This is the text that describes your offer and helps people understand what your product is and how it can be useful. It's important to name the offer correctly and provide a detailed description so that users can learn as much information as possible before making a purchase. |
price | integer <int64> Offer price, ₽ |
discount_price | integer or null <int64> Discounted price, ₽ |
gallery | Array of strings or null <= 8 items List of URLs for additional images and video previews. |
age_rating | string Enum: "0+" "6+" "12+" "14+" "16+" "18+" Age rating. This is a system used to determine if your offer is suitable for a specific age group |
tags | Array of strings [ 1 .. 5 ] items [ items <= 45 characters ] List of tags. Tags are used for grouping, ranking, and facilitating the search for your product. Restrictions:
|
status | integer or null <int32> Enum: 0 1 2 3 Status of your offer:
|
catalog_path | Array of integers <int64> [ items <int64 > ] Array of subcategory IDs where the offer is located. |
object (OfferMetaRequest) Offer metadata |
Responses
Request samples
- Payload
{- "title": "Книга `Спортивное питание`",
- "description": "Очень хорошая книга о спортивном питании.",
- "price": 849,
- "discount_price": 799,
- "gallery": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
], - "age_rating": "16+",
- "tags": [
- "life",
- "work",
- "gym"
], - "status": 1,
- "catalog_path": [
- 10
], - "meta": {
- "addresses": "Москва, Нагатинская д. 1",
- "key_instruction": "Инструкция по активации\n1. Зайдите на сайт ...\n2.Вставьте ключ в поле ..."
}
}
Response samples
- 400
- 401
- 403
- 404
- 500
{- "status": 400,
- "title": "bad request",
- "detail": "value 'five' is invalid for parameter offer_id",
- "code": "string",
- "errors": [
- { }
], - "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Get offer information{{ /api/v1/offers/{offer_id} }}
The method allows you to get information about specific offer.
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": 42,
- "title": "Книга `Спортивное питание`",
- "description": "Очень хорошая книга о спортивном питании.",
- "section": 4,
- "catalog_path": [
- 10
], - "price": 849,
- "discount_price": 799,
- "gallery": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
], - "meta": "string",
- "tags": [
- {
- "id": 1,
- "value": "бизнес",
- "value_translit": "biznes",
- "weight": 100
}
], - "thumbnail": [
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/480.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1280.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1920.jpg"
], - "content": [
- {
- "content": 542342523,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "meta": "string",
- "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "category_id": 4
}
], - "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z",
- "deleted": "2024-06-19T22:12:13Z",
- "status": 1,
- "view_count": 47,
- "purchase_count": 10,
- "adult": false,
- "age_rating": "16+",
- "rating": 50
}
Get a list of your offers{{ /api/v1/offers/author }}
The method allows to get a list of your offers using filtering.
Description of filtering parameters
search
— Search offers by name. Specify part of or the full name of the offer to search.category
— Filter offers by content category. The list of categories can be found in the table.status
— Filter offers by status. Possible values:0
— Draft1
— Published2
— Suspended
sort
— Sort offers by creation or update date. Specifycreated
to sort by creation date andupdated
to sort by update date.sort_dir
— Sort direction. Specifyasc
for ascending sort ordesc
for descending sort.skip
— Offset. Allows you to skip a specified number of offers in the result set.
For example, ifskip
is 20, the selection will start from the 21 record.take
— Number of offers that should be returned in the response.
For example, iftake
is 10, the response will contain no more than 10 records.
Authorizations:
query Parameters
search | string Search by offer name |
category | integer <int64> Enum: 1 2 4 Filter by content category:
|
status | integer <int32> Enum: 0 1 2 Filter by status:
|
sort | string Enum: "created" "updated" Sort offers by creation or update date |
sort_dir | string Enum: "asc" "desc" Sort direction:
|
skip | integer <int64> Default: 0 Offset. Number of offers to skip in the result set. |
take | integer <int64> Default: 50 Number of offers that should be returned |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "items": [
- {
- "id": 42,
- "title": "Книга `Спортивное питание`",
- "description": "Очень хорошая книга о спортивном питании.",
- "section": 4,
- "catalog_path": [
- 10
], - "price": 849,
- "discount_price": 799,
- "gallery": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
], - "meta": "string",
- "tags": [
- {
- "id": 1,
- "value": "бизнес",
- "value_translit": "biznes",
- "weight": 100
}
], - "thumbnail": [
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/480.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1280.jpg",
- "vol6/842/900bec865s329db6c0efbf0f1a61ebee/1920.jpg"
], - "content": [
- {
- "content": 542342523,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "meta": "string",
- "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "category_id": 4
}
], - "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z",
- "deleted": "2024-06-19T22:12:13Z",
- "status": 1,
- "view_count": 47,
- "purchase_count": 10,
- "adult": false,
- "age_rating": "16+",
- "rating": 50
}
], - "total": 10
}
Update price{{ /api/v1/offer/price/{offer_id} }}
The method allows you to change the offer's price and the discounted price.
If you don't want to set a discount, do not pass the discount_price
parameter in the request, or set its value to 0
.
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
Request Body schema: application/jsonrequired
regular_price | integer <int64> Price, ₽ |
discount_price | integer <int64> Discounted price, ₽ |
Responses
Request samples
- Payload
{- "regular_price": 5432,
- "discount_price": 5000
}
Response samples
- 400
- 401
- 500
{- "status": 400,
- "title": "bad request",
- "detail": "value 'five' is invalid for parameter offer_id",
- "code": "string",
- "errors": [
- { }
], - "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Update status{{ /api/v1/offer/{offer_id} }}
The method allows you to update the status of your offer.
Possible values:
0
— Draft1
— Published2
— Suspended3
— Deleted
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
Request Body schema: application/jsonrequired
status required | integer <int32> Enum: 0 1 2 3 |
Responses
Request samples
- Payload
{- "status": 0
}
Response samples
- 400
- 401
- 500
{- "status": 400,
- "title": "bad request",
- "detail": "value 'five' is invalid for parameter offer_id",
- "code": "string",
- "errors": [
- { }
], - "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Get categories and their subcategories{{ /api/v1/catalog }}
The method allows you to get a tree (data structure) with categories and their subcategories.
Data structure hierarchy
Our structure has three levels of hierarchy:
- Root node — the Catalog entity
- External nodes are categories (
section
):1
— Video content2
— Audio content3
— Activation keys4
— E-books5
— Audiobooks6
— Digital goods8
— Services12
— Coupons and entertainment13
— Gift certificates
- Tree leaves are subcategories (
catalog_path
):65
— Educational videos66
— Sports67
— Masterclass68
— Yoga69
— Meditations
Authorizations:
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "children": [
- {
- "id": 1,
- "img": "vol0/catalog/icons/1.svg",
- "is_section": true,
- "name": "VIDEO",
- "node_order": 0,
- "parent_id": 0,
- "section_id": 1,
- "total": 6482,
- "children": [
- {
- "id": 65,
- "img": "",
- "is_section": false,
- "name": "Обучающие видео",
- "node_order": 1,
- "parent_id": 0,
- "section_id": 1,
- "total": 0,
- "children": [ ]
}, - {
- "id": 66,
- "img": "",
- "is_section": false,
- "name": "Спорт",
- "node_order": 2,
- "parent_id": 0,
- "section_id": 1,
- "total": 0,
- "children": [ ]
}, - {
- "id": 67,
- "img": "",
- "is_section": false,
- "name": "Мастер-класс",
- "node_order": 3,
- "parent_id": 0,
- "section_id": 1,
- "total": 0,
- "children": [ ]
}
]
}, - {
- "id": 2,
- "img": "vol0/catalog/icons/2.svg",
- "is_section": true,
- "name": "AUDIO",
- "node_order": 0,
- "parent_id": 0,
- "section_id": 2,
- "total": 1983,
- "children": [
- {
- "id": 73,
- "img": "",
- "is_section": false,
- "name": "Обучение",
- "node_order": 1,
- "section_id": 2,
- "total": 0,
- "children": [ ]
}, - {
- "id": 74,
- "img": "",
- "is_section": false,
- "name": "Медитации",
- "node_order": 2,
- "parent_id": 0,
- "section_id": 2,
- "total": 0,
- "children": [ ]
}, - {
- "id": 75,
- "img": "",
- "is_section": false,
- "name": "Мастер-класс",
- "node_order": 3,
- "parent_id": 0,
- "section_id": 2,
- "total": 0,
- "children": [ ]
}
]
}
], - "img": "",
- "name": "Каталог",
- "parent_id": 0,
- "path": null,
- "id": 0,
- "is_section": false,
- "node_order": 0,
- "section_id": 0,
- "total": 0
}
], - "total": 0
}
catalog_id — Categories identification |
Category name | File formats |
---|---|---|
1 |
Video content | mp4 |
2 |
Audio content | mp3 |
4 |
Document | pdf , epub , txt |
Acceptable content for upload - Video (MP4) - Audio/Music (MP3) - Documents (PDF, EPUB, TXT)
File requirements - Maximum file size: 3 GB - Minimum video/audio duration: 1 minute - Supported formats: MP4, EPUB, TXT, PDF, MP3
Cover image requirements - Maximum size: 5 MB - Supported formats: PNG, JPG (JPEG) - Image aspect ratio: 1:1 (recommended)
Upload content cover{{ /api/v1/content/illustration }}
The method allows you to upload a content cover.
Allowed formats: PNG, JPEG
Recommendations:
- 1:1 aspect ratio
Quick instructions on how to use:
- Make sure your file meets the specified restrictions and recommendations.
- Call this method.
- When you upload the cover, you will get a list of URIs for the new content.
- Use the Initialize new content method and pass the list of URIs to the meta field in JSON format using the following example.
Example:
{
"meta": {
"thumbnail": [
"vol6/529/013cfs7f229183179aj53d2b3bbb839a/480.jpg",
"vol6/529/013cfs7f229183179aj53d2b3bbb839a/1280.jpg",
"vol6/529/013cfs7f229183179aj53d2b3bbb839a/1920.jpg"
]
}
}
Authorizations:
header Parameters
X-Content-Type required | string Enum: "image/png" "image/jpeg" File type |
Request Body schema: application/octet-streamrequired
File bytes
Responses
Response samples
- 200
- 400
- 401
- 500
{- "uris": [
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/480.jpg",
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/1280.jpg",
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/1920.jpg"
], - "userId": 483611
}
Initialize new content{{ /api/v1/content/upload/init }}
The method allows you to initialize (upload) new content information.
You can find the content types and their requirements in the Working with content section.
Preparing the file for subsequent upload:
- You need to split the file into parts (chunks) of no more than 2 MB.
- Pass the size (in bytes) of each part and its sequence number in the
parts
parameter.
Example:
A 5 MB file should be split into 3 parts — 2 MB, 2 MB, and 1 MB.
{
"parts": [
{
"index": 1,
"size": 2097152
},
{
"index": 2,
"size": 2097152
},
{
"index": 3,
"size": 1048576
}
],
}
In the Upload content (file) method, you will need to upload 3 parts of the file, specifying their sequence number via X-Wbd-Part-Index
.
Required fields in metadata (meta
) for content upload
General fields:
thumbnail
rating
Audio content:
author
Document:
author
pages
Quick instructions on how to use:
- Prepare the metadata and information about your content.
- Make sure your content meets the requirements (file format and size).
- Call this method to initialize the new content.
- In the response, you will get the content
uuid
, which is required for the subsequent file upload. - Use the Upload content file method to upload the file.
Authorizations:
Request Body schema: application/jsonrequired
title required | string <= 500 characters Content name. |
description required | string <= 1000 characters Content description. |
catalog_id required | integer Enum: 1 2 4 Content category ID:
|
content_type required | string Enum: "video/mp4" "audio/mpeg" "text/plain" "application/pdf" "application/epub+zip" File type:
|
required | Array of objects (ChunkPart) For optimal content upload speed, the file should be split into 2 MB chunks. The array specifies the index of each chunk and its size |
required | object or null (ContentMeta) Metadata. Additional content information |
Responses
Request samples
- Payload
{- "title": "Книга `Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "catalog_id": 4,
- "content_type": "application/epub+zip",
- "parts": [
- {
- "index": 1,
- "size": 2097152
}, - {
- "index": 2,
- "size": 2097152
}, - {
- "index": 3,
- "size": 1048576
}
], - "meta": {
- "thumbnail": [
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/480.jpg",
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/1280.jpg",
- "vol4/id_48361197/fc99358aedea2a0cf68c8dcd7f2a3696/1920.jpg"
], - "source_file_name": "Иван_Тургенев:_Отцы_и_дети.epub",
- "rating": "16+",
- "original_name": "Иван_Тургенев:_Отцы_и_дети",
- "voice": "Кузнецов В.Б.",
- "bisac": "978-5-389-04996-3",
- "pages": 354,
- "author": "Иван Тургенев",
- "translator": "Hare Richard",
- "duration": "00:05:11"
}
}
Response samples
- 200
- 400
- 401
- 500
{- "content_id": 493292,
- "uuid": "25f5e4c9-2cac-11ef-adbf-9cc2c45608a"
}
Upload content (file){{ /api/v1/content/upload/chunk }}
The method allows you to upload content (a file) in parts.
Quick instructions on how to use:
- Split the file into parts of no more than 2 MB.
- For each part of the file:
- Make sure the
X-Content-Type
header matches your content type (e.g.,video/mp4
,audio/mpeg
,application/pdf
, etc.). - Set the
X-Wbd-Part-Index
header according to the index of the current part (starting from 1). - Specify the content
uuid
in theX-Wbd-Content-Uuid
header, which you received when initializing new content. - Send the bytes (the file part) in the request body.
- Make sure the
- Repeat step 2 for all parts of the file until the upload is complete.
Authorizations:
header Parameters
X-Content-Type required | string Enum: "video/mp4" "audio/mpeg" "text/plain" "application/pdf" "application/zip" "application/epub+zip" File type |
X-Wbd-Part-Index required | integer <int64> Chunk (part of the content) index |
X-Wbd-Content-Uuid required | string Unique ID received when initializing new content |
Request Body schema: application/octet-streamrequired
File bytes
Responses
Response samples
- 200
- 400
- 401
- 500
{- "chunk": 3,
- "uri": "vol19/924/e9e5d152ea3d9018bd061c62f75efbdf/content"
}
Edit content{{ /api/v1/content/author/{content_id} }}
The method allows you to edit information about content.
Authorizations:
path Parameters
content_id required | integer <int64> Content ID |
Request Body schema: application/jsonrequired
title | string or null <= 500 characters Content name. |
description | string or null <= 1000 characters Content description. |
Responses
Request samples
- Payload
{- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга."
}
Response samples
- 200
- 400
- 401
- 500
{- "id": 5321,
- "author_id": 93224,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "content_type": "application/epub+zip",
- "uri": "vol19/924/e9e55159ea3d9018bd061c62f75efbdf/content",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "meta": null,
- "category_id": 4,
- "status": 2,
- "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z"
}
Get content information{{ /api/v1/content/author/{content_id} }}
The method allows you to get information about specific content.
Authorizations:
path Parameters
content_id required | integer <int64> Content ID |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": 5321,
- "author_id": 93224,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "content_type": "application/epub+zip",
- "uri": "vol19/924/e9e55159ea3d9018bd061c62f75efbdf/content",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "meta": null,
- "category_id": 4,
- "status": 2,
- "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z"
}
Get a list of your content{{ /api/v1/content/author }}
The method allows to get a list of your content using filtering.
Description of filtering parameters
search
— Search content by name. Specify part of or the full name of the content to search.category
— Filter content by category. The list of categories can be found in the table, column —catalog_id
— Categories identification.status
— Filter content by status. Possible values:0
— Created1
— Uploaded to server2
— Published3
— Error in processing or publication4
— Processing5
— Sent to server
sort
— Sort content by creation or update date. Specifycreated
to sort by creation date andupdated
to sort by update date.sort_dir
— Sort direction. Specifyasc
for ascending sort ordesc
for descending sort.skip
— Offset. Allows you to skip a specified number of content in the result set.
For example, ifskip
is 20, the selection will start from the 21 record.take
— Number of content that should be returned in the response.
For example, iftake
is 10, the response will contain no more than 10 records.
Authorizations:
query Parameters
search | string Search by content name |
category | integer <int64> Enum: 1 2 4 Filter by categories:
|
status | integer <int32> Enum: 0 1 2 3 4 5 Filter by status:
|
sort | string Enum: "created" "updated" Sort content by creation or update date |
sort_dir | string Enum: "asc" "desc" Sort direction:
|
skip | integer <int64> Default: 0 Offset. Number of content to skip in the result set. |
take | integer <int64> Default: 50 Number of content that should be returned |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "id": 5321,
- "author_id": 93224,
- "title": "Книга 'Иван Тургенев: Отцы и дети'",
- "description": "Очень хорошая книга.",
- "content_type": "application/epub+zip",
- "uri": "vol19/924/e9e55159ea3d9018bd061c62f75efbdf/content",
- "files": [
- {
- "contentType": "application/fb2",
- "size": 3665547,
- "uri": "vol13/689/98235be67bdefcew2a33c5f0e55b17eb/output.fb2"
}
], - "playlist": "vol14/147/f2671cfb67bd8c200b9464vd6f0dd97d/output.m3u8",
- "meta": null,
- "category_id": 4,
- "status": 2,
- "created": "2024-06-10T07:29:30Z",
- "updated": "2024-06-17T22:12:13Z"
}
], - "total": 10
}
Download content{{ /api/v1/content/download/{uri} }}
The method allows you to download content by URI.
Getting the content URI
- Use one of the methods to get content information.
- In the content information, take the URI address from the
uri
orfiles
field.
Downloading content in parts
You can download the file in parts using the Range
header.
Example: Range: bytes=0-524287999
The response contains the Content-Range
header with information about the downloaded file.
Example: Content-Range: bytes 0-524287999/1073741824
Authorizations:
path Parameters
uri required | string Content URI address |
header Parameters
Range | string Allows downloading file in parts. Example: |
Responses
Response samples
- 401
- 404
- 500
- 502
{- "status": 401,
- "title": "unauthorized",
- "detail": "authorization required",
- "code": "string",
- "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Delete content{{ /api/v1/content/delete }}
The method allows you to delete content by ID.
Authorizations:
Request Body schema: application/jsonrequired
content_id | integer <int64> Content ID |
Responses
Request samples
- Payload
{- "content_id": 493292
}
Response samples
- 401
- 404
- 500
{- "status": 401,
- "title": "unauthorized",
- "detail": "authorization required",
- "code": "string",
- "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Upload media file for an offer{{ /api/v1/content/gallery }}
The method allows you to upload media files to the server.
After a successful upload, it returns a list of URIs that can be used to add additional media files to an offer.
This method helps you add additional media files when creating or updating an offer.
- image: 5 MB
- video: 50 MB
- total size of all files: 100 MB
- image: PNG, JPEG
- video: MP4
Authorizations:
Request Body schema: multipart/form-datarequired
files required | Array of strings <binary> [ items <binary > ] |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "uris": [
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/video.mp4",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/0_1280.jpg",
- "vol42/352/91b751bfb753ff365afbc8dca21b7f87/1_1280.png"
]
}
Add activation keys{{ /api/v1/keys-api/keys }}
The method allows adding keys to an offer by ID.
section
):
- Activation keys —
3
- Coupons and entertainment —
12
- Gift certificates —
13
Authorizations:
Request Body schema: application/jsonrequired
keys required | Array of strings <= 1000 items [ items <= 200 characters ] List of keys. Restrictions:
|
offer_id required | integer <int64> Offer ID |
Responses
Request samples
- Payload
{- "keys": [
- "0181-c2a38--6379-69d8ae",
- "4444-m2d2--5555-77f7ff",
- "21fd-1234--3333-4444ff"
], - "offer_id": 4251
}
Response samples
- 401
- 403
- 404
- 500
{- "status": 401,
- "title": "unauthorized",
- "detail": "authorization required",
- "code": "string",
- "requestId": "b709d59bd0791513350332ffe5f813c1",
- "origin": "gateway-dev"
}
Delete activation keys{{ /api/v1/keys-api/keys }}
The method allows deleting activation keys by their IDs.
Authorizations:
query Parameters
ids required | Array of integers <int64> [ items <int64 > ] List of key IDs |
Responses
Response samples
- 200
- 207
- 400
- 401
- 403
- 404
- 500
{- "statuses": [
- {
- "id": 12345,
- "code": "200",
- "message": "ok",
- "status": true
}, - {
- "id": 12346,
- "code": "200",
- "message": "ok",
- "status": true
}
]
}
Get redeemed keys{{ /api/v1/keys-api/keys/redeemed }}
The method allows you to get a list of redeemed keys using filtering.
Description of filtering parameters
offer_id
— Filter by offer ID. Allows selecting keys associated with a specific offer.skip
— Offset. Specifies how many records to skip in the result set.
For example, ifskip
is 20, the selection will start from the 21 record.take
— Number of records to retrieve. Specifies how many keys should be returned in the response.
For example, iftake
is 10, the response will contain no more than 10 records.date_from
— Filter by purchase date starting from the specified date (included).
Date format: RFC3339.date_to
— Filter by purchase date up to the specified date (excluded).
Date format: RFC3339.
Authorizations:
query Parameters
offer_id | integer <int64> Filter by offer ID. Allows selecting keys associated with a specific offer |
skip | integer <int64> Default: 0 Offset. Specifies how many records to skip in the result set. Used for the pagination |
take | integer <int64> Default: 50 Number of records to retrieve. Specifies how many keys should be returned in the response |
date_from | string Filter by purchase date starting from the specified date (included). Date format: RFC3339 ( |
date_to | string Filter by purchase date up to the specified date (excluded). Date format: RFC3339 ( |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "id": 54321,
- "value": "0181-c2a38--6379-69d8ae",
- "created_at": "2024-05-10T09:25:50Z",
- "buyed_at": "2024-05-13T11:08:46Z",
- "offer_id": 42124,
- "offer_title": "Игра Red Dead Redemption (Steam)",
- "offer_price": 2490
}
], - "total": 10
}
Get the number of keys for offer{{ /api/v1/offer/keys/{offer_id} }}
The method allows you to get information about the number of keys for a specific offer.
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
Responses
Response samples
- 200
- 401
- 404
- 500
{- "total": 10,
- "available": 5,
- "reserved": 2,
- "deleted": 2
}
Get the key list{{ /api/v1/offer/keys/{offer_id}/list }}
The method allows you to get a list of the keys you have uploaded for a specific offer.
Authorizations:
path Parameters
offer_id required | integer <int64> Offer ID |
query Parameters
take | integer <uint32> Default: 50 Number of records to retrieve. Specifies how many keys should be returned in the response |
skip | integer <uint32> Default: 0 Offset. Specifies how many records to skip in the result set. Used for the pagination |
deleted | boolean Default: true Indicates whether deleted keys will be present in the response |
sold | boolean Default: true Indicates whether sold keys will be present in the response |
reserved | boolean Default: true Indicates whether reserved keys will be present in the response |
expired | boolean Default: true Indicates whether expired keys will be present in the response |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "items": [
- {
- "id": 42,
- "value": "0181-c2a38--6379-69d8ae",
- "created_at": "2022-06-15T09:19:02Z",
- "buyed_at": "2022-07-03T011:30:30Z"
}, - {
- "id": 43,
- "value": "4444-m2d2--5555-77f7ff",
- "created_at": "2022-06-15T12:19:02Z",
- "deleted_at": "2023-02-03T16:22:02Z"
}
], - "total": 10
}