PhoneNumbers
Order the quoted phone number
Confirms a quote: the number is bought at the quoted price, billed
monthly to the workspace. phase tells what happens next:
fulfilling / fulfilled (the number appears in
GET …/numbers), or pending-payment with a paymentUrl where the
payment must be completed in a browser. One order runs per workspace
at a time (409 order_open, with its orderId). Follow an order
with GET …/number-orders/{orderId}.
Retries: safe with the same requestId (a UUID you generate per order): a repeat answers the same order and is never charged twice.
POST
/
v1
/
workspaces
/
{workspaceId}
/
number-orders
Order the quoted phone number
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders"
payload = {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"phase": "unavailable",
"orderId": "<string>",
"kind": "purchase",
"quoteId": "<string>",
"selection": {
"country": "<string>",
"term": "<string>",
"numberType": "<string>"
},
"quote": {
"lineItemLabel": "<string>",
"priceLabel": "<string>",
"dueTodayLabel": "<string>",
"renewalLabel": "<string>",
"expiresLabel": "<string>",
"expiresAt": "<string>"
},
"order": {
"id": "<string>",
"number": "<string>"
},
"message": "<string>",
"canResume": true,
"paymentUrl": "<string>"
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
ApiKeyBearerAuth
Body
application/json
Was this page helpful?
⌘I
Order the quoted phone number
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/number-orders"
payload = {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"phase": "unavailable",
"orderId": "<string>",
"kind": "purchase",
"quoteId": "<string>",
"selection": {
"country": "<string>",
"term": "<string>",
"numberType": "<string>"
},
"quote": {
"lineItemLabel": "<string>",
"priceLabel": "<string>",
"dueTodayLabel": "<string>",
"renewalLabel": "<string>",
"expiresLabel": "<string>",
"expiresAt": "<string>"
},
"order": {
"id": "<string>",
"number": "<string>"
},
"message": "<string>",
"canResume": true,
"paymentUrl": "<string>"
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
