• Notifications
  • Messages
  • Complaints
  • Offers
  • Chats
  • Logout
  • РУС ENG

API




Create a commission template

URL and request format https://api.digiseller.ru/api/templates?token={token}
Method: POST
Request headers: Content-Type: "text/xml" | "text/json" | "application/json" - Request format Accept: "text/xml" | "text/json" | "application/json" - Response format
XML request format JSON request format xml json <request> <name>comission template name</name> </request> { "name": "comission template name" }
Request parameters:
Name Use Comment
name Template name String
token Access token,
min. permission: [ Comission templates ]: Create
Method for creating access token
XML response format: JSON response format: xml json <response> <retval>0</retval> <retdesc>Return description</retdesc> <content> <id>1</id> <name>comission template name</name> <seller_id>1</seller_id> <created>2019-04-14T06:06:40.9300000</created> <modified>2019-04-15T07:03:14.9630000</modified> </content> </response> { "retval": 0, "retdesc": null, "errors": null, "content": { "id": 1, "name": "comission template name", "seller_id": 1, "created": "2019-06-13T13:51:28.2270000", "modified": "2019-06-13T13:51:28.2270000" } }
Response parameters:
Name Use Comment
retval Result code 0 - success, 1 - error. Detailed information in field 'errors'
retdesc Description of result code Detailed information in field 'errors'
errors Result code Null - errors count is 0. if request is invalid, in this field this field will contain an array of errors
errors\code Error code String
errors\message Description of result code String
content Response body If request is invalid, this field will be null
content\id Template Id Integer
content\name Template name String
content\seller_id Seller ID Integer
content\created Date of creation Date and time (ISO 8601)
content\modified Last change Date and time (ISO 8601)



Edit a commission template

URL and request format https://api.digiseller.ru/api/templates/{id}?token={token}
Method: POST
Request headers: Content-Type: "text/xml" | "text/json" | "application/json" - Request format Accept: "text/xml" | "text/json" | "application/json" - Response format
XML request format JSON request format xml json <request> <name>comission template name</name> </request> { "name": "comission template name" }
Request parameters:
Name Use Comment
name Template name String
id Template Id Integer
token Access token,
min. permission: [ Comission templates ]: Edit
Method for creating access token
XML response format: JSON response format: xml json <response> <retval>0</retval> <retdesc>Return description</retdesc> <content> <id>1</id> <name>comission template name</name> <seller_id>1</seller_id> <created>2019-04-14T06:06:40.9300000</created> <modified>2019-04-15T07:03:14.9630000</modified> </content> </response> { "retval": 0, "retdesc": null, "errors": null, "content": { "id": 1, "name": "comission template name", "seller_id": 1, "created": "2019-06-13T13:51:28.2270000", "modified": "2019-06-13T13:51:28.2270000" } }
Response parameters:
Name Use Comment
retval Result code 0 - success, 1 - error. Detailed information in field 'errors'
retdesc Description of result code Detailed information in field 'errors'
errors Result code Null - errors count is 0. if request is invalid, in this field this field will contain an array of errors
errors\code Error code String
errors\message Description of result code String
content Response body If request is invalid, this field will be null
content\id Template Id Integer
content\name Template name String
content\seller_id Seller ID Integer
content\created Date of creation Date and time (ISO 8601)
content\modified Last change Date and time (ISO 8601)



Get list of commission templates

URL and request format https://api.digiseller.ru/api/templates?page={page}&count={count}&token={token}
Method: GET
Request headers: Accept: "text/xml" | "text/json" | "application/json" - Response format
Request parameters:
Name Use Comment
page Page number Integer
count Number per page Integer (1 - 100)
token Access token,
min. permission: [ Comission templates ]: View
Method for creating access token
XML response format: JSON response format: xml json <response> <retval>0</retval> <content> <page>1</page> <count>10</count> <total_count>2</total_count> <total_pages>1</total_pages> <items> <id>1</id> <name>commission template 1</name> <seller_id>1</seller_id> <created>2019-04-24T13:48:51.0700000</created> <modified>2019-04-24T13:48:51.0700000</modified> </items> <items> <id>2</id> <name>commission template 1</name> <seller_id>1</seller_id> <created>2019-04-24T13:53:20.5170000</created> <modified>2019-04-24T13:53:20.5170000</modified> </items> </content> </response> { "retval": 0, "retdesc": null, "errors": null, "content": { "page": 1, "count": 10, "has_next_page": true, "has_previous_page": false, "total_count": 2, "total_pages": 1, "items": [ { "id": 1, "name": "commission template #1", "seller_id": 1, "created": "2019-04-24T13:48:51.0700000", "modified": "2019-04-24T13:48:51.0700000" }, { "id": 2, "name": "commission template #2", "seller_id": 1, "created": "2019-04-24T13:53:20.5170000", "modified": "2019-04-24T13:53:20.5170000" } ] } }
Response parameters:
Name Use Comment
retval Result code 0 - success, 1 - error. Detailed information in field 'errors'
retdesc Description of result code Detailed information in field 'errors'
errors Result code Null - errors count is 0. if request is invalid, in this field this field will contain an array of errors
errors\code Error code String
errors\message Description of result code String
content Response body If request is invalid, this field will be null
content\page Page Integer
content\count Count Integer
content\total_count Total elements count Integer
content\total_pages Total pages num Integer
content\items Array of elements Array
content\items\id Template Id Integer
content\items\name Template name String
content\items\seller_id Seller ID Integer
content\items\created Date of creation Date and time (ISO 8601)
content\items\modified Last change Date and time (ISO 8601)



Delete a commission template

URL and request format POST: https://api.digiseller.ru/api/templates/delete/{id}?token={token}
DELETE: https://api.digiseller.ru/api/templates/{id}?token={token}
Method: POST/DELETE
Request parameters:
Name Use Comment
id Template Id Integer
token Access token,
min. permission: [ Comission templates ]: Delete
Method for creating access token
Response: StatusCode: 204 (NoContent)



Getting the list of products from the deduction template

URL and request format https://api.digiseller.ru/api/templates/products?templateId={templateId}&page={page}&count={count}&productId={productId}&priceMin={priceMin}&priceMax={priceMax}&currency={currency}&language={language}&name={name}&maxComiss={maxComiss}&minComiss={minComiss}&inAffiliate={inAffiliate}&notInAffiliate={notInAffiliate}&onlyPayment={onlyPayment}&token={token}
Method: GET
Request headers: Accept: "application/json" - Response format
Request parameters:
Name Use Comment
templateId Template Id Integer
productId Item id Integer. optional field
priceMin Minimum price Float. optional field
priceMax Maximum price Float. optional field
currency Currency RUB|USD|UAH|EUR
language The information display language String. available values: 'ru-RU', 'en-US'
name Search line String. optional field
minComiss Minimum commission Float. optional field
maxComiss Maximum commission Float. optional field
inAffiliate Display affiliate products Boolean. by default: true
notInAffiliate Display non-affiliate products Boolean. by default: true
onlyPayment Only available products for payment Boolean. by default: false
page Page number Integer
count Number per page Integer (1 - 100)
token Access token,
min. permission: [ Comission templates ]: View
Method for creating access token
JSON response format: 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" } ... ] } }
Response parameters:
Name Use Comment
retval Result code 0 - success, 1 - error. Detailed information in field 'errors'
retdesc Description of result code Detailed information in field 'errors'
errors Result code Null - errors count is 0. if request is invalid, in this field this field will contain an array of errors
errors\code Error code String
errors\message Description of result code String
content Response body If request is invalid, this field will be null
content\page Page Integer
content\count Count Integer
content\total_count Total elements count Integer
content\total_pages Total pages num Integer
content\items Array of elements Array
content\items\id Item id Integer
content\items\name Item name String
content\items\price Price Float
content\items\currency Currency RUB|USD|UAH|EUR
content\items\added_in_affiliate The item is part of an affiliate program Boolean
content\items\percent The percentage of deductions in the template Integer
content\items\global_percent The percentage of deductions in the settings of the product Integer
content\items\modified Last change Date and time (ISO 8601)



Product update in the commission template

URL and request format https://api.digiseller.ru/api/templates/products?token={token}
Method: POST
Request headers: Content-Type: "text/xml" | "text/json" | "application/json" - Request format Accept: "text/xml" | "text/json" | "application/json" - Response format
XML request format JSON request format xml json <request> <template_id>1</template_id> <products> <product_id>1</product_id> <percent>2</percent> </products> <products> <product_id>2</product_id> <percent>5</percent> </products> </request> { "template_id": 1, "products": [ { "product_id": 1, "percent": 2 }, { "product_id": 2, "percent": 5 } ] }
Request parameters:
Name Use Comment
template_id Template Id Integer. required field
products Product list Array. required field
products\product_id Item id Integer. required field
products\percent The percentage of deductions in the template Integer. required field
token Access token,
min. permission: [ Comission templates ]: Edit
Method for creating access token
Response: StatusCode: 204 (NoContent)



Applying a commission template

URL and request format https://api.digiseller.ru/api/templates/apply?token={token}
Method: POST
Request headers: Content-Type: "text/xml" | "text/json" | "application/json" - Request format Accept: "text/xml" | "text/json" | "application/json" - Response format
XML request format JSON request format xml json <request> <template_id>1</template_id> <seller_id>1</seller_id> </request> { "template_id": 1, "seller_id": 1 }
Request parameters:
Name Use Comment
template_id Template Id Integer. required field
seller_id Seller ID Integer. required field
token Access token,
min. permission: [ Comission templates ]: Apply
Method for creating access token
Response: StatusCode: 204 (NoContent)