General

Ti-Rate API has JSON objects in request and response, sent via HTTPS POST.

Details to be used:

  • Method — POST
  • Endpoint — https://<tenant>.ti-rate.com (e.g. https://zegoal.ti-rate.com)
  • Resource — /ti_api/json/<name_of_API>
  • Media Type — application/json
  • Authorization — Basic with login and password

Authorization

Currently we use Basic Authorization with login and password provided in each API request.

When using SoapUI, please also check Authenticate pre-emptively.

Request

  • mandatory parameters — must be present in request
  • optional parameters — can be missing in request, add and fill them only if you really need to


Response

  • processing_result — shows details about processing of API; provided in every API response; contains three (3) elements inside:
    • status — processing status: ok or error (currently only those two statuses are used)
    • code — code of the processing result: 0 (=ok) or anything else (=error); different error codes will be supported later (currently they are numeric, later, most of all, will be changed to alphanumeric)
    • text — human readable textual details describing processing result
  • processing_date — date and time of API processing (currently it is a timestamp in format Y-m-d H:i:s or Y-m-d H:i:s P, according to spec. http://uk3.php.net/manual/ru/function.date.php)
  • name of API — that contains inside
    • request — copy of input request
    • response — all details that API returns


Example:

{
  "processing_result": {
    "text": "Error happened during Event charging",
    "status": "error",
    "code": 1
  },
  "processing_date": "2018-01-10 15:47:46 +02:00",
  "ProcessEvent": {
    "response": {…},
    "request": {…}
  }
}
CODE


Response Header

All API responses has a header information. 

processing_result — result of processing this request

  • status — result status of processing: "ok", "error"
  • code — result code of processing: "0" ("ok"), any numeric or alphanumeric codes for errors
  • text — result text of processing: "successful" or missing ("ok"), error message in case of exception