Get an available phone number
/v1/numbers/available/{number}// A number a carrier supplies is only on sale while the carrier still has it,
// so a 404 here means someone else took it.
const candidate = await bird.numbers.available.get("+447700900201");
console.log(candidate.country_code, candidate.capabilities);# A number a carrier supplies is only on sale while the carrier still has
# it, so a 404 here means someone else took it.
candidate = client.numbers.available.get("+447700900201")
print(candidate.country_code, candidate.capabilities)candidate, err := client.Numbers.Available.Get(context.Background(), "+447700900201")
if err != nil {
log.Fatal(err)
}
fmt.Println(candidate.CountryCode)// A number a carrier supplies is only on sale while the carrier still has it,
// so a 404 here means someone else took it.
$candidate = $bird->numbers->available->get('+447700900201');
echo $candidate->getCountryCode(), "\n";bird numbers available get <number>curl -X GET "https://us1.platform.bird.com/v1/numbers/available/{number}" \
-H "Authorization: Bearer $TOKEN"{
"country_code": "US",
"number_type": "mobile",
"capabilities": [
"sms"
],
"ownership_address_scope": "anywhere",
"pricing": {
"setup_price": {
"amount": "0.00995",
"currency_code": "USD"
},
"recurring_price": {
"amount": "0.00995",
"currency_code": "USD"
},
"recurring_period": {
"unit": "month",
"count": 1
},
"intervals_per_charge": 12
}
}
Returns a single phone number available for purchase, whether it is already in inventory or can be acquired for you. Numbers supplied through a carrier remain available only while the carrier has them, so a number listed a moment ago may already be gone. A 404 means the number is currently unavailable for sale.
Parameter
numberstringPhone number in E.164 format. The leading + is optional.
Payload Respons
numberPhone number in E.164 format.
country_codeISO 3166-1 alpha-2 country code.
number_typePhysical type of this phone number.
Possible values (may grow over time): mobile, local, national, short_code, short_code_fteu, toll_free
capabilitiesCapabilities supported by this number.
ownership_registration_requiredWhether ownership paperwork must be approved before outbound SMS and voice use. Customer availability accounts for organization exemptions; admin supplier searches report the general country and number-type requirement. You can acquire the number, including Bird stock, and submit paperwork afterward. Any pricing.setup_price is charged during purchase, plus any tax. The recurring charge, net of tax pricing.recurring_price multiplied by pricing.intervals_per_charge, is taken with any tax at assignment and at each renewal, even while approval is pending; assignment may follow completion of a pending supplier order.
ownership_address_scopeWhere the carrier requires the business address on this number's ownership registration to be. Present only when the carrier itself registers the number before it carries traffic and states a rule; omitted otherwise. An address that does not meet the rule is refused after purchase, and only an address that meets it can fix the registration.
anywhere: any business address.country: a business address in the number's country.number_area: a business address inside the number's own area code, for example in Amsterdam for an Amsterdam (020) number.
Possible values (may grow over time): anywhere, country, number_area
pricingWhat your organization pays for this number. Omitted on admin supplier searches, which have no organization to price for.
Tampilkan atribut turunan
pricing.setup_priceOne-off setup fee for your organization, net of tax, in your billing currency. Its amount is "0" when the published fee is zero. null when no setup fee applies to this country and number type, and whenever recurring_price is null.
Tampilkan atribut turunan
pricing.setup_price.amountDecimal amount as a string, in major currency units.
pricing.setup_price.currency_codeISO 4217 currency code.
pricing.recurring_priceWhat your organization is charged for this number per recurring_period, net of tax, in your billing currency, after your agreed prices are applied. null when the number cannot be priced for your organization, because its recurring price or a required setup fee has no price; it cannot be ordered then.
pricing.recurring_periodThe period recurring_price covers. null when recurring_price is null.
pricing.intervals_per_chargeHow many recurring_periods one charge bills at once. Your organization is charged recurring_price multiplied by this at purchase and at each renewal. null when recurring_price is null.
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini.