Authorization

Token received for Public API should be specified within X-API-Auth-Token header in each API request. The token can be canceled, blocked/deleted via IWTM interface. In this case, the token is considered to be invalid. When the token is invalid, 401 error message will be returned.

{
    "error": {
        "code": "unauthorized"
    }
}

If the token is valid, but API user has no sufficient access rights, 403 error message will be returned.

{
    "error": {
        "code": "forbidden"
    }
}

Versions

API version is sent via X-API-Version header and can be in one of the following states:

In case the server does not support the version, 400 error message is returned.

{
    "error": {
        "code": "unsupported_version",
        "meta": {
            "versions": [
                {
                    "NAME":   "1",
                    "STATUS": "removed"
                },
                {
                    "NAME":   "1.1",
                    "STATUS": "deprecated"
                },
                {
                    "NAME":   "1.2",
                    "STATUS": "supported"
                },
                {
                    "NAME":   "1.3",
                    "STATUS": "supported"
                },
                {
                    "NAME":   "1.4",
                    "STATUS": "supported"
                }
            ]
        }
    }
}


Licenses

To operate properly, the module requires a license as follows:

 

{
    "common_name": "iw",
    "importer_name": "dome"
}

 

Where common_name —  is a name of a licensed company and importer_name — is a product, receiving data from TM. X-API-CompanyId and X-API-ProductName headers should be sent in each request. In case the license is rejected 403 error message will be returned.


 

{
    "error": {
        "code": "licence_not_valid"
    }
}

 

Thus, each request to the server should contain the following obligatory headings:

 

In 6.10.10 version X-API-Version program interface number is 1.2

X-API-Version: 1.4
X-API-CompanyId: iw
X-API-ProductName: dome
X-API-Auth-Token: gla20dos1pcdbr69caxz