ВОЙТИ

Child Accounts

Methods

AddChildAccountSubscription

Adds a new subscription for the specified child account.

Parameters

  • Follow link for authentication parameter names and details.

  • child_account_id:

    number

    The child account ID.

  • subscription_template_id:

    number

    The subscription template ID.

  • subscription_name:

    string
    OPTIONAL

    The subscription name.

Returns

Примеры

запрос:

Create a subscription for the child account with ID = 10 using the subscription template with ID = 184.

https://api.voximplant.com/platform_api/AddChildAccountSubscription/?account_id=5&api_key=18cb2d29-6091-4009-a5a2-730d573211f5&child_account_id=10&subscription_template_id=184&subscription_name=Meaningful%20subscription%20name

ответ:

Create a subscription for the child account with ID = 10 using the subscription template with ID = 184.

{
    "result": 1,
    "subscriptions": [
        {
            "subscription_id": 34,
            "subscription_name": "Meaningful subscription name",
            "subscription_template_id": 184
        }
    ]
}

DeactivateChildAccountSubscription

Deactivates the specified subscription(s).

Parameters

  • Follow link for authentication parameter names and details.

  • subscription_id:

    number

    The subscription ID to be deactivated.

  • child_account_id:

    number

    The child account ID.

  • subscription_finish_date:

    timestamp
    OPTIONAL

    The deactivation UTC date in 24-h format: YYYY-MM-DD HH:mm:ss. If empty, then the current date + 1 day is used as a cancellation date.

Returns

  • result:

    number

    1

Примеры

запрос:

Deactivates the subscription with ID = 20 and subscription_finish_date = September 29th 2019.

https://api.voximplant.com/platform_api/DeactivateChildAccountSubscription/?account_id=5&api_key=18cb2d29-6091-4009-a5a2-730d573211f5&subscription_id=20&child_account_id=10&subscription_finish_date=2019-09-29 00:00:00

ответ:

Deactivates the subscription with ID = 20 and subscription_finish_date = September 29th 2019.

{
    "result": 1
}

GetChildAccountSubscriptionTemplates

Gets all the eligible subscription templates. A template is considered to be eligible if it is of a type that supports child accounts management.

Parameters

Returns

Примеры

запрос:

Get the eligible subscription templates.

https://api.voximplant.com/platform_api/GetAvailableSubscriptionTemplates/?account_id=5&api_key=18cb2d29-6091-4009-a5a2-730d573211f5

ответ:

Get the eligible subscription templates.

{
    "result": [
        {
            "periodic_price": 301.2473,
            "installation_price": 0,
            "subscription_template_id": 184,
            "subscription_template_name": "Agent Management Sub"
        }
    ]
}

GetChildAccountSubscriptions

Gets the active subscription(s) for the specified child account.

Parameters

  • Follow link for authentication parameter names and details.

  • child_account_id:

    number

    The child account ID.

  • subscription_id:

    number
    OPTIONAL

    The subscription ID. If empty, then all the non-deactivated subscriptions for the current child account will be retrieved.

Returns

Примеры

запрос:

Get the subscription with ID = 20.

https://api.voximplant.com/platform_api/GetChildAccountSubscriptions/?account_id=5&api_key=18cb2d29-6091-4009-a5a2-730d573211f5&child_account_id=10&subscription_id=20

ответ:

Get the subscription with ID = 20.

{
    "result": [
        {
            "active": true,
            "auto_charge": true,
            "next_renewal": "2019-10-20",
            "periodic_price": 433.7962,
            "subscription_id": 20,
            "subscription_name": "Meaningful subscription name",
            "subscription_template_id": 184
        }
    ]
}