Get Phone Numbers

Returns a Collection of PhoneNumberResponse objects.

require 'uri'
require 'net/http'

url = URI("https://api.opentransact.com/v1/phone-numbers?filter%5Bapplication-id%5D=#{application_id}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"

response = http.request(request)
puts response.read_body
curl --request GET \
  --url https://api.opentransact.com/v1/phone-numbers?filter%5Bapplication-id%5D=$APPLICATION_ID \
  --header 'authorization: Bearer $API_KEY'

Get Phone Numbers for a specific Owner

Returns a Collection of PhoneNumberResponse objects.

require 'uri'
require 'net/http'

url = URI("https://api.opentransact.com/v1/phone-numbers?filter%5Bowner-type%5D=profiles&filter%5Bowner-id%5D=#{profile_id}&filter%5Bapplication-id%5D=#{application_id}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"

response = http.request(request)
puts response.read_body
curl --request GET \
  --url https://api.opentransact.com/v1/phone-numbers?filter%5Bowner-type%5D=profiles&filter%5Bowner-id%5D=$PROFILE_ID&filter%5Bapplication-id%5D=$APPLICATION_ID \
  --header 'authorization: Bearer $API_KEY'