swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Find and Purchase Available Phone Numbers API schemes: - https tags: - name: Find and Purchase Available Phone Numbers paths: /availablePhoneNumbers/countries/{countryCode}/:search: post: tags: - Find and Purchase Available Phone Numbers summary: Microsoft Azure Search For Available Phone Numbers To Purchase operationId: microsoftAzurePhonenumbersSearchavailablephonenumbers consumes: - application/json produces: - application/json parameters: - in: path name: countryCode description: The ISO 3166-2 country code, e.g. US. required: true type: string - $ref: '#/parameters/ApiVersionParameter' - in: body name: body description: The phone number search request. required: true schema: $ref: '#/definitions/PhoneNumberSearchRequest' responses: '202': description: 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. schema: $ref: '#/definitions/PhoneNumberSearchResult' headers: Location: description: URL to retrieve the final result after operation completes. type: string Operation-Location: description: URL to query for status of the operation. type: string operation-id: description: The operation id. type: string search-id: description: The search operation id. type: string default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse x-ms-long-running-operation: true x-ms-long-running-operation-options: final-state-via: location x-ms-examples: Search for phone numbers: $ref: ./examples/SearchPhoneNumbers.json description: Needs a more full description created. /availablePhoneNumbers/searchResults/{searchId}: get: tags: - Find and Purchase Available Phone Numbers summary: Microsoft Azure Gets A Phone Number Search Result By Search Id operationId: microsoftAzurePhonenumbersGetsearchresult produces: - application/json parameters: - in: path name: searchId description: The search Id. required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: $ref: '#/definitions/PhoneNumberSearchResult' default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse x-ms-examples: Get PhoneNumber Search Result: $ref: ./examples/GetPhoneNumberSearchResult.json description: Needs a more full description created. /availablePhoneNumbers/:purchase: post: tags: - Find and Purchase Available Phone Numbers summary: Microsoft Azure Purchases Phone Numbers operationId: microsoftAzurePhonenumbersPurchasephonenumbers consumes: - application/json parameters: - $ref: '#/parameters/ApiVersionParameter' - in: body name: body description: The phone number purchase request required: true schema: $ref: '#/definitions/PhoneNumberPurchaseRequest' responses: '202': description: 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: Operation-Location: description: URL to query for status of the operation. type: string operation-id: description: The operation id. type: string purchase-id: description: The purchase operation id. type: string default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse x-ms-long-running-operation: true x-ms-examples: Purchase phone numbers: $ref: ./examples/PurchasePhoneNumbers.json produces: - application/json description: Needs a more full description created. definitions: PhoneNumberCapabilities: description: Capabilities of a phone number. required: - calling - sms type: object properties: calling: description: Capability value for calling. enum: - none - inbound - outbound - inbound+outbound type: string x-ms-enum: name: PhoneNumberCapabilityType modelAsString: true sms: description: Capability value for SMS. enum: - none - inbound - outbound - inbound+outbound type: string x-ms-enum: name: PhoneNumberCapabilityType modelAsString: true PhoneNumberSearchResult: description: The result of a phone number search operation. required: - assignmentType - capabilities - cost - phoneNumbers - phoneNumberType - searchExpiresBy - searchId type: object properties: searchId: description: The search id. type: string phoneNumbers: description: The phone numbers that are available. Can be fewer than the desired search quantity. type: array items: type: string phoneNumberType: description: The phone number's type, e.g. geographic, or tollFree. enum: - geographic - tollFree type: string x-ms-enum: name: PhoneNumberType modelAsString: true assignmentType: description: Phone number's assignment type. enum: - person - application type: string x-ms-enum: name: PhoneNumberAssignmentType modelAsString: true capabilities: $ref: '#/definitions/PhoneNumberCapabilities' cost: $ref: '#/definitions/PhoneNumberCost' searchExpiresBy: format: date-time description: The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z. type: string PhoneNumberSearchRequest: description: Represents a phone number search request to find phone numbers. Found phone numbers are temporarily held for a following purchase. required: - assignmentType - capabilities - phoneNumberType type: object properties: phoneNumberType: description: The type of phone numbers to search for, e.g. geographic, or tollFree. enum: - geographic - tollFree type: string x-ms-enum: name: PhoneNumberType modelAsString: true assignmentType: description: The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application. enum: - person - application type: string x-ms-enum: name: PhoneNumberAssignmentType modelAsString: true capabilities: $ref: '#/definitions/PhoneNumberCapabilities' areaCode: description: The area code of the desired phone number, e.g. 425. type: string quantity: format: int32 description: The quantity of desired phone numbers. The default value is 1. default: 1 maximum: 2147483647 minimum: 1 type: integer PhoneNumberCost: description: The incurred cost for a single phone number. required: - amount - billingFrequency - currencyCode type: object properties: amount: format: double description: The cost amount. type: number currencyCode: description: The ISO 4217 currency code for the cost amount, e.g. USD. type: string billingFrequency: description: The frequency with which the cost gets billed. enum: - monthly type: string x-ms-enum: name: BillingFrequency modelAsString: true PhoneNumberPurchaseRequest: description: The phone number search purchase request. type: object properties: searchId: description: The search id. type: string parameters: ApiVersionParameter: in: query name: api-version description: Version of API to invoke. required: true type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'