Check whether a phone number can be ordered at a given address (pbx)
/numbers/orders/check
Pre-flight check that validates an address with the upstream registry and
returns (a) the dial prefix for the resolved location, (b) the geocoder's
resolvedAddress, and (c) the kycRequirements that must accompany the
future order. Call this before POST /numbers/orders.
Comparing the address
The address is geocoded, so resolvedAddress may differ from what you sent
(address echoes your input). Compare the two and, if they differ, confirm
the corrected values with the end user before placing the order - the order
endpoint persists the geocoder-resolved values. Structured fields in
resolvedAddress are nullable (the geocoder may fail to pin a component such
as the street number); formattedAddress is always present.
Working with kycRequirements
kycRequirements lists the KYC documents that must be supplied on
POST /numbers/orders. Each top-level entry is either:
- an object - that exact document is required, or
- an array of objects - you must provide any one of the documents listed inside (an "OR group").
So the example below requires two documents in total:
- either a
business_registration_certificateor autility_bill(the OR group), and - an
id_document(the standalone entry).
Each documentType is the code you reference when uploading on
POST /numbers/orders (or later on POST /numbers/orders/{id}/documents): send file documents as a file part
kyc[<documentType>] (e.g. kyc[utility_bill] carrying bill.pdf;
accepted MIME types application/pdf, image/jpeg, image/png), and
identifier-only documents as a form field
kyc[<documentType>]=<value> (e.g. kyc[business_registration_number]=BE-12345).
kyc_required_at_order
kyc_required_at_order tells you when the documents are due. When true, send
them with POST /numbers/orders. When false, your account's contract lets the
documents follow the order: place the order without them, then send them with
POST /numbers/orders/{id}/documents (the order's kyc.missing lists what is
still owed). kycRequirements is the same list in both cases.
The optional notes field carries country-specific context (the local name
of the document, or a freshness constraint such as "dated within 3 months")
and can be surfaced verbatim to the end user.
API key created on the Cockpit Integrations page (an "API key" integration).
It is a bearer token owned by the customer's PBX and limited to the scopes
selected when the key was created (e.g. phone-numbers, push-configuration).
Send it in the Authorization header:
Authorization: Bearer <api_key>
Manage keys (create / reveal / revoke) from Integrations → New integration → API key.
- HTTP Authorization Scheme
bearer
Request body · required · application/json
Adenauerallee153113BonnDEResponses
addressobject
Adenauerallee153113BonnDEresolvedAddressobject
Adenauerallee153113BonnDEAdenauerallee 1, 53113 Bonn, Germany+49228kycRequirementsarray<object>
Authorization Token is missingerrors*object
https://cockpit.voxbi.com/api/v1/numbers/orders/check
curl -X POST 'https://cockpit.voxbi.com/api/v1/numbers/orders/check' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/numbers/orders/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/numbers/orders/check',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/numbers/orders/check', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"address": { … },
"resolvedAddress": { … },
"kycRequirements": [ … ],
[ … ],
{ … },
{ … }
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057