List phone number lookup rates
/v1/billing/rates/lookup-phone-numberfor await (const rate of bird.billingRates.lookupPhoneNumber()) {
console.log(rate);
}for rate in client.billing_rates.lookup_phone_number():
print(rate)for rate, err := range client.BillingRates.LookupPhoneNumber(context.Background(), bird.BillingRatesLookupPhoneNumberParams{}) {
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", *rate)
}foreach ($bird->billingRates->lookupPhoneNumber() as $rate) {
print_r($rate);
}bird billing rates lookup-phone-numbercurl -X GET "https://us1.platform.bird.com/v1/billing/rates/lookup-phone-number" \
-H "Authorization: Bearer $TOKEN" \
--url-query "sort=country_code" \
--url-query "order=asc" \
--url-query "limit=25"{
"data": [
{
"country_code": null,
"mcc_mnc": null,
"item": "lookup",
"unit": "lookup",
"rate": {
"amount": "0.004",
"currency_code": "USD"
}
}
],
"next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
"prev_cursor": null,
"refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}
Returns what your organization pays for a phone number lookup: the lookup itself and each property a lookup can deliver. A lookup is charged the lookup rate once, plus the rate of each requested property that is delivered; a property that comes back inconclusive is not charged. Today the rates are the same for every country and network, so every row has a null country_code and mcc_mnc. A row with a country or a network is the rate for that country or network only; to find a rate, take the item's row for the number's country and network, then for its country, then the row where both are null. Rates are net of tax, in your organization's billing currency, with your agreed prices applied. An item with no price is not listed. 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 depends on the country or network, which this card cannot state and 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.
Queryparameters
sortstringField to sort by. Rates are ordered by country, then item and network. The rates that apply to every country sort before every country in ascending order.
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 the rates that apply to numbers of this country: the rates specific to it, and the rates with a null country, which apply wherever the country has no rate of its own.
itemstringReturn only the rates of this item.
Possible values: lookup, classification, porting, presence, roaming, sim_swap, score
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
dataOnderliggende attributen tonen
data.country_codeThe country of the looked-up number this rate is specific to. null on a rate that applies to every country without a row of its own.
data.mcc_mncThe mobile network of the looked-up number this rate is specific to, as its MCC and MNC digits. null on a rate that applies to every network without a row of its own.
data.itemWhat a phone number lookup rate is for:
lookup: The lookup itself, charged once per lookup.classification,porting,presence,roaming,sim_swap,score: One property, charged in addition to the lookup when you request it and it is delivered.
Possible values: lookup, classification, porting, presence, roaming, sim_swap, score
data.unitWhat one rate pays for.
Possible values: lookup, property
data.rateThe price of one unit, net of tax, in your organization's billing currency, after your agreed prices are applied.
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.
Gerelateerde bronnen
Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.