Skip to main content

List a business's phone numbers with their billable calls

GET 

/v1/businesses/{businessId}/billable-calls/phone-numbers

Lists billable call counts for every phone number of a business, identified by the business's Hiya businessId, that had at least one billable call in the given date range, bucketed by granularity. Supports sorting and paging. Numbers without billable calls in the range are not listed.

A page past the end returns 200 with an empty list and unchanged paging totals.

Path Parameters​


    businessId string<uuid>required

    The ID of the business, assigned by Hiya.

    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

Query Parameters​


    startDate string<date>required

    Start of the date range (inclusive), as YYYY-MM-DD. Must be on or before endDate. endDate may be at most startDate plus 15 months, with the day clamped to the end of the month (2026-01-31 → 2027-04-30).

    Example: 2026-05-01

    endDate string<date>required

    End of the date range (inclusive), as YYYY-MM-DD. Must be on or after startDate. endDate may be at most startDate plus 15 months, with the day clamped to the end of the month (2026-01-31 → 2027-04-30).

    Example: 2026-05-31

    granularity string

    How to bucket the returned series. Defaults to total (no series, just the total for the range).

    Possible values: [total, day, week, month]

    Default value: total

    sortBy string

    Field to sort the phone-number list by. phoneNumber sorts by the number as a string, total by the billable calls for the range. Ties are broken by phone number, ascending regardless of sortDirection.

    Possible values: [phoneNumber, total]

    Default value: phoneNumber

    sortDirection string

    Sort direction. asc or desc (case-insensitive).

    Possible values: Value must match regular expression ^[Aa][Ss][Cc]$|^[Dd][Ee][Ss][Cc]$

    Default value: asc

    page integer

    Page number, starting at 0.

    Possible values: >= 0

    Default value: 0

    size integer

    Number of items per page.

    Possible values: >= 1 and <= 200

    Default value: 50

Responses​

A page of per-phone-number billable call counts.

Response Body

application/json

    phoneNumbersobject[]required
  • Array [


  • phoneNumberstringrequired

    A phone number in E.164 format, with the leading +.

    Format: billing_E164PhoneNumber (string)

    Possible values: Value must match regular expression ^\+[1-9]\d{1,14}$

    Example: +12065550123

    businessIdstringrequired

    The ID of the business the number is or was registered to.

    Format: string<uuid>
    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

    externalIdstring | nullrequired

    Your own reference for the business; null if none was set.

    Possible values: Value must match regular expression ^[A-Za-z0-9._-]+$

    Example: partner-customer-7421

    startDatestringrequired

    Start of the date range (inclusive).

    Format: string<date>
    Example: 2026-05-01

    endDatestringrequired

    End of the date range (inclusive).

    Format: string<date>
    Example: 2026-05-31

    granularitystringrequired

    How a billable-calls series is bucketed within the date range.

    | Value | Meaning | |-------|---------| | total | No series — just the total for the whole range. points is empty. | | day | One point per day. | | week | One point per calendar week (Monday to Sunday). | | month | One point per calendar month. |

    Buckets are aligned to the calendar, not to startDate: the first point's date can be earlier than startDate (the Monday of that week, or the first of that month). Every point counts only calls within startDate..endDate. Buckets with no billable calls are omitted from points — treat a missing bucket as 0.

    Format: billing_BillingGranularity (string)

    Possible values: [total, day, week, month]

    Example: day

    totalintegerrequired

    Total billable calls from this number across the whole date range; equal to the sum of points when a series is returned.

    Format: integer<int64>
    Example: 1234

    pointsobject[]required

    The bucketed series, sorted by date ascending. Empty when granularity is total.

  • Array [


  • datestringrequired

    Start date of this bucket (inclusive). For week and month it can be earlier than startDate, because buckets are aligned to the calendar.

    Format: string<date>
    Example: 2026-05-01

    valueintegerrequired

    Billable calls in this bucket, always greater than 0.

    Format: integer<int64>
    Example: 42
  • ]

  • ]


  • pagingobjectrequired

    Details about the current page of results.


    currentPageintegerrequired

    This page's number, starting at 0.

    Example: 0

    totalElementsintegerrequired

    Total items matching the filter, across all pages.

    Example: 137

    totalPagesintegerrequired

    Total number of pages available.

    Example: 3

    pageSizeintegerrequired

    Items per page.

    Example: 50

Example from Schema​

{
"phoneNumbers": [
{
"phoneNumber": "+12065550123",
"businessId": "9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f",
"externalId": "partner-customer-7421",
"startDate": "2026-05-01",
"endDate": "2026-05-31",
"granularity": "day",
"total": 1234,
"points": [
{
"date": "2026-05-01",
"value": 42
}
]
}
],
"paging": {
"currentPage": 0,
"totalElements": 137,
"totalPages": 3,
"pageSize": 50
}
}

weekly

​

Two weeks, granularity=week, sorted by total

{
"phoneNumbers": [
{
"phoneNumber": "+34600040083",
"businessId": "9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f",
"externalId": "partner-customer-7421",
"startDate": "2026-09-01",
"endDate": "2026-09-13",
"granularity": "week",
"total": 120,
"points": [
{
"date": "2026-08-31",
"value": 45
},
{
"date": "2026-09-07",
"value": 75
}
]
},
{
"phoneNumber": "+34600040084",
"businessId": "9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f",
"externalId": "partner-customer-7421",
"startDate": "2026-09-01",
"endDate": "2026-09-13",
"granularity": "week",
"total": 8,
"points": [
{
"date": "2026-09-07",
"value": 8
}
]
}
],
"paging": {
"currentPage": 0,
"totalElements": 2,
"totalPages": 1,
"pageSize": 50
}
}