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
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.