Rest Full API

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

Attribute Type Description
type string Type of the service. Possible values: sms, hlr, viber.
country string Country name.
country_name string Country code (ISO-3166-1).
mcc int Mobile Country Code.
mnc int Mobile Network Code
price float The price value.
currency string For all supported currencies, an ISO-4217 code is returned.

REQUIRED PARAMETERS

No required parameters.

OPTIONAL PARAMETERS

Parameter Type Description
tariff int 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"
}
Menu