Phone Numbers - Purchase Phone Numbers
Purchases phone numbers.
POST {endpoint}/availablePhoneNumbers/:purchase?api-version=2021-03-07
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
The communication resource, for example https://resourcename.communication.azure.com. |
api-version
|
query | True |
string |
Version of API to invoke. |
Request Body
Name | Type | Description |
---|---|---|
searchId |
string |
The search id. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' and 'Location' headers. Client side should further query the operation status using the URL specified in 'Operation-Location' header. When operation completes successfully query final result using URL specified in 'Location' header. Headers
|
|
Other Status Codes |
Failure |
Examples
Purchase phone numbers
Sample request
POST https://resourcename.communication.azure.com//availablePhoneNumbers/:purchase?api-version=2021-03-07
{
"searchId": "378ddf60-81be-452a-ba4f-613198ea6c28"
}
Sample response
Operation-Location: /phoneNumbers/operations/purchase_378ddf60-81be-452a-ba4f-613198ea6c28
operation-id: purchase_378ddf60-81be-452a-ba4f-613198ea6c28
purchase-id: 378ddf60-81be-452a-ba4f-613198ea6c28
Definitions
Name | Description |
---|---|
Communication |
The Communication Services error. |
Communication |
The Communication Services error. |
Phone |
The phone number search purchase request. |
CommunicationError
The Communication Services error.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
Further details about specific errors that led to this error. |
|
innererror |
The inner error if any. |
|
message |
string |
The error message. |
target |
string |
The error target. |
CommunicationErrorResponse
The Communication Services error.
Name | Type | Description |
---|---|---|
error |
The Communication Services error. |
PhoneNumberPurchaseRequest
The phone number search purchase request.
Name | Type | Description |
---|---|---|
searchId |
string |
The search id. |