List outbound call rates
/v1/billing/rates/voice-outboundfor await (const rate of bird.billingRates.voiceOutbound({ country_code: "US" })) {
console.log(rate);
}for rate in client.billing_rates.voice_outbound(country_code="US"):
print(rate)for rate, err := range client.BillingRates.VoiceOutbound(context.Background(), bird.BillingRatesVoiceOutboundParams{CountryCode: "US"}) {
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", *rate)
}foreach ($bird->billingRates->voiceOutbound(['country_code' => 'US']) as $rate) {
print_r($rate);
}bird billing rates voice-outboundcurl -X GET "https://us1.platform.bird.com/v1/billing/rates/voice-outbound" \
-H "Authorization: Bearer $TOKEN" \
--url-query "sort=country_code" \
--url-query "order=asc" \
--url-query "limit=25"{
"data": [
{
"country_code": "NL",
"breakout_code": "NL-MOB",
"line_type": "mobile",
"call_zone": "domestic",
"unit": "minute",
"increment": "60/6",
"rate": {
"amount": "0.012",
"currency_code": "USD"
},
"breakout_codes_version": 42
}
],
"next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
"prev_cursor": null,
"refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}
Returns what your organization pays per minute for a call to a destination, per destination country, breakout code and call zone. A breakout code names a set of destination numbers that share a rate, such as the mobile numbers of one network; the prefixes download says which dialled numbers each code covers. The call zone says where the call comes from relative to the destination. Rates are net of tax, in your organization's billing currency, with your agreed prices applied. A code and zone with no rate is not listed, and neither is a country Voice does not offer; whether a particular call is placed also depends on your workspace's settings. A code is listed under the country the breakout codes label it with; a call is rated under the country of the dialled number, which can differ for a code that spans countries, such as one under +1. Rows of one read carry one breakout_codes_version; when it changes between pages, or a later page comes back empty, start the read again. This is the rate for the call itself: the call handling fee on the voice features card is charged on top of it, as is any other feature the call uses. Returns 412 when your organization has no billing currency yet, a retryable 503 when the rates cannot be read, and a 500 with RatesNotRepresentable when a price cannot be shown on this card, which retrying does not fix; a page is never returned with rates missing. Requires the rates permission in the workspace, or the organization's org:billing permission, with which the workspace can be left out. Without a credential the response is Bird's default rates, in currency; a credential that does not authenticate returns 401, never default rates. The prefixes download requires a credential.
Query Parameters
sortstringField to sort by. Rates are ordered by destination country, then line type, breakout code and call zone.
Possible values: country_code
orderstringSort direction. Defaults to asc, which sorts alphabetically or from oldest to newest, depending on the selected sort field.
Possible values: asc, desc
limitintegerMaximum number of items to return per page.
starting_afterstringCursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_beforestringCursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
country_codestringReturn only rates whose country_code is this country. It is the country the breakout code is labelled with, the one on the prefix row a dialled number matches, which for a code that spans countries is not always the country of the number.
line_typestringReturn only rates for codes of this kind of line. Codes with a null line type are left out, so read without this filter to see them.
Possible values: mobile, fixed, toll_free
call_zonestringReturn only rates for calls from this zone. A destination outside the European calling zone has no eea rate, so it has no rows under that filter.
Possible values: domestic, eea, international
currencystringThe currency of the rates when the request carries no credential, USD when left out. With a credential the rates are in the organization's billing currency, and a different currency returns 422.
Response Payload
dataShow child attributes
data.country_codeThe country the breakout code is labelled with. It is the country of the numbers the code covers, except for a code that spans countries, where a number can belong to another one.
data.breakout_codeThe set of destination numbers this rate applies to. Codes can be renamed, split or merged when the breakout codes are revised, which changes breakout_codes_version.
data.line_typeThe kind of line the code's numbers are. null when the code covers more than one kind of line, or lines Bird cannot classify; its rate still applies to every number its prefixes cover.
Possible values: mobile, fixed, toll_free
data.call_zoneWhere a call comes from relative to its destination, decided from the country of the caller ID the call presents:
domestic: The caller is in the destination country.eea: The caller and the destination are in different countries of the European calling zone, which is the European Economic Area and the United Kingdom.international: Any other call, and any call whose caller ID is absent, is not verified or has no known country.
Possible values: domestic, eea, international
data.unitThe time a rate is quoted for:
minute: The rate is the price of one minute.
Possible values: minute
data.incrementHow the call's duration is rounded before it is priced, as {first}/{subsequent} whole seconds. For example, 1/1 charges by the second and 60/60 charges whole minutes. To price a call, round its duration up by the increment, multiply the seconds by rate and divide by 60. null when the price carries no increment, and on a free rate, which is charged without one.
data.rateThe price of one unit, net of tax, in your organization's billing currency, after your agreed prices are applied.
data.breakout_codes_versionThe version of the breakout codes this row's code belongs to. The prefixes download carries the same number; when your copy has another, download it again.
next_cursorCursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.
prev_cursorCursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.
refresh_cursorRefresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.
Related resources
Continue with the documentation, guides and examples for this topic.