Articles in this section

API Documentation for Partners to automate billing workflows with Comms Channel

Published:

Overview

The CommsCDR API lets partners programmatically access their call detail records (CDRs) and billing information for mobile and internet services provisioned through Comms Channel — so you can automate billing workflows, reconciliation, auditing, and usage reporting without logging into the portal. This guide covers the three available APIs.

APIEndpointDescription
AuthenticationPOST /Auth/GetAccessTokenObtain a Bearer token to authenticate all API requests
Usage RecordsGET /Cdr/GetUsageRecordsRetrieve filtered call detail records (CDRs) for mobile services
Billing RecordsGET /Cdr/GetBillingRecordsRetrieve all active internet and voice services being billed

Base URL

https://commsportal.com.au/api

Note: All API endpoints require authentication. Call the Authentication API first to obtain an access token, then include it as a Bearer token in the Authorization header of every subsequent request.


1. Authentication API

The Authentication API issues a time-limited JSON Web Token (JWT) that must be included in all subsequent API calls. Tokens expire after 1 hour; use the refresh token to obtain a new access token without re-entering credentials.

Endpoint

POST  https://commsportal.com.au/api/Auth/GetAccessToken

Request Headers

HeaderValueDescription
Content-Typeapplication/jsonRequest body must be JSON

Request Body

FieldRequiredTypeDescription
emailRequiredstringYour CommsPortal account email address
passwordRequiredstringYour CommsPortal account password

Sample Request

curl --location 'https://commsportal.com.au/api/Auth/GetAccessToken' \
--header 'Content-Type: application/json' \
--data '{
  "email": "your@email.com",
  "password": "yourpassword"
}'

Response Fields

FieldTypeDescription
tokenTypestringAlways "Bearer". Prefix this value to the access token when setting the Authorization header.
accessTokenstringThe JWT access token. Include this in the Authorization header of all API requests as: Bearer <accessToken>
refreshTokenstringA long-lived token used to obtain a new access token once the current one expires, without requiring re-authentication.
expiresInnumberTime in seconds until the access token expires. The standard value is 3600 (1 hour).

Sample Response

{
  "tokenType": "Bearer",
  "accessToken": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9...",
  "expiresIn": 3600.0
}

Using the Token

Include the access token in the Authorization header of every subsequent API request:

Authorization: Bearer <accessToken>

Important: Access tokens expire after 1 hour (3600 seconds). Store the refreshToken securely and use it to request a new access token when needed. Do not hard-code tokens in your application.


2. Usage Records API (CDRs)

The Usage Records API returns individual call detail records (CDRs) for mobile services. Records can be filtered by date range, phone number, and customer name, and are returned in paginated form.

Endpoint

GET  https://commsportal.com.au/api/Cdr/GetUsageRecords

Request Headers

HeaderValueDescription
AuthorizationBearer <accessToken>JWT access token obtained from the Authentication API
accept*/*Standard accept header

Query Parameters

Append these parameters to the URL as a query string (e.g. ?fromDate=...&toDate=...).

ParameterRequiredTypeDescription
fromDateRequiredstringStart of the date range (inclusive). Format: D Month, YYYY — e.g. 1 January, 2026. Records with a call start time on or after this date will be returned.
toDateRequiredstringEnd of the date range (inclusive). Format: D Month, YYYY — e.g. 15 April, 2026. Records with a call start time on or before this date will be returned.
pageOptionalintegerPage number for paginated results. Starts at 1. Defaults to 1 if omitted.
pageSizeOptionalintegerNumber of records to return per page. Defaults to 20 if omitted. Recommended maximum is 100 per page to ensure fast response times.
originOptionalstringFilter by the originating phone number (the number that placed the call). Use the full number including country or area code, e.g. 0491643501.
destinationOptionalstringFilter by the destination number dialled. Can be a full number or a partial prefix.
customerNameOptionalstringFilter records by customer or end-client name. Partial matches may be supported.

Note: The fromDate and toDate parameters are required. All other parameters are optional filters. Combine multiple optional filters to narrow results — for example, specifying both origin and customerName returns only records matching both criteria.

Date Format

Dates must be provided in the following human-readable format:

D Month, YYYY

Examples:
  1 January, 2026
  15 April, 2026
  3 December, 2025

Important: When including dates in a URL, spaces and commas must be percent-encoded. A space becomes %20 and a comma becomes %2C. Most HTTP client libraries handle this automatically. Example: 1%20January%2C%202026

Sample Request

curl --location 'https://commsportal.com.au/api/Cdr/GetUsageRecords
  ?fromDate=1%20January%2C%202026
  &toDate=15%20April%2C%202026
  &page=1
  &pageSize=5
  &origin=0491643501
  &destination=0101
  &customerName=Company1' \
--header 'accept: */*' \
--header 'Authorization: Bearer <accessToken>'

Response Fields

FieldTypeDescription
totalRecordsintegerTotal number of CDR records matching the query filters across all pages.
cdrsarrayArray of individual CDR records matching the filters. See CDR Record Fields below.

CDR Record Fields

FieldTypeDescription
recordTypestringRecord type identifier. "A" indicates a standard call record.
custnointegerInternal customer account number associated with the service.
lineseqnointegerLine sequence number identifying the specific service line within the account.
phoneNumberstringThe mobile number associated with the service that generated this record.
batchnointegerBatch number grouping CDRs processed together in the billing cycle.
callnointegerUnique identifier for this individual call record.
chargeTypestringType of charge for this record. Common values: CALL (voice call), SMS (text message), DATA (data usage).
dateStartstring (ISO 8601)Date and time when the call or event started, in ISO 8601 format. Example: 2026-02-05T15:01:23.
durationintegerDuration of the call in seconds. For SMS or data records this may be 0.
originstringThe phone number that originated the call or event.
destinationstringThe phone number or code that was dialled.
serviceidstringCarrier service identifier code (e.g. WM for Wholesale Mobile).
priceComp1numberComponent 1 of the charge amount (in AUD). May be 0.00 for included calls.
priceChargenumberTotal charge applied to this record (in AUD). 0.00 indicates the call was included in the plan.
tariffCodestringInternal tariff code used to rate this record. Example: PM:MVD.
extraInfostringAdditional reference information such as a diversion target number or internal reference.
extraInfo2stringSecondary supplementary information. Example: "Diverted Call" indicates the call was forwarded.

Sample Response

{
  "totalRecords": 2,
  "cdrs": [
    {
      "recordType": "A",
      "custno": 1234567,
      "lineseqno": 10,
      "phoneNumber": "04XXXXXXXX",
      "batchno": 3346352,
      "callno": 456715424,
      "chargeType": "CALL",
      "dateStart": "2026-02-05T15:01:23",
      "duration": 20,
      "origin": "04XXXXXXXX",
      "destination": "04XXXXXXXX",
      "serviceid": "WM",
      "priceComp1": 0.0,
      "priceCharge": 0.0,
      "tariffCode": "PM:MVD",
      "extraInfo": "42510496",
      "extraInfo2": "Diverted Call"
    }
  ]
}

Pagination

Results are paginated. Use the page and pageSize parameters to navigate large result sets. The totalRecords field tells you the total number of matching records, which you can use to calculate how many pages exist.

Total pages = ceil(totalRecords / pageSize)

Example: totalRecords=250, pageSize=50  =>  5 pages
  Page 1: records 1-50
  Page 2: records 51-100
  ...

3. Billing Records API

The Billing Records API returns all internet and voice services currently provisioned and billed for your account. This is a snapshot of your active service portfolio — useful for reconciliation, auditing, and displaying service summaries to your end clients.

Note: This endpoint returns all billable services for the authenticated account. No filters are supported — the full service list is always returned.

Endpoint

GET  https://commsportal.com.au/api/Cdr/GetBillingRecords

Request Headers

HeaderValueDescription
AuthorizationBearer <accessToken>JWT access token obtained from the Authentication API
accept*/*Standard accept header

Sample Request

curl --location 'https://commsportal.com.au/api/Cdr/GetBillingRecords' \
--header 'accept: */*' \
--header 'Authorization: Bearer <accessToken>'

Response Structure

The response is a JSON object with two top-level arrays:

FieldTypeDescription
InternetServicesarrayList of all internet service records currently active, hidden, or disabled for the account.
VoiceServicesarrayList of all voice and mobile service records for the account.

Internet Service Fields

FieldTypeDescription
idintegerUnique internal identifier for this service record.
typestringAlways "internet" for records in the InternetServices array.
descriptionstringHuman-readable service description including plan name, speed, and contract term. Example: "500 Mbps BusinessFibre - 36 Month - Unlimited Internet".
statusstringCurrent service status. Values: active (live and billing), disabled (cancelled/ended), hidden (exists but not shown on the customer portal).
unit_pricestringMonthly unit price in AUD, formatted to 4 decimal places. Example: "560.0000" = $560.00/month.
quantityintegerNumber of units of this service. Typically 1 for internet services.
start_datestringDate the service commenced, in YYYY-MM-DD format.
end_datestringDate the service ended, in YYYY-MM-DD format. "0000-00-00" means the service has no end date (ongoing).
discountstringDiscount flag. "0" means no discount is applied.
discount_valuestringThe discount amount or percentage applied to this service.
discount_typestringHow the discount is applied. Values: percent or fixed.
customer_idintegerInternal identifier for the account/customer this service belongs to.
tariff_idintegerInternal identifier for the rate plan/tariff applied to this service.
loginstringInternal login reference associated with this service.
additional_attributes.end_client_namestringThe name of the end client or business at the service address.
additional_attributes.carrier_service_idstringThe carrier's own reference number for this service (e.g. Telstra or AAPT service ID).
additional_attributes.ip_addressstringIP address information assigned to the service, if applicable.
additional_attributes.avc_numberstringAccess Virtual Circuit number for NBN-based services, if applicable.
additional_attributes.po_numberstringPurchase order number provided by the client for this service.
geo.addressstringPhysical installation address of the service.
geo.markerstringLatitude and longitude coordinates of the service address, formatted as "lat,lng".

Voice Service Fields

FieldTypeDescription
idintegerUnique internal identifier for this voice service record.
typestringAlways "voice" for records in the VoiceServices array.
descriptionstringHuman-readable service description. Example: "CommsMobile 2.0 - P-5G-XL".
statusstringCurrent service status. Values: active, disabled, or hidden (same definitions as internet services).
phonestringThe mobile number(s) associated with this service. Multiple numbers are comma-separated.
phonesArrayarrayThe same phone number(s) as an array of strings, for easier programmatic access.
unit_pricestringMonthly unit price per unit in AUD, formatted to 4 decimal places.
quantityintegerNumber of units (e.g. number of SIM cards or extensions on this service line).
start_datestringDate the service commenced, in YYYY-MM-DD format.
end_datestringDate the service ended. "0000-00-00" means the service is ongoing.
directionstringCall direction capability. "outgoing" indicates outbound calling is enabled.
customer_idintegerInternal identifier for the account this service belongs to.
tariff_idintegerInternal identifier for the rate plan applied to this service.
additional_attributes.end_client_namestringName of the end client or business associated with this service.
additional_attributes.nicknamestringA friendly label assigned to this service or device. Example: "Samsung A17 Goran".
additional_attributes.sip_credentialsstringSIP credentials for VoIP-based services, if applicable.
additional_attributes.po_numberstringPurchase order number for this service.

Sample Response

{
  "InternetServices": [
    {
      "type": "internet",
      "id": 1,
      "description": "Business Fibre - Fibre 1000 - Unlimited - 48 Months",
      "status": "active",
      "unit_price": "650.0000",
      "start_date": "2026-2-11",
      "end_date": "0000-00-00",
      "additional_attributes": {
        "end_client_name": "Company1",
        "carrier_service_id": "12234",
        "ip_address": "",
        "po_number": ""
      },
      "geo": {
        "address": "15 Street 1",
        "marker": "-20.20,120.120"
      }
    }
  ],
  "VoiceServices": [
    {
      "type": "voice",
      "id": 9988,
      "description": "CommsMobile 2.0 - P-4G-S",
      "status": "active",
      "phone": "04XXXXXXXX",
      "phonesArray": ["04XXXXXXXX"],
      "unit_price": "26.0000",
      "start_date": "2026-03-17",
      "end_date": "0000-00-00",
      "additional_attributes": {
        "end_client_name": "Company1",
        "nickname": "User1 iPhone 17"
      }
    }
  ]
}

Error Handling

The API uses standard HTTP status codes. Below are the most common codes you may encounter:

Status CodeMeaningCommon Cause
200 OKSuccessThe request completed successfully and the response body contains the requested data.
400 Bad RequestInvalid requestA required parameter is missing or malformed. Check that fromDate and toDate are present and correctly formatted for the Usage Records API.
401 UnauthorizedAuthentication failedThe access token is missing, invalid, or has expired. Re-authenticate using the Authentication API to obtain a fresh token.
403 ForbiddenAccess deniedThe authenticated account does not have permission to access the requested resource.
404 Not FoundResource not foundThe endpoint URL is incorrect. Verify the request URL against this documentation.
500 Internal Server ErrorServer errorAn unexpected error occurred on the server. Retry after a short delay. If the issue persists, contact Comms Channel support.

Support

If you encounter any issues or have questions about the API, contact your Comms Channel account manager or reach out via the CommsPortal support portal at commsportal.com.au.

Important: Always store your API credentials and access tokens securely. Do not share tokens or embed them in client-side code. Refresh tokens programmatically before they expire to ensure uninterrupted access.

Access denied
Access denied