# Limits, logging and correlation

Salaxy publishes few hard limits. This page lists the ones that are stated, says what to log in your integration, and says what to send Salaxy when you need a server-side log lookup.
Examples use the **test** environment; see [Environments](https://code.salaxy.com/get-started/environments.md) for demo and production.

*Diagram: Your system calls the Salaxy API and logs every request with its own reference, the Salaxy ids from the response and the time. Salaxy logs the request on its side. When something fails, you send Salaxy the request time and the account id, and Salaxy looks up the server-side log. (Log both sides of every call. For a failure, Salaxy needs the request time and the account id to find the server-side log.)*

## Limits that are stated

| Area | Limit | See |
|---|---|---|
| **Rate** | No rate limit or `Retry-After` is published today, so there is no `429` handling to implement. Poll at a sensible interval | [Errors](https://code.salaxy.com/reference/errors.md#retries), [Polling](https://code.salaxy.com/reference/polling.md) |
| **List page size** | At most 50 items per page (1000 on the [Pro API](https://code.salaxy.com/integration/pro-api.md)). Follow `nextPageLink` until it is missing. `$top` above the page size returns `400` | [Queries](https://code.salaxy.com/reference/queries.md) |
| **Access token lifetime** | 48 hours, no refresh tokens. Repeat the grant | [REST authentication](https://code.salaxy.com/security/rest-authentication.md#tokens) |
| **Field lengths and formats** | Per the API reference. Validation failures name the field | [REST API reference](https://code.salaxy.com/reference/rest-api.md), [Errors](https://code.salaxy.com/reference/errors.md#the-error-body) |
| **Idempotency** | No general idempotency key. Endpoint-specific only | [Retries and idempotency](https://code.salaxy.com/reference/idempotency.md) |

Two limits apply only to v04 beta endpoints, see [Versions](https://code.salaxy.com/reference/versions.md#new-in-v04) and [Payment channels](https://code.salaxy.com/integration/payment-channels.md#payment-messages-v04-beta):

- A data funnel file upload is at most 10 MB, and only `csv`, `tsv`, `txt`, `jsonl`, `xlsx`, `xls`, `ods` and `pdf` files are accepted.
- A payment message create accepts an `Idempotency-Key` header: the same key and body within 24 hours returns the original message, and the same key with another body is refused.

No limit is published for request size or for requests per minute.

## Logging on your side

The API documents no correlation header, so build your own trail:

- **Your own reference.** Keep a reference for every operation and store it with the Salaxy id you get back. A retried create then does not need a guess; see [Retries and idempotency](https://code.salaxy.com/reference/idempotency.md).
- **Salaxy ids.** Log the id of every object you create or read (calculation, payroll, invoice, employment) and the account id you acted as.
- **Request and response.** Log the method, path, HTTP status and time. Log the `error` and `validation` parts of a `400` body. Never log tokens or private keys.
- **Personal data.** Payroll responses and SEPA files carry names and bank accounts. Keep them out of general logs.

## Asking Salaxy for a server-side log lookup

Send the **time of the request** (with time zone) and the **account id** you acted as, plus the Salaxy id of the object if you have one. Use the contact channel agreed in your project; see [Support](https://code.salaxy.com/get-started/support.md).

## Checklist

- Your code does not assume a rate limit header and does not loop on `429`.
- Every list read follows `nextPageLink` and does not use `$top`.
- You log your own reference, the Salaxy id, the account id, the status and the time of every call.
- Tokens, keys and personal data stay out of your logs.
- You can give Salaxy the request time and account id for any failed call.
