Skip to main content

Get VoIP Call Rate

This request returns the voice-over-IP call rates for the destination phone number and the direction specified in the request.

get /rating/calls/voip/{sub_type}

Sample

A sample GET request to get rates for VoIP voice calls for the phone number specified in the request:

curl -X GET \
'https://api.carrierx.com/core/v2/rating/calls/voip/conference?direction=outbound&duration=10&to=17605692222' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a serialized copy of the Rating Call Response object:

{
"direction": "outbound",
"duration_billing": "60",
"price": "0.01400",
"rate": "0.01400"
}

Required Scopes

To get information about a Rating Call Response object, the partner must have one of the following scopes enabled:

  • rating.manage
  • rating.read

Path Arguments

ParameterData TypeDescription
sub_type requiredstringThe endpoint type which will be used to make or accept the voice call. Values accepted in this field are conference, conference_playback, conference_v2, flexml, mediator, peering_receiver, peering_sender, third_party, and voicemail.

Query Arguments

ParameterData TypeDescription
direction requiredstringThe direction of the call. Values accepted in this field are:
  • inbound for receiving the calls from the destination phone number.
  • outbound for sending the calls to the destination phone number.
duration requiredintegerThe duration of the call in seconds that will be used to calculate the call price. If the duration is less than the multiple of the duration_billing, it will be rounded up to the nearest multiple of the duration_billing for the price calculation.
partner_sidstringThe secure ID of the partner for which you want to calculate the call price.
to requiredstringThe destination phone number.