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-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser)
AcceptheaderstringRequiredInformation about data types that the client (browser) supports
reseller_idpathintegerRequiredID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information)
page[size]queryintegerOptionalPage navigation: number of elements per page. The default value is 50
page[number]queryintegerOptionalPage navigation: page number
metaqueryboolOptionalRequest 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

dataarrayResponse data


id

integerID of the Subscription

typestringData type

attributesobjectInformation about the Subscription


created_at

dateDate and time of the Subscription creation


updated_at

dateDate and time when the Subscription was updated


plan_idintegerPlan ID of the Subscription (see Managing plans in the ActivePlatform. Operator Control Panel)


account_idintegerAccount ID to which the Subscription is related


namestringSubscription name


trialbool

Subscription type:

  • true – trial Subscription
  • false – commercial Subscription


statusstring

Subscription status (see Viewing the list of Subscriptions)



start_datedateActivation date of the Subscription


expiration_datedateExpiration date of the Subscription


plan_period_idintegerID of the Plan Period


promo_codestringPromo code which was used to get the discount


payment_modelstring

Subscription payment model:

  • prepay
  • postpay


payment_model_parametersobjectPayment model parameters



credit_limitfloatThe value of the Subscription debt, above which the postpaid Subscription will be stopped. For postpaid Subscription only (payment_model = postpay)



current_debtfloatThe 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)

metaobjectAdditional attributes of the Subscription


applicationsarrayList of the additional attributes of the Subscription. The content depends on the Subscription



'attribute.name'stringValue of the Attribute
linksobjectPage navigation links that use the defined page navigation parameters

selfstringCurrent page link

firststringFirst page link

prevstringPrevious page link

nextstringNext page link

laststringLast 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"
    }
}