URL and request format
|
https://api.digiseller.com/api/products/options?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
ru-RU
тестовый параметр
en-US
test param
select
true
true
true
1
12345
ru-RU
тестовый вариант
en-US
test variant
priceplus
1
true
1
ru-RU
тестовый вариант 2
en-US
test variant 2
percentminus
1
true
2
{
"name": [
{
"locale": "ru-RU",
"value": "тестовый параметр"
},
{
"locale": "en-US",
"value": "test param"
}
],
"comment": null,
"type": "select",
"separate_content": true,
"required": true,
"modifier_visible": true,
"order": 1,
"product_id": 12345,
"variants": [
{
"name": [
{
"locale": "ru-RU",
"value": "тестовый вариант"
},
{
"locale": "en-US",
"value": "test variant"
}
],
"type": "priceplus",
"rate": 1,
"default": true,
"order": 1
},
{
"name": [
{
"locale": "ru-RU",
"value": "тестовый вариант 2"
},
{
"locale": "en-US",
"value": "test variant 2"
}
],
"type": "percentminus",
"rate": 1,
"default": false,
"order": 2
}
]
}
|
Request parameters:
|
Name |
Use |
Comment |
name |
Parameter label |
Array |
name\locale |
Localization ('ru-RU' or 'en-US') |
String |
name\value |
Localization value |
String |
comment |
Comment |
Array |
comment\locale |
Localization ('ru-RU' or 'en-US') |
String |
comment\value |
Localization value |
String |
type |
Parameter type |
String. available values: 'textarea', 'checkbox', 'text', 'radio', 'select' |
separate_content |
Indication of separate content by product parameter variant |
Boolean |
required |
Parameter is required |
Boolean |
modifier_visible |
Hide price modifier |
Boolean |
order |
Sorting number (starts from 1) |
Integer |
variants |
Variant list |
Array |
variants\name |
Option label |
Array |
variants\name\locale |
Localization ('ru-RU' or 'en-US') |
String |
variants\name\value |
Localization value |
String |
variants\type |
Price modifier |
String. available values: 'percentplus', 'percentminus', 'priceplus', 'priceminus' |
variants\rate |
Modifier value |
Float |
variants\default |
Default |
Boolean |
variants\order |
Sorting number (starts from 1) |
Integer |
token |
Access token, min. permission: [ Parameters ]: Create |
Method for creating access token |
|
XML response format:
JSON response format:
|
xml
json
0
Return description
1
{
"retval": 0,
"retdesc": null,
"errors": null,
"content": {
"option_id": 12345
}
}
|
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\option_id |
Parameter ID |
Integer |
|