...
The Reseller API is a RESTful service. All data is returned in JSON format. The API is located at:
Code Blocknoformat |
---|
https://www.blesta.com/plugin/blesta_reseller/v2/index/ |
...
Code Block | ||
---|---|---|
| ||
curl https://www.blesta.com/plugin/blesta_reseller/v2/index/getcredit.json -u USERNAME:PASSWORD |
Code Blocknoformat | ||
---|---|---|
| ||
{ "response": 50.25 } |
Get Packages
...
Code Block | ||
---|---|---|
| ||
curl https://www.blesta.com/plugin/blesta_reseller/v2/index/getpackages.json -u USERNAME:PASSWORD |
Code Block | title | Response
---|
No Format |
{ "response":[ { "id":"25", "name":"Blesta Monthly License", "description":"", "description_html":"", "qty":null, "id_code":"25", "pricing":[ { "id":"49", "term":"1", "period":"month", "price":"13.0000", "setup_fee":"0.0000", "cancel_fee":"0.0000", "currency":"USD" } ] }, { "id":"26", "name":"Blesta Owned License", "description":"", "description_html":"", "qty":null, "id_code":"26", "pricing":[ { "id":"32", "term":"0", "period":"onetime", "price":"95.0000", "setup_fee":"0.0000", "cancel_fee":"0.0000", "currency":"USD" } ] } ] } |
...
Code Block | ||
---|---|---|
| ||
curl https://www.blesta.com/plugin/blesta_reseller/v2/index/getpackagepricing.json?package_id=PACKAGE_ID -u USERNAME:PASSWORD |
Code Blocknoformat | ||
---|---|---|
| ||
{ "response":[ { "id":"49", "term":"1", "period":"month", "price":"13.0000", "setup_fee":"0.0000", "cancel_fee":"0.0000", "currency":"USD" } ] } |
...
Code Block | ||
---|---|---|
| ||
curl https://www.blesta.com/plugin/blesta_reseller/v2/index/addlicense.json -u USERNAME:PASSWORD -d "vars[pricing_id]=PRICING_ID&vars[test_mode]=true" |
Code Blocknoformat | ||
---|---|---|
| ||
{ "response":"abcdef0123456789" } |
...
Code Block | ||
---|---|---|
| ||
curl https://www.blesta.com/plugin/blesta_reseller/v2/index/search.json?vars[search]=SEARCH_STRING&vars[page]=1 -u USERNAME:PASSWORD |
Code Blocknoformat | ||
---|---|---|
| ||
{
"response":[{
"id":"49",
"status":"suspended",
"date_added":"2012-11-03 17:57:03",
"date_renews":null,
"date_suspended":"2013-08-17 17:00:03",
"date_canceled":null,
"pricing_id":"32",
"term":"0",
"period":"onetime",
"fields":{
"license_module_callhome":"",
"license_module_domains":[
"domain1.com",
"domain2.com"
],
"license_module_ips":[
"192.168.0.1",
"192.168.0.2"
],
"license_module_key":"abcdef0123456789",
"license_module_paths":[
"\/var\/www\/public_html\/"
],
"license_module_status":"",
"license_module_version":""
}
}]
} |