Subscription Create
The Subscription Create notification URL allows a service to receive a notification when a customer purchases a subscription through ActivePlatform.
The general flow for the Subscription Create event includes the following steps:
- A customer orders a vendor service via ActivePlatform.
- As a part of the provisioning process, ActivePlatform calls the configured notification URL, passing the JSON with the details about the customer and subscription.
- The vendor service validates the request, creates the subscription, returns the subscription details, or provides the details of the occurred error.
- ActivePlatform completes the subscription provisioning.
POST /subscription/create
Event body
Name | Data type | Description | ||
---|---|---|---|---|
reseller | object | Information about the reseller who sold the subscription to a service plan of a product via ActivePlatform (see Viewing and updating reseller general information in the Operator Comtrol Panel guide) | ||
id | integer | The reseller ID | ||
name | string | The reseller name | ||
company_name | string | The company name | ||
first_address | string | Address line 1 | ||
second_address | string | Address line 2 | ||
city | string | City | ||
region | string | Region | ||
zip | string | Zip code | ||
country | string | Country code | ||
company_phone | string | The company's phone number in the international format | ||
company_email | string | The company's email address | ||
currency | string | The reseller currency code | ||
attributes | object | The list of the product attributes (key-value pairs) applied to the reseller (see Extending the reseller object and Product attributes):
| ||
core_attributes | object | The list of public custom attributes (key-value pairs) applied to the reseller in ActivePlatform (see in the Viewing the list of attributes Operator Comtrol Panel guide):
| ||
distributor | object | Information about the distributor who sold the subscription. The distributor information is stored and managed in the ActivePlatform installation | ||
id | integer | The distributor ID | ||
name | string | The distributor name | ||
region | string | The distributor location: region | ||
currency | string | The distributor currency code | ||
attributes | object | The list of the product attributes applied to a distributor (see Extending the distributor object and Product attributes):
| ||
tenant | object | Information about the account of the customer who ordered the subscription. The account information is stored and managed in the ActivePlatform installation | ||
id | integer | The account ID | ||
company_name | string | The company name, if the customer is a legal entity | ||
type | string | The account type in the ActivePlatform installation | ||
contact | object | The contact information for the account | ||
first_name | string | The first name of the account contact person | ||
last_name | string | The last name of the account contact person | ||
zip | string | The account address: zip-code | ||
city | string | The account address: city | ||
state | string | The account address: state or region | ||
country | string | The account address: two-letter country code | ||
phone | string | The contact phone number of the account:
| ||
string | The contact email of the account | |||
fax | string | The fax number of the account:
| ||
address_line_1 | string | The account address (line 1) | ||
address_line_2 | string | The account address (line 2) | ||
owner | object | Information about the account Owner | ||
first_name | string | The first name of the account Owner | ||
last_name | string | The last name of the account Owner | ||
phone | string | The contact phone number of the account Owner:
| ||
domain | object | Information about the domain attached to the subscription | ||
name | string | The domain name | ||
plan | object | Information about the service plan ordered by the account. The service plan information is stored and managed in Vendor Portal | ||
name | string | The service plan name in Vendor Portal | ||
description | string | The service plan description in Vendor Portal | ||
resources | object | Information about the ordered resources of the service plan | ||
key | string | The resource key in Vendor Portal | ||
quantity | integer | The ordered number of the resource units | ||
period | object | Information about the ordered period of the service plan | ||
value | integer | The plan period duration | ||
type | string | The unit of measure of the period:
| ||
trial | bool | Indicates whether the ordered plan period is trial:
| ||
endless | bool | Indicates whether the ordered plan period is endless:
| ||
sku | string | The stock keeping unit of the service plan in Vendor Portal | ||
subscription | object | Information about the ordered subscription. The subscription information is stored and managed in the ActivePlatform installation | ||
id | string | The subscription ID | ||
attributes | object | The list of additional subscription attributes required for the subscription provisioning (see Extending the subscriptions object):
You can add the attributes in the Attributes section of Vendor Portal if you need to receive additional information during subscription provisioning | ||
attributes | object | The list of additional order attributes required for the subscription provisioning (see Order Attributes. Attributes Validation):
|
Response
If a subscription was successfully created, the vendor service returns:
- 201 HTTP code status
- JSON with the following information:
Name | Data type | Description |
---|---|---|
external_id | string | The subscription GUID generated in the vendor service |
attributes | object | The list of additional subscription attributes required for the subscription provisioning (see Extending the subscriptions object):
You can add the attributes in the Attributes section of Vendor Portal if you need to receive additional information during subscription provisioning |
If a subscription was not created, the vendor service returns:
- HTTP code status.
- JSON with the following information:
Name | Data type | Description | |
---|---|---|---|
task | object | ||
error_message | string | Text message of the occurred error |
Event example
POST http://example.com/subscription/create
{
"distributor": {
"id": 211,
"name": "Dev acc",
"region": "Region",
"currency": "USD",
"attributes": {
"reseller_public_id": "1234a4567"
}
},
"reseller": {
"id": 2,
"name": "Root",
"company_name": "Dev acc",
"first_address": "Street building",
"second_address": "",
"city": "City",
"region": "Region",
"zip": "220000",
"country": "US",
"company_phone": "+123555456",
"company_email": "email@example.com",
"currency": "USD",
"attributes": {
"certificate": "********",
"service_account_email": "********",
"reseller_admin_email": "********"
},
"core_attributes": {
"kaspersky_reseller_pin": "********"
}
},
"tenant": {
"id": 199,
"company_name": "John GS",
"type": "Business",
"contact": {
"first_name": "John",
"last_name": "GS",
"zip": "220000",
"city": "Quinsk",
"state": "Quinsk",
"country": "AQ",
"phone": "+123 55 1111111",
"email": "test_warp@example.com",
"fax": "+123 55 1111111",
"address_line_1": "Quinsk",
"address_line_2": ""
},
"owner": {
"first_name": "John",
"last_name": "GS",
"phone": "+123 55 1111111"
}
},
"domain": {
"name": "domain.com",
"alternate_email": "admin@example.com",
"admin_login": "admin"
},
"plan": {
"name": "Google Suite Basic",
"description": "",
"resources": [
{
"key": "users",
"quantity": 1
}
],
"period": {
"value": 30,
"type": "day",
"trial": true,
"endless": false
},
"attributes": {},
"sku": "For-Business,FLEXIBLE"
},
"subscription": {
"id": 3002619,
"attributes": {}
},
"attributes": {
"admin_login": "admin",
"domain_name": "goog-test.reseller.com",
"customer_alternate_email": "email@example.net",
"transfer_domain_name": "goog-test.reseller.com",
"transfer_token": "123ABCDEFO123456"
}
}
Response example
HTTP code: 201 created
{
"external_id": "02000000-10c8-9d6e-0ecc-39e13f7a4de1",
"attributes": {}
}