Response

A method may not return anything. Then its HTTP return code ("200 OK") indicates that it went well.
When a method has to return some data, it will be done using a JSON document.

If a call ask for a binary file, the method will return a JSON document containing a link to the binary resource.

HTTP return code

Queries return an HTTP error code based on the result of their action:

CodeDescription
200 OKThe query was executed correctly.
400 Bad RequestThe request is badly formed.
401 UnauthorizedThe authentication is incorrect, or the user is not allowed to use the API (he has not validated and activated his account, or his trial period is over and he has no valid license).
403 ForbiddenThe user does not have the right to access the requested resource or execute the requested request.
404 Not FoundThe requested resource does not exist.
503 Service UnavailableWhen an unsupported version of the API is requested.

Error

In case of error, a JSON document is returned, containing the description of the encountered error (in addition to the HTTP return code other than 200 OK):

{
    "errCode": 403,
    "errMsg": "You do not have access to this project.",
    "errLink": "https://help.skriv.com/api/..."
}

The errCode and errMsg fields are mandatory, the errLink field is optional.