Get a List of Plans
The method returns a List of Plans.
The List of Plans can be shown page by page. To split by page, the following Arguments should be passed:
- the page number (page);
- the amount of items per page (per_page).
The List of Plans can be sorted by any field. To sort the List of Plans, the following Arguments should be passed:
- the field name that is used for sorting (sorting[field]);
- the sort direction (sorting[reversed]):
- true - the list will be sorted in descending direction;
- false - the list will be sorted in ascending direction (by default).
The List of Plans can be filtered by:
- creation date (filters[created_at]);
- update date (filters[updated_at]);
- status (filters[status]);
public flag (filters[public]).
GET /api/vendor/v1/plans.json?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/ | Description |
---|---|---|---|---|
api_token | query | string | Required | API token of the manager who perform the operation (see API Token Authentication). |
page | query | integer | Optional | Returning a list of payment by current page number. |
per_page | query | integer | Optional | Setting a number of items in the page. |
sorting[field] | query | string | Optional | Sorting the list by a specified field. |
sorting[reversed] | query | string | Optional | Setting the sorting mode:
|
filters[created_at] | query | date | Optional | Filtering the list by a creation date. |
filters[updated_at] | query | date | Optional | Filtering the list by an update date. |
filters[status] | query | string | Optional | Filtering the list by a status. |
filters[public] | query | string | Optional | Filtering the list by the "public" flag. |
Response model
Name | Data type | Description |
---|---|---|
id | integer | A plan ID. |
status | string | One of the following plan statuses:
|
name | string | A plan name. |
description | string | Additional information about the plan. This information displays to customers in the online store and the Customer Control Panel. |
created_at | data | A date and time of the plan's creation. |
updated_at | data | A date and time of the last plan update. |
public | bool | Plan availability for ordering:
|
plan_class_id | integer | A plan class ID (see Managing service terms in the ActivePlatform. Operator Control Panel). |
plan_class | string | A plan class name. |
plan_resources | array | The following information about plan resources:
|
Request example
GET http://billing.activeplatform.com:80/api/vendor/v1/plans.json?api_token=654321
Response example
[
{
"id": 2000027,
"status": "inactive",
"name": "iMind",
"description": "",
"created_at": "2014-12-01T17:26:30.056+03:00",
"updated_at": "2016-07-13T14:31:15.265+03:00",
"public": false,
"plan_class_id": 1,
"plan_class": "Default",
"plan_resources": [
{
"id": 2000595,
"name": "1",
"application_template_name": "Dummy",
"measurable": false,
"unit_of_measure": "unit",
"included": 1,
"minimum": 1,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "deleted",
"resource_id": 2002229,
"created_at": "2014-12-03T12:21:37.713+03:00",
"updated_at": "2016-06-16T18:20:19.448+03:00"
},
{
"id": 2000583,
"name": "Customers",
"application_template_name": "iMind",
"measurable": false,
"unit_of_measure": "unit",
"included": 1,
"minimum": 1,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 2002213,
"created_at": "2014-12-01T17:26:46.005+03:00",
"updated_at": "2016-06-16T18:20:19.406+03:00"
},
{
"id": 2000581,
"name": "Maximum users online",
"application_template_name": "iMind",
"measurable": false,
"unit_of_measure": "unit",
"included": 1,
"minimum": 1,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 2002210,
"created_at": "2014-12-01T17:26:45.921+03:00",
"updated_at": "2016-06-16T18:20:19.402+03:00"
},
{
"id": 2000582,
"name": "Users",
"application_template_name": "iMind",
"measurable": false,
"unit_of_measure": "unit",
"included": 1,
"minimum": 1,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 2002211,
"created_at": "2014-12-01T17:26:46.002+03:00",
"updated_at": "2016-06-16T18:20:19.404+03:00"
}
],
"plan_periods": [
{
"id": 2000067,
"duration_value": 1,
"duration_type": "month",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": null,
"created_at": "2014-12-01T17:27:36.588+03:00",
"updated_at": "2014-12-01T17:27:36.588+03:00"
},
{
"id": 2000068,
"duration_value": 3,
"duration_type": "month",
"setup_fee": "0.1",
"recurring_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": null,
"created_at": "2014-12-01T17:27:36.591+03:00",
"updated_at": "2015-02-24T14:24:04.330+03:00"
},
{
"id": 2000066,
"duration_value": 3,
"duration_type": "day",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"renewal_fee": "0.0",
"trial": true,
"public": true,
"status": "active",
"description": null,
"created_at": "2014-12-01T17:27:36.557+03:00",
"updated_at": "2016-10-04T06:31:45.211+03:00"
}
]
}
]