PRICE introduction
BSG provides an API to get the price information of your account.
Available http methods:
- GET /rest/hlr/prices/{tariff}
- GET /rest/sms/prices/{tariff}
- GET /rest/viber/prices/{tariff}
The price object
{ “type”:”hlr”,
“country”:”UA”,
“country_name”:”Ukraine”,
“mcc”:”255″,
“price”:”0.0200000″,
“currency”:”EUR”
}
This object represents your price information.
ATTRIBUTES
Type of the service. Possible values: sms, hlr, viber.
Country name.
Country code (ISO-3166-1).
Mobile Country Code.
Mobile Network Code
The price value.
For all supported currencies, an ISO-4217 code is returned.
REQUIRED PARAMETERS
No required parameters.
OPTIONAL PARAMETERS
Tariff code of a price grid.
RETURNS
Returns a price object if the request was successful. If the request failed, an error object will be returned.
EXAMPLE RESPONSE
{ “error”:0,
“errorDescription”:”No errors”,
“prices”:[
{
“type”:”viber”,
“country”:”UA”,
“country_name”:”Ukraine”,
“mcc”:”255″,
“price”:”0.2300000″,
“currency”:”EUR”
}
]
}
IN ERROR CASE
{ “error”:”6″,
“errorDescription”:”Invalid tariff code”
}