BountySite Provisioning API
Introduction
BountySite allows Partners to manage provisioning of Packages, using their own selling platform. This allows to integrate BountySite along with your existing hosting services. Every Partner account has its own API Key. API Keys are used to manage each account individually, and are restricted to source IP address for added security. API URL is unique for every Partner Account.
To get started, you need the below:-
- Get Provisioning API URL from your hosting provider. Eg api-{provider}.bountysite.com
- Copy Provisioning API key from your BountySite control panel
Manage API Key ACL page:-
- a : Click on Copy button to copy API Host/URL to your clipboard, for API URL
- b : Click on Copy button to copy API Key to your clipboard, for API Key
- c : By default API is blocked for public access. To allow your host to make API calls, add your public internet IPaddress in CIDR format(x.x.x.x/32 or range x.x.x.x/28). You can give multiple IPs separated by commas.
Available Services
The following services are available on BountySite Provisioning API:-
- Validate Partner API Key
- Get All Packages
- Add Site
- Get Bought Packages
- Buy Package
- Upgrade Package
- Terminate Package
- Unsuspend Package
Validate Partner API Key
Validate Partner API Key is used to validate the API Credentials. Here it the combinations of the headers authorization and partner.
URL : /ValidatePartnerAPIKey
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/ValidatePartnerAPIKey Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne { "msg": "Success", "status": 200 } $ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/ValidatePartnerAPIKey Authorization:InvalidAPIKey00011122233 Partner:InvalidPartner { "msg": "Invalid Credentials", "status": 406 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/ValidatePartnerAPIKey -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne {"msg": "Success", "status": 200} $ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/ValidatePartnerAPIKey -H Authorization:InvalidAPIKey00011122233 -H Partner:InvalidPartner {"msg": "Invalid Credentials", "status": 406}
Output JSON
Name | Value | Description |
---|---|---|
status | 200 | Response Status |
msg | Success | Text message |
Get All Packages
Get All Packages is used to get the all the available packages of that particular partner.
URL : /GetAllPackages
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/GetAllPackages Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne { "packages": [ { "Backup_Sync": { "base_price": "0.003 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Asia_Backup": { "base_price": "0.03 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Application_Security": { "base_price": "1000.0 USD", "ennumerable_pricing": false, "one_quantity": true } }, { "Simple_CDN": { "base_price": "0.005 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "Disaster_Recovery": { "base_price": "0.0333 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Support_Ticket": { "base_price": "1.0 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "Patch_Manager": { "base_price": "1.0 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "SiteShield": { "base_price": "0.0333 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Bounty_Security": { "base_price": "1.0 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "DDoS_Mitigation": { "base_price": "0.05 USD", "ennumerable_pricing": false, "one_quantity": false } } ], "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/GetAllPackages -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne {"status": 200, "packages": [{"Backup_Sync": {"one_quantity": false, "ennumerable_pricing": true, "base_price": "0.003 USD"}}, {"Asia_Backup": {"one_quantity": false, "ennumerable_pricing": true, "base_price": "0.03 USD"}}, {"Application_Security": {"one_quantity": true, "ennumerable_pricing": false, "base_price": "1000.0 USD"}}, {"Simple_CDN": {"one_quantity": false, "ennumerable_pricing": false, "base_price": "0.005 USD"}}, {"Disaster_Recovery": {"one_quantity": false, "ennumerable_pricing": true, "base_price": "0.0333 USD"}}, {"Support_Ticket": {"one_quantity": false, "ennumerable_pricing": false, "base_price": "1.0 USD"}}, {"Patch_Manager": {"one_quantity": false, "ennumerable_pricing": true, "base_price": "1.0 USD"}}, {"SiteShield": {"one_quantity": false, "ennumerable_pricing": true, "base_price": "0.0333 USD"}}, {"Bounty_Security": {"one_quantity": false, "ennumerable_pricing": false, "base_price": "1.0 USD"}}, {"DDoS_Mitigation": {"one_quantity": false, "ennumerable_pricing": false, "base_price": "0.05 USD"}}]}
Output JSON
Name | Value | Description |
---|---|---|
packages | list of json string | Package List |
status | 200 | Response status |
Add Site
Add Site is used to add the given sitename to that particular partner.
URL : /AddSite
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
[email protected] | Signedup user's email |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/AddSite Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com email=[email protected] { "msg": "dinsite008.com is successfully added", "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/AddSite -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' -d '[email protected]' {"msg": "dinsite009.com is successfully added", "status": 200}
Output JSON
Name | Value | Description |
---|---|---|
msg | string | Message based on the request |
status | 200 | Response status |
Get Bought Packages
Get Bought Packages is used to get the all the bought packages of the particular sitename.
URL : /GetBoughtPackages
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/GetAllPackages Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com { "packages": [ { "Backup_Sync": { "base_price": "0.003 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Asia_Backup": { "base_price": "0.03 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Application_Security": { "base_price": "1000.0 USD", "ennumerable_pricing": false, "one_quantity": true } }, { "Simple_CDN": { "base_price": "0.005 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "Disaster_Recovery": { "base_price": "0.0333 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Support_Ticket": { "base_price": "1.0 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "Patch_Manager": { "base_price": "1.0 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "SiteShield": { "base_price": "0.0333 USD", "ennumerable_pricing": true, "one_quantity": false } }, { "Bounty_Security": { "base_price": "1.0 USD", "ennumerable_pricing": false, "one_quantity": false } }, { "DDoS_Mitigation": { "base_price": "0.05 USD", "ennumerable_pricing": false, "one_quantity": false } } ], "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/GetBoughtPackages -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' {"status": 200, "packages": [{"Backup_Sync": {"expiry_date": "2018-02-24 20:55:02", "current_state": "active", "start_date": "2018-01-25 20:55:02", "quantity": null}}, {"Asia_Backup": {"expiry_date": "2019-04-19 18:58:09", "current_state": "active", "start_date": "2018-04-24 18:58:09", "quantity": 1}}, {"Simple_CDN": {"expiry_date": "2018-03-11 13:05:00", "current_state": "", "start_date": "2018-03-01 13:05:00", "quantity": "1"}}, {"Support_Ticket": {"expiry_date": "", "current_state": "active", "start_date": "2018-02-28 13:40:33", "quantity": 20}}, {"Patch_Manager": {"expiry_date": "", "current_state": "active", "start_date": "2018-03-06 12:23:36", "quantity": 10}}, {"SiteShield": {"expiry_date": "2018-03-25 14:59:17", "current_state": "active", "start_date": "2018-02-23 14:59:17", "quantity": 1}}, {"Bounty_Security": {"expiry_date": "", "current_state": "active", "start_date": "2018-07-16 14:08:29", "quantity": 1}}, {"DDoS_Mitigation": {"expiry_date": "", "current_state": "active", "start_date": "2018-03-05 17:10:42", "quantity": 2799}}]}
Output JSON
Name | Value | Description |
---|---|---|
packages | list of json string | Package List |
status | 200 | Response status |
Buy Package
Buy Package is used to buy a package for the given sitename.
URL : /BuyPackage
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
package_name | string | pick the package name from the GetAllPackages API |
tenure | number | number denoting the number of days |
quantity | number | number denoting the package quantity to buy |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/BuyPackage Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com package_name=Bounty_Security tenure=30 quantity=1 { "msg": "Bounty_Security is bought successfully", "order_id": 485752986, "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/BuyPackage -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' -d 'package_name=Bounty_Security' -d 'tenure=30' -d 'quantity=1' {"msg": "Bounty_Security is bought successfully", "order_id": 485752986, "status": 200}
Output JSON
Name | Value | Description |
---|---|---|
msg | string | Message based on the request |
order_id | 234567897 | Order ID for the billing and invoice refernce |
status | 200 | Response status |
Upgrade Package
Upgrade Package is used to upgrade a bought package for the given sitename.
URL : /UpgradePackage
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
package_name | string | pick the package name from the GetAllPackages API |
tenure | number | number denoting the number of days |
quantity | number | number denoting the package quantity to buy |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/UpgradePackage Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com package_name=Bounty_Security tenure=30 quantity=1 { "msg": "Bounty_Security is upgraded successfully", "order_id": 485752986, "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/UpgradePackage -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' -d 'package_name=Bounty_Security' -d 'tenure=30' -d 'quantity=1' {"msg": "Bounty_Security is upgraded successfully", "order_id": 485752986, "status": 200}
Output JSON
Name | Value | Description |
---|---|---|
msg | string | Message based on the request |
order_id | 234567897 | Order ID for the billing and invoice refernce |
status | 200 | Response status |
Terminate Package
Terminate Package is used to suspend a bought package for the given sitename.
URL : /TerminatePackage
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
package_name | string | pick the package name from the GetAllPackages API |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/TerminatePackage Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com package_name=Bounty_Security { "msg": "Bounty_Security has been terminated", "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/TerminatePackage -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' -d 'package_name=Bounty_Security' {"msg": "Bounty_Security has been terminated", "status": 200}
Output JSON
Name | Value | Description |
---|---|---|
msg | string | Message based on the request |
status | 200 | Response status |
Unsuspend Package
Unsuspend Package is used to unsuspend a bought package for the given sitename.
URL : /UnSupendPackage
Mandatory params:-
Name | Value | Description |
---|---|---|
sitename | example.com | Sitename should not contain https:// or http:// or www |
package_name | string | pick the package name from the GetAllPackages API |
$ http --print b https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/UnSuspendPackage Authorization:HDaskdjfLKJEDSAKLEDS1232 Partner:WlpartnerOne sitename=dinsite008.com package_name=Bounty_Security { "msg": "Bounty_Security has been unsuspended", "status": 200 }
$ curl -o - https://partnerbrand.bountysite.com/BSAPIv1/ProvisioningAPI/UnSuspendPackage -H Authorization:HDaskdjfLKJEDSAKLEDS1232 -H Partner:WlpartnerOne -d 'sitename=dinsite008.com' -d 'package_name=Bounty_Security' {"msg": "Bounty_Security has been unsuspended", "status": 200}
Output JSON
Name | Value | Description |
---|---|---|
msg | string | Message based on the request |
status | 200 | Response status |