Developer Docs
Table of contents

General principles

WTC API Protocol works using JSON objects through http requests using the REST architecture. Each request contains an X-API-KEY header, which contains one of the keys – test or working. The test key is intended for debugging the system, all requests using the test key return random information. 
For all requests, unless other information is specified in the function description, the following is used:

Content-type: text/json

API URL

The URL for parameters passing looks like

https://api.affiliate-sms.com/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.