Get a List of all downstream Resellers Subscriptions
The Get a List of the Child Reseller's Subscriptions method returns the list of Subscriptions of all downstream Resellers of the current Reseller or any of its downstream Resellers.
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
GET {base_url}/api/v3/resellers/{reseller_id}/child_reseller_subscriptions
Arguments
Name | Parameter Type | Data type | Required/ Optional | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) |
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) |
Accept | header | string | Required | Information about data types that the client (browser) supports |
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) |
page[size] | query | integer | Optional | Page navigation: number of elements per page. The default value is 50 |
page[number] | query | integer | Optional | Page navigation: page number |
meta | query | bool | Optional | Request of the additional attributes of the Subscription. Applies to Subscriptions based on the Vendor Service and Office 365 plugins |
Response model
Name | Data type | Description | |||
---|---|---|---|---|---|
data | array | Response data | |||
id | integer | ID of the Subscription | |||
type | string | Data type | |||
attributes | object | Information about the Subscription | |||
created_at | date | Date and time of the Subscription creation | |||
updated_at | date | Date and time when the Subscription was updated | |||
plan_id | integer | Plan ID of the Subscription (see Managing plans in the ActivePlatform. Operator Control Panel) | |||
account_id | integer | Account ID to which the Subscription is related | |||
name | string | Subscription name | |||
trial | bool | Subscription type:
| |||
status | string | Subscription status (see Viewing the list of Subscriptions) | |||
start_date | date | Activation date of the Subscription | |||
expiration_date | date | Expiration date of the Subscription | |||
plan_period_id | integer | ID of the Plan Period | |||
promo_code | string | Promo code which was used to get the discount | |||
payment_model | string | Subscription payment model:
| |||
payment_model_parameters | object | Payment model parameters | |||
credit_limit | float | The value of the Subscription debt, above which the postpaid Subscription will be stopped. For postpaid Subscription only (payment_model = postpay) | |||
current_debt | float | The Subscription debt that is calculated as the total amount of all blocked Charges for the Subscription for the current Billing period. For postpaid Subscription only (payment_model = postpay) | |||
meta | object | Additional attributes of the Subscription | |||
applications | array | List of the additional attributes of the Subscription. The content depends on the Subscription | |||
'attribute.name' | string | Value of the Attribute | |||
links | object | Page navigation links that use the defined page navigation parameters | |||
self | string | Current page link | |||
first | string | First page link | |||
prev | string | Previous page link | |||
next | string | Next page link | |||
last | string | Last page link |
Request example
GET /api/v3/resellers/1/child_reseller_subscriptions?meta=true&page[number]=2&page[size]=2
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "850",
"type": "subscriptions",
"attributes": {
"created_at": "2017-01-30T14:33:06.685+03:00",
"updated_at": "2018-02-07T01:05:21.928+03:00",
"plan_id": 75,
"account_id": 77,
"name": "Office 365 Enterprise E1",
"trial": false,
"status": "waiting_for_manual_approve",
"start_date": "2017-01-30",
"expiration_date": "2018-01-30",
"plan_period_id": 407,
"promo_code": null,
"payment_model": "postpay",
"payment_model_parameters": {
"credit_limit": 1000.0,
"current_debt": 24.0
}
},
"meta": {
"applications": [
{
"plugin_name": "Office365 Plugin",
"tenant_id": "5a13b59e-test-test-test-05364ae96da9",
"tenant_name": "example.onmicrosoft.com",
"order_id": "b73bf9b8-test-test-test-0ae7e73a4d6b",
"external_id": "82628CF7-test-test-test-A573E2378267"
}
]
}
},
{
"id": "851",
"type": "subscriptions",
"attributes": {
"created_at": "2017-01-30T14:33:10.089+03:00",
"updated_at": "2017-01-31T01:02:02.975+03:00",
"plan_id": 75,
"account_id": 77,
"name": "Auto provisioning with resources",
"trial": false,
"status": "deleted",
"start_date": null,
"expiration_date": null,
"plan_period_id": 407,
"promo_code": null,
"payment_model": "prepay",
"payment_model_parameters": {}
},
"meta": {
"applications": []
}
}
],
"links": {
"self": "https://test.activeplatform.com/api/v3/resellers/1/subscriptions?meta=true&page%5Bnumber%5D=2&page%5Bsize%5D=2",
"first": "https://test.activeplatform.com/api/v3/resellers/1/subscriptions?meta=true&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"prev": "https://test.activeplatform.com/api/v3/resellers/1/subscriptions?meta=true&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"next": "https://test.activeplatform.com/api/v3/resellers/1/subscriptions?meta=true&page%5Bnumber%5D=3&page%5Bsize%5D=2",
"last": "https://test.activeplatform.com/api/v3/resellers/1/subscriptions?meta=true&page%5Bnumber%5D=1801&page%5Bsize%5D=2"
}
}