Balance & Usage

Endpoints for retrieving balance information and usage analytics

Retrieve the balance information for a partner

get

The "Get Partner Balance" endpoint is a part of our API that enables partner users to retrieve the partner balance. This endpoint is particularly useful for partners who have prepaid accounts with us and are responsible for making payments based on their usage of our services.

There can be multiple balance records for a partner, if partner's balance is topped-up in different currencies.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The partner_id path parameter

Responses
chevron-right
200

Successful response

application/json
totalnumberOptional

The total balance amount

Example: 100.45
currencystringOptional

The balance currency

Example: eur
get
/api/v2/partners/{partner_id}/balance

Retrieve the balance information for a specific client

get

This endpoint allows partners to retrieve the balance information for a particular client within the partner API. By providing the necessary authentication data, partner ID, and client ID, along with optional filters for the starting year, month, and application ID(s), you can obtain the corresponding balance data. The response will include details such as the client's balance and any associated financial information. Rate limits: This endpoint is subject to rate limits. A maximum of 5 requests in 30 seconds per client is allowed. Requests exceeding these limits will receive a 429 Too Many Requests response.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
client_idstringRequired

The ID of the client.

Example: exampleCL
partner_idstringRequired

The ID of the partner.

Example: examplePA
Query parameters
start_datenumber · floatOptional

The start date in UNIX Timestamp. Returned data will be equal to or newer than the specified date.

Default: 0
end_datenumber · floatOptional

The end date in UNIX Timestamp. Returned data will be equal to or older than the specified date.

Default: 4102358400
granularitystring · enumOptional

The granularity by which you would like to retrieve the analytics. Supported options: ['day', 'month]

Default: monthPossible values:
app_idsstring · nullableOptional

The ID(s) of the application(s). The returned data will be filtered by the specified application ID(s). Multiple IDs can be provided, separated by commas.

Default: nullExample: 214,231,241
Responses
chevron-right
200

Successful response

application/json
get
/api/v2/partners/{partner_id}/clients/{client_id}/info/balance

Retrieve pricing and call analytics usage for a specific channel. Check Meta documentation for more details.

get

This endpoint allows partners to retrieve detailed usage analytics and cost information for a specific channel within the partner API. By providing valid authentication, partner ID, client ID, and channel ID, along with optional filters such as date range, country codes, pricing types, and dimensions, partners can access a breakdown of usage data.

The response includes metrics such as message volume and cost across various pricing categories and types, organized by specified dimensions (e.g., country, pricing type). Rate limits: This endpoint is subject to rate limits. A maximum of 10 requests per hour per channel and 200 requests per hour per WABA is allowed. Requests exceeding these limits will receive a 429 Too Many Requests response.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
client_idstringRequired

The ID of the client.

Example: exampleCL
partner_idstringRequired

The ID of the partner.

Example: examplePA
channel_idstringRequired

The ID of the channel.

Example: exampleCH
Query parameters
start_dateinteger · timestampRequired

The start date in UNIX Timestamp. Returned data will be equal to or newer than the specified date.

Example: 1672531200
end_dateinteger · timestampRequired

The end date in UNIX Timestamp. Returned data will be equal to or older than the specified date.

Example: 1672531200
granularitystring · enumRequired

The granularity by which you would like to retrieve the analytics.

Possible values:
countriesstring[]Optional

The countries for which you would like to retrieve analytics. Provide a 2 letter country codes for the countries you would like to include. If not provided, usage data will be returned for all countries you have communicated with.

Example: ["us","gb","de"]
Responses
chevron-right
200

Successful response

application/json
get
/api/v2/partners/{partner_id}/clients/{client_id}/channels/{channel_id}/info/usage

Retrieve the balance information for a specific channel

get

This endpoint allows partners to retrieve the balance information for a particular channel within the partner API. By providing the necessary authentication data, partner ID, client ID, and channel ID, along with optional filters for the starting year, month, and application ID(s), you can obtain the corresponding balance data. The response will include details such as the channel's balance and any associated financial information.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
client_idstringRequired

The ID of the client.

Example: exampleCL
partner_idstringRequired

The ID of the partner.

Example: examplePA
channel_idstringRequired

The ID of the channel.

Example: exampleCH
Query parameters
start_datenumber · floatOptional

The start date in UNIX Timestamp. Returned data will be equal to or newer than the specified date.

Default: 0
end_datenumber · floatOptional

The end date in UNIX Timestamp. Returned data will be equal to or older than the specified date.

Default: 4102358400
granularitystring · enumOptional

The granularity by which you would like to retrieve the analytics. Supported options: ['day', 'month]

Default: monthPossible values:
Responses
chevron-right
200

Successful response

application/json
balancenumberOptional

The balance amount

Example: 100.45
currencystringOptional

The balance currency

Example: eur
estimated_template_costnumberOptionalDeprecated

[Deprecated]

ui_price_for_currency_and_client_countrynumberOptionalDeprecated

[Deprecated]

Example: 45.88
bi_price_for_currency_and_client_countrynumberOptionalDeprecated

[Deprecated]

Example: 65.88
granularitystringOptional

The time-based aggregation level - month or day

Example: month
get
/api/v2/partners/{partner_id}/clients/{client_id}/channels/{channel_id}/info/balance

Last updated

Was this helpful?