Get PSTN Call Rate
This request returns the PSTN voice call rates for the destination phone number and the direction specified in the request.
get | /rating/calls/pstn |
Sample
A sample GET request to get rates for PSTN voice calls for the phone number specified in the request:
curl -X GET \
'https://api.carrierx.com/core/v2/rating/calls/pstn?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
Query Arguments
Parameter | Data Type | Description |
---|---|---|
direction required | string | The direction of the call. Values accepted in this field are:
|
duration required | integer | The 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_sid | string | The secure ID of the partner for which you want to calculate the call price. |
to required | string | The destination phone number. |