Retrieving Billing Groups

Retrieving All Billing Groups

Using the GET method, you can retrieve your Billing Groups.

The following sample request can be used to retrieve all Billing Groups. Note that the results of this request use pagination as defined in the Paging Results section of this documentation

curl -H "x-organization-token: {authorization_token}" \
     -X GET \
     "https://api.telmetrics.com/v3/api/billinggroups"

If the request is handled successfully, the following response will be returned:

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 1,
    "total": 1
  },
  "results": [
    {
      "billing_group_id": 9231,
      "billing_group_name": "Sales",
      "status": "active",
      "children": [
        {
          "billing_group_id": 9235,
          "billing_group_name": "Sales Billing Group Child",
          "status": "active",
          "parent_id": 9231
        }
      ]
    }
  ]
}

Retrieving a Billing Group

Using the GET method, you can retrieve an individual Billing Group.

The following sample request can be used to retrieve a single Billing Group:

curl -H "x-organization-token: {authorization_token}" \
     -X GET \
     "https://api.telmetrics.com/v3/api/billinggroup/12423258"

If the request is handled successfully, the following response will be returned:

{
  "billing_group_id": 12423258,
    "billing_group_name": "Sales",
      "status": "active",
        "children": [
          {
            "billing_group_id": 12424827,
            "billing_group_name": "Sales Billing Group Child",
            "status": "active",
            "parent_id": 9231
          }
        ]
}