Developer Docs

Table of contents

General principles

The BSG API protocol works with JSON objects over http requests using the REST architecture. Each request contains an X-API-KEY header containing one of the keys – test or production. The test key is designated for the system debugging; all requests using the test key return random information. For all requests, unless other information is specified in the function description, we use:

Content-type: text/json

API URL

The URL for parameters passing looks like

https://app.bsg.hk/rest/{module}/{functionName}

where 

  • {functionName} – the name of the called method (a complete list of methods is given further in the documentation), 
  • {module} – API module (currently supported by HLR). 

The response to a correct request for creating objects (HLR requests, SMS messages, address books, etc.) contains the error: 0 field; for object requests this field is absent. If the response contains this field, and the value of this field is nonzero, then the errorDescription field will be additionally passed, containing a brief description of the error. For all possible error codes, see Appendix 1.

We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you’re agreeing to the collection of data as described in our Website Data Collection Policy.