### Example API Request for Price Calculation
Source: https://my.digiseller.com/inside/api/_catgoods
This example illustrates a GET request to the Digiseller API for calculating a product's price. It demonstrates how to include product ID, specific options, desired currency, and quantity in the URL parameters.
```http
GET https://api.digiseller.com/api/products/price/calc?product_id=12345&options[]=28532:41541&options[]=28530:41534¤cy=WMZ&unit_cnt=5 HTTP/1.1
Accept: application/json
```
--------------------------------
### XML Response Format Example
Source: https://my.digiseller.com/inside/api/_goods
Example of an XML response from the API, indicating a successful operation. This format is used for returning results and status information.
```xml
0
Success
```
--------------------------------
### JSON Response Format Example
Source: https://my.digiseller.com/inside/api/_goods
Example of a JSON response from the API, indicating a successful operation. This format is used for returning results and status information.
```json
{
"retval": 0,
"retdesc": "",
"errors": null,
"content": {
"status": "Success"
}
}
```
--------------------------------
### Delete All Content for a Product - GET Request Example
Source: https://my.digiseller.com/inside/api/_content
This example demonstrates how to completely remove all content associated with a specific product. The request is a GET method and requires the `product_id` and a valid access token. A successful request returns a 200 status code and a JSON response indicating the number of deleted content items.
```http
GET /api/product/content/delete/all?productid={product_id}&token={token} HTTP/1.1
Host: api.digiseller.com
Content-Type: application/json
```
--------------------------------
### GET /api/agents/offer
Source: https://my.digiseller.com/inside/api/_catgoods
Fetches a list of goods for a seller, including optional filters for stock status, individual commissions, product name, and product ID. Requires an access token.
```APIDOC
## GET /api/agents/offer
### Description
Retrieves a list of goods a seller is offering. Supports filtering by stock status, individual commission status, product name, and product ID. Pagination is also supported.
### Method
GET
### Endpoint
https://api.digiseller.com/api/agents/offer
### Parameters
#### Query Parameters
- **sellerId** (Integer) - Required - The unique identifier of the seller.
- **onlyInStock** (Boolean) - Optional - Defaults to `false`. If `true`, only products currently in stock are returned.
- **onlyIndividual** (Boolean) - Optional - Defaults to `false`. If `true`, only products with individual commissions are returned.
- **productName** (String) - Optional - Filters products by name. Case-insensitive.
- **productId** (Integer) - Optional - Filters products by their unique identifier.
- **page** (Integer) - Required - The page number for pagination.
- **count** (Integer) - Required - The number of items to return per page. Must be between 1 and 100.
- **token** (String) - Required - The access token for authentication. Minimum permission required: 'Affiliate program - Individual offer'.
### Request Example
```json
{
"sellerId": 12345,
"onlyInStock": true,
"productName": "Example Product",
"page": 1,
"count": 20,
"token": "your_access_token_here"
}
```
### Response
#### Success Response (200)
- **retval** (Integer) - Result code. `0` indicates success.
- **retdesc** (String|null) - Description of the result code. `null` on success.
- **errors** (Array|null) - An array of errors if the request failed. `null` on success.
- **content** (Object) - Contains the response data if the request was successful.
- **page** (Integer) - The current page number.
- **count** (Integer) - The number of items returned on this page.
- **has_next_page** (Boolean) - Indicates if there is a next page of results.
- **has_previous_page** (Boolean) - Indicates if there is a previous page of results.
- **total_count** (Integer) - The total number of items available across all pages.
- **total_pages** (Integer) - The total number of pages.
- **items** (Array) - An array of product objects.
- **product_id** (Integer) - The unique identifier of the product.
- **name** (Array) - An array of name objects, each with a `locale` (String) and `value` (String).
- **price** (Float) - The price of the product.
- **currency** (String) - The currency of the price (e.g., "USD", "EUR").
- **in_affiliate** (Boolean) - Indicates if the product is part of an affiliate program.
- **global_percent** (Integer) - The global commission percentage set for the product.
- **individual_percent** (Integer) - The individual commission percentage for the seller.
- **last_change** (String|null) - The date and time of the last change in ISO 8601 format, or `null` if not applicable.
#### Error Response (400 or other)
- **retval** (Integer) - Result code. `1` indicates an error.
- **retdesc** (String|null) - A general description of the error.
- **errors** (Array) - An array of error objects, each containing:
- **code** (String) - The error code.
- **message** (String) - A description of the error.
- **content** (null) - This field will be `null` in case of errors.
#### Response Example (Success)
```json
{
"retval": 0,
"retdesc": null,
"errors": null,
"content": {
"page": 1,
"count": 11,
"has_next_page": true,
"has_previous_page": false,
"total_count": 42,
"total_pages": 4,
"items": [
{
"product_id": 1,
"name": [
{ "locale": "ru-RU", "value": "Sample name RU" },
{ "locale": "en-US", "value": "Sample name EN" }
],
"price": 0.04,
"currency": "USD",
"in_affiliate": true,
"global_percent": 0,
"individual_percent": 13,
"last_change": null
}
]
}
}
```
```
--------------------------------
### Example JSON Response for Adding File
Source: https://my.digiseller.com/inside/api/_content
Example JSON response after successfully adding a file. It includes a result code (retval), description (retdesc), null errors, and a content array with the new content ID and filename.
```JSON
{
"retval": 0,
"retdesc": "",
"errors": null,
"content": [
{
"content_id": 6403229,
"filename": "New Text Document.txt"
}
]
}
```
--------------------------------
### Calculate Product Price - JSON
Source: https://my.digiseller.com/inside/api/_catgoods
This snippet demonstrates how to calculate the price of a product by sending a GET request to the product price calculation endpoint. It includes parameters for product ID, options, currency, and quantity. The response provides detailed pricing information.
```json
{
"retval": 0,
"retdesc": "",
"data": {
"price": 100.00,
"count": 1,
"amount": 100.00,
"currency": "USD",
"commission": 5.00,
"sale_info": {
"common_base_price": 120.00,
"sale_percent": 16
}
}
}
```
--------------------------------
### GET /api/products/list
Source: https://my.digiseller.com/inside/api/_catgoods
Retrieve product details for a given list of product IDs. Supports specifying the language for the returned information.
```APIDOC
## GET /api/products/list
### Description
This endpoint allows you to quickly get product descriptions and other details from a list of product IDs.
### Method
GET
### Endpoint
https://api.digiseller.com/api/products/list
### Parameters
#### Query Parameters
- **ids** (integer) - Required - A comma-separated list of product IDs. Maximum 2000 IDs.
- **lang** (string) - Optional - The language for the product information. Defaults to 'ru-RU'. Accepts 'en-US' for English.
- **token** (string) - Optional - An authentication token. If provided and belongs to the product owner, hidden sales and stock data will be revealed.
### Request Example
```json
{
"ids": [123, 456, 789],
"lang": "en-US",
"token": "your_api_token"
}
```
### Response
#### Success Response (200)
- **id** (integer) - Product ID.
- **id_seller** (integer) - Seller ID.
- **name** (string) - Product name.
- **info** (string) - Product description.
- **add_info** (string) - Additional information about the product.
- **collection** (string) - Product content type (e.g., 'digi', 'pins', 'unit', 'book', 'soft').
- **base_currency** (string) - The base currency set by the seller.
- **base_price** (float) - The price in the base currency.
- **price_usd** (float) - Price in USD.
- **price_rub** (float) - Price in RUB.
- **price_eur** (float) - Price in EUR.
- **price_uah** (float) - Price in UAH.
- **cnt_sell** (integer) - Number of sales. -1 means completely hidden.
- **cnt_sell_hidden** (integer) - Display mode of sales number (0: visible, 1: hidden).
- **cnt_return** (integer) - Number of refunds. -1 means completely hidden.
- **cnt_return_hidden** (integer) - Refunds number display mode (0: visible, 1: hidden).
- **in_stock** (integer) - Product availability (0: out of stock, 1: in stock).
- **num_in_stock** (integer) - Quantity available for purchase.
- **num_in_lock** (integer) - Number of items reserved for payment.
- **owner_id** (integer) - Marketplace code.
- **release_date** (string) - Release date.
- **sale_info** (object) - Sale information.
- **common_base_price** (float) - Base price before sale.
- **common_price_usd** (float) - Price before sale in USD.
- **common_price_rur** (float) - Price before sale in RUR.
- **common_price_eur** (float) - Price before sale in EUR.
- **common_price_uah** (float) - Price before sale in UAH.
- **sale_begin** (string) - Sale start date.
- **sale_end** (string) - Sale expiration date.
- **sale_percent** (float) - Discount percentage.
#### Response Example
```json
[
{
"id": 0,
"id_seller": 0,
"name": "Example Product Name",
"info": "This is a detailed description of the example product.",
"add_info": "Additional details here.",
"collection": "unit",
"base_currency": "USD",
"base_price": 10.00,
"price_usd": 10.00,
"price_rub": 750.00,
"price_eur": 9.00,
"price_uah": 390.00,
"cnt_sell": 150,
"cnt_sell_hidden": 0,
"cnt_return": 5,
"cnt_return_hidden": 0,
"in_stock": 1,
"num_in_stock": 100,
"num_in_lock": 0,
"owner_id": 12345,
"release_date": null,
"sale_info": {
"common_base_price": 12.00,
"common_price_usd": 12.00,
"common_price_rur": 900.00,
"common_price_eur": 10.80,
"common_price_uah": 468.00,
"sale_begin": "30.12.2020 13:00:00",
"sale_end": "31.12.2020 20:00:00",
"sale_percent": 16.67
}
}
]
```
```
--------------------------------
### Example JSON Response for Adding Files from ZIP
Source: https://my.digiseller.com/inside/api/_content
Example JSON response after successfully adding multiple files from a ZIP archive. It returns a success code, an empty description, null errors, and a content array listing each added file with its content ID and filename.
```JSON
{
"retval": 0,
"retdesc": "",
"errors": null,
"content": [
{
"content_id": 6403229,
"filename": "New Text Document.txt"
},
{
"content_id": 6403230,
"filename": "New Text Document 2.txt"
}
]
}
```
--------------------------------
### Example XML Response Format
Source: https://my.digiseller.com/inside/api/_goods
This demonstrates the structure of a successful XML response from the API. It includes a result code, description, an empty errors element, and content with a status element.
```xml
0
Success
```
--------------------------------
### Product Discount API
Source: https://my.digiseller.com/inside/api/_catgoods
This API endpoint allows you to get a product discount by providing the product ID, currency, and customer's email.
```APIDOC
## POST /xml/shop_discount.asp
### Description
Retrieves product discount information based on product ID, currency, and customer email.
### Method
POST
### Endpoint
http://shop.digiseller.ru/xml/shop_discount.asp
### Parameters
#### Request Body
- **product[id]** (integer) - Required - Item ID.
- **product[currency]** (string) - Required - Currency type (USD, RUR, EUR, UAH, or mBTC).
- **email** (string) - Required - Customer's email address.
### Request Example
```json
{
"product": {
"id": "12345",
"currency": "USD"
},
"email": "customer@example.com"
}
```
### Response
#### Success Response (0)
- **retval** (integer) - Result code (0 indicates request sent).
- **retdesc** (string) - Decryption of the request execution code.
- **product[price]** (number) - The discounted price in the specified WM currency.
- **discount[percent]** (number) - Discount percentage.
- **discount[total]** (number) - The total cost of purchases (always in USD).
- **discount[currency]** (string) - Currency type (always in USD).
#### Response Example
```json
{
"retval": 0,
"retdesc": "Request sent successfully.",
"product": {
"price": 90.00
},
"discount": {
"percent": 10,
"total": 90.00,
"currency": "USD"
}
}
```
```
--------------------------------
### Product Image API
Source: https://my.digiseller.com/inside/api/_catgoods
This endpoint allows you to quickly get the main product image. For a full list of product images, you need to use the 'Product description' method.
```APIDOC
## GET /img.ashx
### Description
Retrieves the main product image. For a full list of images, use the 'Product description' method.
### Method
GET
### Endpoint
`//graph.digiseller.ru/img.ashx`
### Query Parameters
- **id_d** (integer) - Required - Item ID.
- **maxlength** (integer) - Optional - The maximum length in pixels on the longer side of the rectangle. Alternatively, you can specify width and/or height using `w` and `h` parameters.
- **w** (integer) - Optional - The maximum product width.
- **h** (integer) - Optional - The maximum product height. Can be specified together or individually; the proportion of the source image will be preserved.
- **crop** (boolean) - Optional - Clipping of the long sides of rectangles to form squares. Accepts `true` or `false`.
### Request Example
```
//graph.digiseller.ru/img.ashx?id_d=2029463&maxlength=400
//graph.digiseller.ru/img.ashx?id_d=2029463&w=200&h=150&crop=true
```
### Response
#### Success Response (200)
- **Image Data** - The image file itself.
```
--------------------------------
### Clone Product Description Response
Source: https://my.digiseller.com/inside/api/_catgoods
Example response formats for the product cloning API call, shown in both XML and JSON. The response indicates the success or failure of the operation and provides details about any errors encountered. Upon success, it returns an array of newly created product IDs.
```JSON
{
"retval": 0,
"retdesc": "",
"errors": null,
"content": {
"products": [
23387571,
23387572,
23387573
]
}
}
```
--------------------------------
### GET /api/templates/products
Source: https://my.digiseller.com/inside/api/_templates
Retrieves a list of products from a deduction template, with various filtering options.
```APIDOC
## GET /api/templates/products
### Description
Retrieves a list of products associated with a specific deduction template. This endpoint allows for filtering by product ID, price range, currency, language, commission rates, affiliate status, and payment availability. Pagination is supported.
### Method
GET
### Endpoint
https://api.digiseller.com/api/templates/products
### Parameters
#### Query Parameters
- **templateId** (Integer) - Required - The ID of the template.
- **page** (Integer) - Required - The page number for pagination.
- **count** (Integer) - Required - The number of items per page (1-100).
- **productId** (Integer) - Optional - Filters by a specific product ID.
- **priceMin** (Float) - Optional - Filters products with a minimum price.
- **priceMax** (Float) - Optional - Filters products with a maximum price.
- **currency** (String) - Optional - Filters by currency (RUB, USD, UAH, EUR).
- **language** (String) - Optional - Filters by language ('ru-RU', 'en-US').
- **name** (String) - Optional - Filters by product name.
- **minComiss** (Float) - Optional - Filters by minimum commission percentage.
- **maxComiss** (Float) - Optional - Filters by maximum commission percentage.
- **inAffiliate** (Boolean) - Optional - Include products in affiliate program (default: true).
- **notInAffiliate** (Boolean) - Optional - Exclude products from affiliate program (default: true).
- **onlyPayment** (Boolean) - Optional - Filter for products only available for payment (default: false).
- **token** (String) - Required - Access token with 'Comission templates: _View_' permission.
### Request Example
```
GET /api/templates/products?templateId=1&page=1&count=10&productId=2339982¤cy=USD&language=en-US&token=YOUR_ACCESS_TOKEN
```
### Response
#### Success Response (200)
- **retval** (Integer) - Result code (0 for success).
- **retdesc** (null) - Description of the result code.
- **errors** (null) - Null if no errors.
- **content** (Object) - Response body.
- **page** (Integer) - Current page number.
- **count** (Integer) - Number of items on the current page.
- **has_next_page** (Boolean) - Indicates if there is a next page.
- **has_previous_page** (Boolean) - Indicates if there is a previous page.
- **total_count** (Integer) - Total number of items available.
- **total_pages** (Integer) - Total number of pages.
- **items** (Array) - Array of product objects.
- **id** (Integer) - Product ID.
- **name** (String) - Product name.
- **price** (Float) - Product price.
- **currency** (String) - Product currency.
- **added_in_affiliate** (Boolean) - Whether the product is in the affiliate program.
- **percent** (Integer) - Commission percentage set in the template.
- **global_percent** (Integer) - Commission percentage set in product settings.
- **modified** (Date) - Last modification date (ISO 8601).
#### Response Example
```json
{
"retval": 0,
"retdesc": null,
"errors": null,
"content": {
"page": 1,
"count": 10,
"has_next_page": true,
"has_previous_page": false,
"total_count": 20,
"total_pages": 2,
"items": [
{
"id": 2339982,
"name": "test product #1",
"price": 7286.74,
"currency": "RUR",
"added_in_affiliate": false,
"percent": null,
"global_percent": 1,
"modified": null
},
{
"id": 2339983,
"name": "test product #2",
"price": 99,
"currency": "RUR",
"added_in_affiliate": false,
"percent": 5,
"global_percent": 1,
"modified": "2019-04-24T13:53:20.5170000"
}
]
}
}
```
```
--------------------------------
### Edit Software Product - XML Request Example
Source: https://my.digiseller.com/inside/api/_goods
This XML snippet illustrates the structure for editing a software product. It mirrors the JSON structure, providing product details, pricing, category information, and other configurable options. Use this format when the `Content-Type` header is set to `text/xml`.
```xml
true
-
ru-RU
Тестовый продукт №1
-
en-US
Test product №1
725
RUB
15
-
0
7074
-
1
18162
false
5
true
5
-
ru-RU
Тестовое описание
-
en-US
Test description
-
ru-RU
Тестовая дополнительная информация
-
en-US
Test additional information
false
http://localhost
text
-
ru-RU
Русская инструкция
-
en-US
English instruction
123321
Тестовый продукт №1
Goods
no_vat
```
--------------------------------
### Edit Software Product - JSON Request Example
Source: https://my.digiseller.com/inside/api/_goods
This JSON snippet demonstrates how to format a request to edit a software product. It includes essential fields like product name, price, currency, categories, commission, bonus, guarantee, description, and online checkout details. Ensure all fields are correctly populated according to the API specifications.
```json
{
"enabled": true,
"name": [
{
"locale": "ru-RU",
"value": "Тестовый продукт №1"
},
{
"locale": "en-US",
"value": "Test product №1"
}
],
"price": {
"price": 725,
"currency": "RUB"
},
"comission_partner": 15,
"categories": [
{
"owner": 0,
"category_id": 7074
},
{
"owner": 1,
"category_id": 18162
}
],
"bonus": {
"enabled": false,
"percent": 5
},
"guarantee": {
"enabled": true,
"value": 5
},
"description": [
{
"locale": "ru-RU",
"value": "Тестовое описание"
},
{
"locale": "en-US",
"value": "Test description"
}
],
"add_info": [
{
"locale": "ru-RU",
"value": "Тестовая дополнительная информация"
},
{
"locale": "en-US",
"value": "Test additional information"
}
],
"address_required": false,
"trial_url": "http://localhost",
"instruction": {
"type": "text",
"locales": [
{
"locale": "ru-RU",
"value": "Русская инструкция"
},
{
"locale": "en-US",
"value": "English instruction"
}
]
},
"present_product_id": 123321,
"online_checkout_name": "Тестовый продукт №1",
"online_checkout_category": "Goods",
"online_checkout_tax": "no_vat"
}
```
--------------------------------
### Create/Update Form Content - XML Request Example
Source: https://my.digiseller.com/inside/api/_content
An example of an XML request body to create or update product content of type 'form' via the Digiseller API. It mirrors the JSON structure with elements for product_id, address, method, encoding, and optional purchase-related settings.
```xml
1
sample@email.ru
Email
UTF8
true
true
true
https://url-for-sending-a-request-with-the-quantity-specified-by-the-buyer.com/
```
--------------------------------
### Get Product Parameter List (API)
Source: https://my.digiseller.com/inside/api/_parameters
Retrieves a list of parameters and their variants for a given product. Requires a product ID and an access token. Supports both XML and JSON response formats.
```json
{
"retval": 0,
"retdesc": null,
"errors": null,
"content": [
{
"id": 110837,
"type": "checkbox",
"comment": null,
"order": 1,
"name": [
{
"locale": "ru-RU",
"value": "test parameter"
}
]
},
{
"id": 110931,
"type": "select",
"comment": null,
"order": 17,
"name": [
{
"locale": "ru-RU",
"value": "test parameter 2"
}
]
}
]
}
```
--------------------------------
### Sales Statistics Response Example (JSON)
Source: https://my.digiseller.com/inside/api/_statistics
This is an example of a successful JSON response from the Agent Sales API v2. It contains metadata like total rows and pages, along with a list of individual sales records, each detailed with information such as seller ID, product ID, payment date, and amount.
```json
{
"retval": 0,
"retdesc": null,
"total_rows": 62,
"pages": 7,
"page": 1,
"rows": [
{
"id_seller": 12126,
"invoice_id": 60056190,
"product_id": 1954830,
"product_name": "Unique code",
"product_entry_id": 41609385,
"date_pay": "2017-03-09 13:53:19",
"email": "email@example.com",
"wmid": "000000000000",
"amount_in": 9.99,
"amount_currency": "WMR",
"method_pay": "Merchant",
"aggregator_pay": "WebMoney",
"ip": "127.0.0.1",
"partner_percent": 1.5,
"partner_amount": 0.15,
"lang": "ru-RU",
"returned": 0
}
]
}
```
--------------------------------
### GET /api/reviews
Source: https://my.digiseller.com/inside/api/_catgoods
Retrieves product reviews for a given seller and product. Supports filtering by review type and pagination.
```APIDOC
## GET /api/reviews
### Description
Retrieves product reviews for a specific seller and product. You can filter reviews by type (positive, negative, or all) and paginate the results. The language of the review information can also be specified.
### Method
GET
### Endpoint
https://api.digiseller.com/api/reviews
### Parameters
#### Query Parameters
- **seller_id** (integer) - Required - The unique identifier for the seller.
- **product_id** (integer) - Required - The unique identifier for the product.
- **type** (string) - Optional - Filters reviews by type. Accepted values: 'good' (positive), 'bad' (negative), 'all' (all types).
- **owner_id** (integer) - Optional - Marketplace identifier. Use 0 for own shop, 1 for plati.market, 1271 for ggesel, 9295 for wmcenter.net.
- **page** (integer) - Optional - The page number for pagination. Defaults to the first page if not specified.
- **rows** (integer) - Optional - The number of reviews to display per page.
- **lang** (string) - Optional - The display language for the review information. Accepted values: 'ru-RU' (default) or 'en-US'.
### Request Example
```json
{
"example": "https://api.digiseller.com/api/reviews?seller_id=12345&product_id=67890&type=good&page=1&rows=10&lang=en-US"
}
```
### Response
#### Success Response (200)
- **retval** (integer) - Result code (0 indicates success).
- **retdesc** (string) - Description of the request execution result.
- **totalPages** (integer) - The total number of pages available for the reviews.
- **totalItems** (integer) - The total number of reviews matching the criteria.
- **totalGood** (integer) - The total count of positive reviews.
- **totalBad** (integer) - The total count of negative reviews.
- **reviews** (array) - An array of review objects.
- **id** (integer) - The unique identifier for the review.
- **invoice_id** (integer) - The identifier of the order associated with the review.
- **owner_id** (integer) - Marketplace identifier where the review originated.
- **type** (string) - The type of feedback ('good' or 'bad').
- **good** (integer) - Indicates if the review is positive (1 if good, 0 otherwise).
- **name** (string) - The name of the product.
- **date** (string) - The date the review was submitted.
- **info** (string) - The content of the review.
- **comment** (string) - Any comment added by the seller.
- **product_id** (integer) - The identifier of the product reviewed.
#### Response Example (JSON)
```json
{
"retval": 0,
"retdesc": "",
"totalPages": 5,
"totalItems": 50,
"totalGood": 30,
"totalBad": 20,
"reviews": [
{
"id": 101,
"invoice_id": 5001,
"owner_id": 1,
"type": "good",
"good": 1,
"name": "Example Product",
"date": "2023-10-27T10:00:00Z",
"info": "Great product, highly recommend!",
"comment": "Thank you for your purchase!",
"product_id": 67890
}
// ... more reviews
]
}
```
#### Response Example (XML)
```xml
0
5
50
30
20
Example Product
2023-10-27T10:00:00Z
Great product, highly recommend!
Thank you for your purchase!
```
```
--------------------------------
### JSON Request for Seller Goods
Source: https://my.digiseller.com/inside/api/_catgoods
This is an example of a JSON request to the Digiseller API for fetching seller goods. It demonstrates the structure for specifying seller details, sorting preferences, and display options.
```json
{ "id_seller": 12126, "order_col": "cntsell", "order_dir": "desc", "rows": 10, "page": 1, "currency": "RUR", "lang": "ru-RU", "show_hidden": 1, "owner_id": null }
```
--------------------------------
### Create/Update Form Content - JSON Request Example
Source: https://my.digiseller.com/inside/api/_content
An example of a JSON request body to create or update product content of type 'form' via the Digiseller API. It includes essential fields like product_id, address, method, encoding, and optional fields for purchase settings and URLs.
```json
{
"product_id": 1,
"address": "sample@email.ru",
"method": "Email",
"encoding": "UTF8",
"options": true,
"answer": true,
"allow_purchase_multiple_items": "true",
"url_for_quantity": "https://url-for-sending-a-request-with-the-quantity-specified-by-the-buyer.com/"
}
```
--------------------------------
### Getting a list of dialogs
Source: https://my.digiseller.com/inside/api/_debates
Retrieves a list of dialogues with buyers. Supports filtering by unread messages, buyer email, product ID, and pagination.
```APIDOC
## GET /api/debates/v2/chats
### Description
Retrieves a list of dialogues with buyers. Supports filtering by unread messages, buyer email, product ID, and pagination.
### Method
GET
### Endpoint
https://api.digiseller.com/api/debates/v2/chats
### Parameters
#### Query Parameters
- **token** (string) - Required - Access token with at least 'Correspondence with buyers: View' permission.
- **filter_new** (integer) - Optional - Filter for unread messages. `0` for all dialogs, `1` for dialogs with unread messages only. Defaults to `0`.
- **email** (string) - Optional - Filter by buyer's email.
- **id_ds** (string) - Optional - Filter by product ID. Use comma as separator (e.g., `id_ds=1,2,3`).
- **pagesize** (integer) - Optional - Number of items per page. Maximum value is `200`. Defaults to `20`.
- **page** (integer) - Optional - Page number. Defaults to `1`.
### Response
#### Success Response (200)
- **cnt_pages** (integer) - The total number of pages.
- **items** (array) - An array of dialog objects.
- **items.id_i** (integer) - The order number (dialog ID).
- **items.email** (string) - The buyer's email address.
- **items.product** (string) - The name of the product.
- **items.last_date** (string) - The date and time of the last message.
- **items.cnt_msg** (integer) - The total number of messages in the dialog.
- **items.cnt_new** (integer) - The number of unread messages in the dialog.
#### Response Example
```json
{
"cnt_pages": 5,
"items": [
{
"id_i": 129647692,
"email": "user@example.com",
"product": "digital product",
"last_date": "2022-02-10 20:37:19",
"cnt_msg": 16,
"cnt_new": 3
}
]
}
```
```
--------------------------------
### JSON Response Example for Digiseller API
Source: https://my.digiseller.com/inside/api/_goods
Illustrates the expected JSON response format from the Digiseller API upon successful execution. This format includes a return value, description, error details, and content, such as a product ID.
```json
{
"retval": 0,
"retdesc": "",
"errors": null,
"content": {
"product_id": 2338757
}
}
```
--------------------------------
### GET /api/shop/products
Source: https://my.digiseller.com/inside/api/_catgoods
Retrieves a list of products from a specified category within the DigiSeller shop. Supports filtering by various criteria and sorting options.
```APIDOC
## GET /api/shop/products
### Description
Retrieves a list of products from a specified category. Allows filtering by seller, category, selection options (main page, discount, new, popular), pagination, sorting, currency, and language.
### Method
GET
### Endpoint
https://api.digiseller.com/api/shop/products
### Parameters
#### Path Parameters
None
#### Query Parameters
- **seller_id** (integer) - Required - The unique identifier for the seller.
- **category_id** (integer) - Required - The unique identifier for the category.
- **selection_option** (integer) - Optional - Defines product selection:
- `0`: Products added to the main page.
- `-1`: Products with a “discount” tag.
- `-2`: Products with a “new” tag.
- `-3`: Products with a “popular” tag.
- **page** (integer) - Optional - The page number to retrieve (defaults to 1).
- **rows** (integer) - Optional - The number of rows per page (defaults to 20, max 500).
- **order** (string) - Optional - The product sorting type. Possible values: `name`, `nameDESC`, `price`, `priceDESC`.
- **currency** (string) - Optional - The currency type for displaying product prices. Possible values: `USD`, `RUR`, `EUR`, `UAH`.
- **lang** (string) - Optional - The display language for the information (defaults to `ru-RU`, can be `en-US`).
### Request Example
```json
{
"seller_id": 12345,
"category_id": 67890
}
```
### Response
#### Success Response (200)
- **retval** (string) - Result code (0 indicates success).
- **retdesc** (string) - Description of the request execution result.
- **lang** (string) - The language of the returned data.
- **totalPages** (string) - Total number of pages available.
- **totalItems** (string) - Total number of items available.
- **breadCrumbs** (array) - An array of objects representing the category path.
- **id** (string) - Category ID.
- **name** (string) - Category name.
- **categories** (array) - An array of objects representing subcategories.
- **id** (string) - Subcategory ID.
- **name** (string) - Subcategory name.
- **hasImg** (string) - Indicates if the category has an image (0 or 1).
- **cnt** (string) - Number of items in the subcategory.
- **product** (array) - An array of product objects.
- **id** (string) - Product ID.
- **name** (string) - Product name.
- **cntImg** (string) - Number of images for the product.
- **info** (string) - Product description.
- **price** (string) - Product price.
- **base_price** (string) - The price in the seller's base currency.
- **base_currency** (string) - The seller's base currency.
- **currency** (string) - The currency of the displayed price.
- **price_rub** (string) - Price in RUB.
- **price_usd** (string) - Price in USD.
- **price_eur** (string) - Price in EUR.
- **price_uah** (string) - Price in UAH.
- **partner_comiss** (string) - Partner commission percentage.
- **agency_id** (string) - Partner ID.
- **collection** (string) - Product content type (e.g., digi, pins, unit, book, soft).
- **is_available** (integer) - Product availability (0: out of stock, 1: in stock).
- **has_discount** (integer) - Indicates if a discount is applied (0: no, 1: yes).
- **id_present** (integer) - ID of a present item (0 if not set).
- **sale_info** (object) - Sale information object.
- **common_base_price** (string) - Base price before the sale.
- **common_price_usd** (string) - Price before sale in USD.
- **common_price_rur** (string) - Price before sale in RUR.
- **common_price_eur** (string) - Price before sale in EUR.
- **common_price_uah** (string) - Price before sale in UAH.
- **sale_end** (string) - Sale expiration date.
- **sale_percent** (string) - Discount percentage.
- **label** (string) - Tag indicating sale, new, or top status.
#### Response Example
```json
{
"retval": "0",
"retdesc": "",
"lang": "en-US",
"totalPages": "10",
"totalItems": "200",
"breadCrumbs": [
{
"id": "1",
"name": "Games"
}
],
"categories": [
{
"id": "2",
"name": "Shooters",
"hasImg": "1",
"cnt": "50"
}
],
"product": [
{
"id": "101",
"name": "Awesome Game",
"cntImg": "3",
"info": "An exciting shooter experience.",
"price": "19.99",
"base_price": "19.99",
"base_currency": "USD",
"currency": "USD",
"price_rub": "1500.00",
"price_usd": "19.99",
"price_eur": "18.50",
"price_uah": "700.00",
"partner_comiss": "5.0",
"agency_id": "987",
"collection": "digi",
"is_available": 1,
"has_discount": 0,
"id_present": 0,
"sale_info": {
"common_base_price": "",
"common_price_usd": "",
"common_price_rur": "",
"common_price_eur": "",
"common_price_uah": "",
"sale_end": "",
"sale_percent": ""
},
"label": ""
}
]
}
```
```