共用方式為


Phone Numbers - Purchase Phone Numbers

購買電話號碼。

POST {endpoint}/availablePhoneNumbers/:purchase?api-version=2025-02-11

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string

url

通訊資源,例如 https://resourcename.communication.azure.com

api-version
query True

string

要叫用的 API 版本

要求本文

名稱 類型 Description
searchId

string

搜尋標識碼。

回應

名稱 類型 Description
202 Accepted

服務已接受要求,稍後將會開始處理。 它會立即傳回 『Accepted』,並包含 『Operation-Location』 標頭。 客戶端應該使用 『Operation-Location』 標頭中指定的 URL 進一步查詢作業狀態。

標題

  • Operation-Location: string
  • operation-id: string
  • purchase-id: string
Other Status Codes

CommunicationErrorResponse

失敗

範例

Purchase phone numbers

範例要求

POST https://resourcename.communication.azure.com//availablePhoneNumbers/:purchase?api-version=2025-02-11

{
  "searchId": "378ddf60-81be-452a-ba4f-613198ea6c28"
}

範例回覆

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

定義

名稱 Description
CommunicationError

通訊服務錯誤。

CommunicationErrorResponse

通訊服務錯誤。

PhoneNumberPurchaseRequest

電話號碼搜尋購買要求。

CommunicationError

通訊服務錯誤。

名稱 類型 Description
code

string

錯誤碼。

details

CommunicationError[]

導致此錯誤之特定錯誤的詳細數據。

innererror

CommunicationError

如果有,則為內部錯誤。

message

string

錯誤訊息。

target

string

錯誤目標。

CommunicationErrorResponse

通訊服務錯誤。

名稱 類型 Description
error

CommunicationError

通訊服務錯誤。

PhoneNumberPurchaseRequest

電話號碼搜尋購買要求。

名稱 類型 Description
searchId

string

搜尋標識碼。