## Server response format
All JSON responses from the server have the same format, as a base.
If any of the sections is not present in the response, a `null` value is
then received.
Example of call for addons:

```

curl --include \
    -H 'Shoptet-Access-Token: 123456-a-123-XXXXXXXXXXXXXXXXXXXXXXXXX' \
    -H 'Content-Type: application/json' \
   'https://api.myshoptet.com/api/eshop'
```
Example of call for private API access:

```

curl --include \
    -H 'Shoptet-Private-API-Token: 123456-a-123-XXXXXXXXXXXXXXXXXXXXXXXXX' \
    -H 'Content-Type: application/json' \
   'https://api.myshoptet.com/api/eshop'
```
Example of response:

```

HTTP/2 200

date: Fri, 13 Jul 2018 15:57:29 GMT

content-type: application/json; charset=utf-8


{
    "data": {
        "contactInformation": {
            "eshopName": "www.domena-eshopu.cz",
            "url": "https:\/\/www.domena-eshopu.cz\/",
            "companyId": "28935675",
           ...
        }
        ...
    },
    "errors": 'null',
    "metadata": {
        "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7"
    }
}
```
The basic structure of the response in the event of an error is as follows:

```

{
    "data": 'null',
    "errors": [
        {
            "errorCode": "missing-access-token",
            "message": "Missing access token. Please add `Shoptet-Access-Token` header to your request.",
            "instance": "unknown"
        }
    ],
    "metadata": {
        "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7"
    }
}
```
`metadata.requestId` is primary used for logging/reporting purposes. Please remember to include the value from `metadata.requestId` or from the header `X-Request-ID` when contacting the technical support with your specific inquiry for better traceability.
Most of the endpoints are synchronous, i.e. your answer is provided
immediately and contains the data requested. There
are however some endpoints, where either the request or the response
processing takes longer time. These are implemented as
[Asynchronous
requests](https://developers.shoptet.com/asynchronous-requests/). Your
request will be queued and you
receive only job identification in the response. You will be notified using
a
[webhook](https://developers.shoptet.com/api/documentation/webhooks/) when
the job is completed and your results
downloadable. Be aware, that registration of webhook `job:finished` is
required to be able to run asynchronous requests.
If webhook is not registered, you will receive an error response with HTTP
status code 403 and job won't be queued.
Webhook `job:finished` is also emitted when the job is failed so there is need to check the [Job detail](#tag/jobs/getjobdetail)
to get the result of the job. If an error occurs during an asynchronous request, the job is automatically marked as
failed 3 hours after its creation, and in this case, the `job:finished` webhook is not emitted.
Some attributes may be added to the new API version, or the sequence of
attributes can be changed.
Your software, therefore, shall not rely on either of these.
If some attributes are renamed or removed, you will be informed in an additional header - see also  [Deprecated header + Sunset](#section/basic-principles/deprecated-header-+-sunset).
