API functions
- request_token
- order_init
- order_set_products
- find_order
- order_set_customer
- order_set_reseller
- order_place
- order_find_details
- find_countries
- find_states
- find_products
- find_resellers
- order_create_special_price
- renewal_init
request_token
In order to call any PAN API function, a token is required as authentication method. This function returns a token to be used in subsequent calls until it expires. After expiration, a new token must be requested and used onwards.
(staging)http://pan-stage.bitdefender.com/api/webservice/request_token
(production)https://pan.bitdefender.com/api/webservice/request_token
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
uid | yes | Application id |
secret | yes | Application secret |
scope | no | Token scope. If none specified the token will have full access for all the scopes defined in the application. Multiple scopes are delimited with comma. |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/webservice/request_token.json (production)https://pan.bitdefender.com/api/webservice/request_token.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/webservice/request_token.xml (production)https://pan.bitdefender.com/api/webservice/request_token.xml |
Response
Name | Description |
---|---|
token | Access token |
expires | Expiry date of the token |
Errors
Name | Description |
---|---|
Please submit all required fields | uid or secret are not submited |
Authentication failed | The provided uid and secret are not associated with a valid application |
The requested scope is not valid | The requested scope is not defined in the application |
order_init
Initiates a blank order and returns a unique identifier that can be used in subsequent calls to add the proper information to the order. In this function call, the discount type of the order must be be specified if the order is not standard. The discount types can be "EDU" if the end user is an educational institution, "GOV" if the end user is a governmental institution or "CUPG" if the end user is migrating it's antivirus solution to Bitdefender from another antivirus vendor.
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_init
(production)https://pan.bitdefender.com/api/sales_events/order_init
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
type | yes | Can take one of the values:MSRP, EDU, GOV, CUPG. MSRP = Business Standard Offer, EDU = Education Offer, GOV = Government Offer, CUPG = Competitive Upgrade Offer |
additional_info | yes if type is EDU, GOV or CUPG; no if the type is MSRP | Additional Info |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_init.json (production)https://pan.bitdefender.com/api/sales_events/order_init.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_init.xml (production)https://pan.bitdefender.com/api/sales_events/order_init.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
order_set_products
This function call sets the products details for the order. For each product that will be part of the order you have to define the product_id, the number of devices, the validity period as number of months and the desired quantity of license keys
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_products
(production)https://pan.bitdefender.com/api/sales_events/order_set_products
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
products[] array encoded with json | yes | product_id, devices, months, quantity |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_init.json (production)https://pan.bitdefender.com/api/sales_events/order_init.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_init.xml (production)https://pan.bitdefender.com/api/sales_events/order_init.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
find_order
This function returns a list of orders belonging to the partner that issued the call, filtered by the input parameters, if provided
(staging)http://pan-stage.bitdefender.com/api/orders/find_order
(production)https://pan.bitdefender.com/api/orders/find_order
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | no | Order id. Accepts multiple ids separated with comma. |
status | no | Order status. Pending orders can be filtered using: placed, invoiced, sent to distributor. |
date_from | no | Filter orders by date from using the format: Y-m-d |
date_to | no | Filter orders by date to using the format: Y-m-d |
order | no | Sort the orders by date or value. Possible sorts: date asc, date desc, value asc, value desc. |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/orders/find_order.json (production)https://pan.bitdefender.com/api/orders/find_order.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/orders/find_order.xml (production)https://pan.bitdefender.com/api/orders/find_order.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
order_set_customer
This function call sets the end user information for the order
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_customer
(production)https://pan.bitdefender.com/api/sales_events/order_set_customer
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
name | yes | Custome name |
phone | yes | Phone number |
address | yes | Address |
contact_person | yes | Contact person |
city | yes | City |
zipcode | yes | Zip code |
country_id | yes | Use find_countries for the countries list |
yes | ||
purchase_order_number | no | Purchase order number |
state_id | yes if the Country is United States or Canada | Use find_states for the states list |
type | no | The customer type. Can take the values: Organization, Person |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_customer.json (production)https://pan.bitdefender.com/api/sales_events/order_set_customer.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_customer.xml (production)https://pan.bitdefender.com/api/sales_events/order_set_customer.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
order_set_reseller
This function call sets the indirect reseller for the order
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_reseller
(production)https://pan.bitdefender.com/api/sales_events/order_set_reseller
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
reseller_id | yes | Reseller id can be found using find_resellers |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_reseller.json (production)https://pan.bitdefender.com/api/sales_events/order_set_reseller.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_set_reseller.xml (production)https://pan.bitdefender.com/api/sales_events/order_set_reseller.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
order_place
This function call finalizes the order after the required information was set (products, customer, reseller).
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_place
(production)https://pan.bitdefender.com/api/sales_events/order_place
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_place.json (production)https://pan.bitdefender.com/api/sales_events/order_place.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_place.xml (production)https://pan.bitdefender.com/api/sales_events/order_place.xml |
Response
Name | Description |
---|---|
id | It returns an id for later use |
Errors
Name | Description |
---|
order_find_details
This function returns the details of an order, such as the license keys. Please not that the license keys are generated with a few minutes delay after placing the order, so in order to receive the keys, this function must be called after a few minutes since the order was placed.
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_find_details
(production)https://pan.bitdefender.com/api/sales_events/order_find_details
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_find_details.json (production)https://pan.bitdefender.com/api/sales_events/order_find_details.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/order_find_details.xml (production)https://pan.bitdefender.com/api/sales_events/order_find_details.xml |
Response
Name | Description |
---|---|
Order[] array | id, type |
Products[] array | The products |
Customer[] array | The customer |
reseller_id | The reseller id if specified |
keys | The keys associated to the order if the order is finalized |
Errors
Name | Description |
---|
find_countries
This function returns the countries codes and IDs. The country ID of the end user is needed for the set_customer function call
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_countries
(production)https://pan.bitdefender.com/api/sales_events/find_countries
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_countries.json (production)https://pan.bitdefender.com/api/sales_events/find_countries.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_countries.xml (production)https://pan.bitdefender.com/api/sales_events/find_countries.xml |
Response
Name | Description |
---|---|
Countries [] array | Countries |
Errors
Name | Description |
---|
find_states
This function returns the US states codes and IDs. The state ID of the end user is needed for the set_customer function call
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_states
(production)https://pan.bitdefender.com/api/sales_events/find_states
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_states.json (production)https://pan.bitdefender.com/api/sales_events/find_states.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/sales_events/find_states.xml (production)https://pan.bitdefender.com/api/sales_events/find_states.xml |
Response
Name | Description |
---|---|
States [] array | States |
Errors
Name | Description |
---|
find_products
Returns a list of products that are assigned in the authenticated partner's account
(staging)http://pan-stage.bitdefender.com/api/products/find_products
(production)https://pan.bitdefender.com/api/products/find_products
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/products/find_products.json (production)https://pan.bitdefender.com/api/products/find_products.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/products/find_products.xml (production)https://pan.bitdefender.com/api/products/find_products.xml |
Response
Name | Description |
---|---|
Products [] array | Products |
Errors
Name | Description |
---|
find_resellers
Returns a list of resellers that joined the PAN portal and are assigned to the authenticated partner's account
(staging)http://pan-stage.bitdefender.com/api/partners/find_resellers
(production)https://pan.bitdefender.com/api/partners/find_resellers
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/partners/find_resellers.json (production)https://pan.bitdefender.com/api/partners/find_resellers.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/partners/find_resellers.xml (production)https://pan.bitdefender.com/api/partners/find_resellers.xml |
Response
Name | Description |
---|---|
Resellers [] array | Resellers |
Errors
Name | Description |
---|
order_create_special_price
(staging)http://pan-stage.bitdefender.com/api/request_special_prices/order_create_special_price
(production)https://pan.bitdefender.com/api/request_special_prices/order_create_special_price
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
id | yes | The id returned from order_init |
type | yes | Can take one of the values: BSO = Business Standard Offer, EDU = Education Offer, GOV = Government Offer, CUPG = Competitive Upgrade Offer |
additional_info | yes if type is EDU, GOV or CUPG; no if the type is MSRP | Additional Info |
expecting_close_date | yes | Date format Y.m.d |
request_price | yes | Requested price |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/request_special_prices/order_create_special_price.json (production)https://pan.bitdefender.com/api/request_special_prices/order_create_special_price.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/request_special_prices/order_create_special_price.xml (production)https://pan.bitdefender.com/api/request_special_prices/order_create_special_price.xml |
Response
Name | Description |
---|---|
id | The id of the order |
Errors
Name | Description |
---|---|
There is a special price request | A special price was requested for the speicified id |
Invalid id | The id is invalid |
No type | No type specified |
Invalid type | Type is invalid |
Additional info required | Additional info required |
No requested price | No requested price |
No expecting close date | No expecting close date |
renewal_init
(staging)http://pan-stage.bitdefender.com/api/renewals/request
(production)https://pan.bitdefender.com/api/renewals/request
(method)POST
Parameters
Name | Mandatory | Description |
---|---|---|
app_uid | yes | Application id |
app_token | yes | A valid token |
key | yes | The product key string for the renewal. |
discount_type | yes | You should use "Standard Renewal" |
months | yes | The number of months for the renewal. |
endusername | yes | End customer name |
enduseremail | yes | End customer email |
enduserphone | yes | End customer phone |
endusercountry | yes | End customer country_id |
enduserstate | yes | End customer state_id. Yes if the Country is United States or Canada |
enduseraddress | yes | End customer address |
enduserponumber | yes | End customer po number |
enduserzipcode | yes | End customer zip code |
endusertype | no | End customer type. Can take the values: legal entity, individual |
reseller_id | no | Set the reseller if needed. |
Format
Name | Format |
---|---|
json |
(staging)http://pan-stage.bitdefender.com/api/renewals/request.json (production)https://pan.bitdefender.com/api/renewals/request.json |
xml |
(staging)http://pan-stage.bitdefender.com/api/renewals/request.xml (production)https://pan.bitdefender.com/api/renewals/request.xml |
Response
Name | Description |
---|---|
id | The id of the order |
Errors
Name | Description |
---|---|
There is a special price request | A special price was requested for the speicified id |
Invalid id | The id is invalid |
No type | No type specified |
Invalid type | Type is invalid |
Additional info required | Additional info required |
No requested price | No requested price |
No expecting close date | No expecting close date |