Introduction

We are pleased to present you our new REST API. At the begining of this documentation we would like to give you some general informations about this API:

  1. It's based on JSONAPI specification. We hope that following the rules of this specification will make our API easy to understand.

  2. This documentation is generated from swagger file - written in OpenAPI 3.0.2 Specification

  3. This API always accept application/json format at the API input and always return the same format as output.

  4. API output always follows this scheme:

{
    "meta": {
        "numberOfErrors": NUMBER_OF_ELEMENTS_IN_ERRORS (number),
        "numberOfData": NUMBER_OF_ELEMENTS_IN_DATA (number),
        "status": HTTP_STATUS (number),
        "uniqId": UNIQUE_REQUEST_ID (string)
        "someField": SOME_VALUE (string)
    },
    "data": [],
    "errors": [
        {
            "title": ERROR_TITLE (string),
            "message": ERROR_MESSAGE (string),
            "code": ERROR_CODE (string),
            "meta":{
                "parameter": SOME_VALUE (string),
                "value": SOME_VALUE (string),
                "source": SOME_VALUE (string),
                "someField": SOME_VALUE (string)
            }
        }
    ]
}

Following rules applies to the above scheme:

  • meta element is always present

  • meta.numberOfErrors indicates how many elements errors array includes

  • meta.numberOfData indicates how many elements data array includes

  • meta.status indicates response HTTP status

  • meta.uniqId is used to identify request, if your will have some troubles with your request, please make sure that you sent us meta.uniqId value

  • meta.someField may contain additional fields

  • data array cannot be present with errors array if status code is different from HTTP 207 (MULTI-STATUS)

  • errors array always consists object with fields: title, message and code.

  • errors.meta element may be present inside single error object and contain additional information (that can be parsed) about error

  • errors.meta.parameter the parameter that causes the error

  • errors.meta.value the value of this parameter passed

  • errors.meta.source a link to the entity that caused the error, e.g. externalId

  • errors.meta.somefield additional fields that may appear