Responses

Typical response contains next data:

status Status code, integer:
  • 200 - request successfull
  • 500 - 599 - error
message Short status code in text, eg "ok" or error message
data Requested data, array of documents. See API specs section for detailed explanation of data returned for every component.
api API version info
warnings List of warnings, information and debug messages.

Response with one document from units registry:


{
  "status": 200,
  "message": "ok",
  "data": [
    {
      "id": "1",
      "code": "TK",
      "name": "Tükk",
      "memo": "",
      "status": "0",
      "KNKOOD": "",
      "NIMI2": "",
      "dependencies": {
        "unitconversions": []
      }
    }
  ],
  "api": "0.1 beta",
  "warnings": []
}

Response output format

Output formats are JSON (default) or PHP print_r output.

Output format could be changed using HTTP_X_OUTPUTFORMAT request header variable.
Possible values:

  • json
  • php


Profit API v 0.1.4.2 beta, © Intellisoft OÜ 2017 - 2024