Retrieve Posted Usage Events

With API 2.0, you can view existing usage events you previously posted. You can retrieve desired usage events by ID or by using available query parameters.

Use the following endpoint to retrieve a posted usage event by ID:

GET https://example-gotransverse.com/billing/2/usage-events/{id}

A usage event ID displays in the response body when you post a usage event.

You can also retrieve a usage event using available query parameters. The endpoint above does not support an empty parameter set; you must use the following required parameters or a combination of them:

  • service_period_id — the ID of the associated service period.

  • reference_id — the associated reference ID entered when posting a usage event.

  • request_id — the unique identifier generated by Gotransverse that displays in the response body when you post a usage event.

  • account_num — the associated account number to which the usage was posted.

  • billing_account_id — the ID of the associated billing account to which the usage was posted.

  • closed — indicates whether the associated service period is billed. Possible values are true or false.

The following parameters can be combined — account_num and closed, or billing_account_id and closed.

The following endpoints are examples of how to retrieve a usage event using available query parameters:

GET https://example-gotransverse.com/billing/2/usage-events?account_num=8883&closed=false

GET https://example-gotransverse.com/billing/2/usage-events?service_period_id=1113

Additional Query Parameters

  • id — the ID of the usage event. It displays in the response body when you post a usage event.

  • service_resource_identifier — the service resource identifier that you associated with a service.

  • start_time — the date and time when the usage event started.

  • end_time — the date and time when the usage event ended.

  • sequence_id — a unique value that is used to ensure that duplicated usage events are not posted. It can be set from an external system or entered when you post a usage event.

Request

Copy
{
  "id": "1019890000",
  "description": "string",
  "total_charge": 150,
  "start_time": "2019-09-01T00:00:00-05:00",
  "end_time": "2019-09-01T00:00:00-05:00",
  "service_resource_identifier": "sample#1",
  "usage_uom": "HOUR",
  "usage_amount": 2,
  "reference_id": "void-usage1",
  "sequence_id": "8",
  "request_id": "fbac6f46-f1af-4fc7-9a43-018215a7e8f8",
  "text01": "text",
  "text02": "text",
  "text03": "text",
  "text04": "text",
  "text05": "text",
  "number01": 22,
  "number02": 22,
  "number03": 22,
  "number04": 22,
  "number05": 22,
  "boolean01": true,
  "boolean02": true,
  "boolean03": true,
  "boolean04": true,
  "boolean05": true,
  "date01": "2020-06-16T03:54:29-05:00",
  "date02": "2020-06-16T03:54:29-05:00",
  "date03": "2020-06-16T03:54:29-05:00",
  "date04": "2020-06-16T03:54:29-05:00",
  "date05": "2020-06-16T03:54:29-05:00",
  "service_period": {
    "id": "658554946"
  },
  "overwrite_counter": 0,
  "event_charges": [
    {
      "id": "1019940000",
      "charge": 150,
      "usage_rule": {
        "id": "160696860"
      },
      "charge_category": {
        "charge_category_type": "usage-charge",
        "id": "3182",
        "name": "def charge cat"
      },
      "usage_uom": "HOUR",
      "usage_amount": 2,
      "consume_prepaid_balance": false
    }
  ]
}