Get customer's PBX subscriptions

Fetch active PBX subscription and their Cloud PBX data, filtrated by given parameters. Returns data with pagination. Each Cloud PBX also contains data about its billing.

GET
/api/v1/pbx/subscriptions

Query Parameters

billing_periods?array<>

Accepts a list of frequency values to filter by. Will return subscriptions that have any of the frequencies provided. If the list is empty – this filter is ignored.

one_time_amount_from?number

Optional field. Allows to filter by activation price of the subscription. Will return subscription with activation price greater than and equal to the provided value.

Range0 <= value
one_time_amount_to?number

Optional field. Allows to filter by activation price of the subscription. Will return subscription with activation price less than and equal to the provided value.

Range0 <= value
page?integer

Pagination parameters. Accepts page number. Pagination starts on page=1. If parameter is not provided, the default value of 1 will be set.

page_size?integer

Pagination parameter. Accepts the size of page for pagination. Minimal page size is 1. If parameter is not provided, the default value of 10 will be set.

pbx_ids?array<integer>

Accepts a list of subscriptions' unique ids to filter by. If the list is empty – this filter is ignored.

period_end?string

Time period filter, determines the end of the period. Accepts string with time either as UNIX timestamp, or in format 2006-01-02T15:04:05Z07:00.

period_start?string

Time period filter, determines the start of the period. Accepts string with time either as UNIX timestamp, or in format 2006-01-02T15:04:05Z07:00.

plan_ids?array<integer>

Accepts a list of PBX plans unique ids to filter by. Only subscription with these plans will be returned. If the list is empty, this filter will be ignored. Plan IDs can be obtained from GET /api/v1/pbx/plans.

q?string

Optional parameter that allows to search Cloud PBXs by name, subscription plan's title and/or description values. The search operation is partial.

sort_by?string

Ordering parameter. Defines by which field the data will be sorted. If parameter is not provided, will be used entity's default ordering. To use entity's default sorting, pass _default as value.

Value in"_default" | "id" | "name" | "title" | "description" | "activation" | "monthly" | "amount_one_time" | "subscription_amount" | "created_at" | "activated_at"
sort_order?string

Ordering parameter. Defines the order of sorting (asc or desc). If parameter is not provided, will be used entity's default ordering.

Value in"asc" | "desc"
subscription_amount_from?number

Optional field. Allows to filter by monthly price of the subscription. Will return subscription with monthly price greater than and equal to the provided value.

Range0 <= value
subscription_amount_to?number

Optional field. Allows to filter by monthly price of the subscription. Will return subscription with monthly price less than and equal to the provided value.

Range0 <= value

Header Parameters

Authorization*string

Your API token

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://dev-refactor-api-e.voipenv.uk/api/v1/pbx/subscriptions" \  -H "Authorization: string"
{
  "data": [
    {
      "activated_at": "string",
      "activation": 0,
      "comment": "string",
      "frequency": "monthly",
      "id": 0,
      "monthly": 0,
      "name": "string",
      "next_payment_at": "string",
      "plan": {
        "activation": 0,
        "concurrent_call_capacity": 0,
        "description": "string",
        "extension_capacity": 0,
        "frequency": "monthly",
        "id": 0,
        "monthly": 0,
        "recording_capacity": 0,
        "sub_plans": [
          {
            "activation": 0,
            "concurrent_call_capacity": 0,
            "description": "string",
            "extension_capacity": 0,
            "frequency": "monthly",
            "id": 0,
            "monthly": 0,
            "recording_capacity": 0,
            "sub_plans": [],
            "title": "string"
          }
        ],
        "title": "string"
      },
      "subscription_status": "disabled",
      "url": "string"
    }
  ],
  "page": 0,
  "page_size": 0,
  "total": 0,
  "total_pages": 0
}
{
  "code": 0,
  "error_details": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "message": "string",
  "request_id": "string",
  "status": "error"
}
{
  "code": 0,
  "error_details": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "message": "string",
  "request_id": "string",
  "status": "error"
}
{
  "code": 0,
  "error_details": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "message": "string",
  "request_id": "string",
  "status": "error"
}
Form Call To Action

Contact us

You can always send us a message or email. Weʼd be happy to help you out.