/api/p/) counts against two limits. A request must stay under both. If you go over either one, Alvys responds with 429 Too Many Requests.
These limits apply to every Public API endpoint. They are counted per IP address and per organization, not per token.
Alvys can change these limits to protect the platform. Changes are infrequent, and we aim to give notice before a change whenever possible.
What the limits mean for your integration
If your integration sends all its requests from one server, the per-IP-address limit is the one you reach first: 50 requests per 10 seconds, or about 5 requests per second. If your organization runs integrations from more than one server, each server’s IP address has its own 50-request budget. All of them together still share your organization’s 300 requests per 10 seconds. For example, to send a location update for each of 255 trailers from one server, pace the requests just under 5 per second. One pass over all trailers takes about one minute.What happens when you exceed a limit
- Alvys rejects the requests that go over the limit with
429 Too Many Requests. - The body of a
429response is not always JSON. Check the status code, not the body. - If the response includes a
Retry-Afterheader, wait that many seconds before you retry. If it does not, wait at least 10 seconds.
Why am I getting 403 responses that are not JSON?
If many of your requests from one IP address fail with errors such as 403 or 404, Alvys can temporarily block that IP address. While it is blocked, its requests get a 403 response that is not the API’s JSON error. Wait a few minutes before you send more requests.
To avoid it, fix the requests that cause the errors instead of retrying them. Common causes are IDs that do not exist (for example, a unit number where the endpoint expects the Alvys ID) and tokens that are missing a scope the endpoint needs.
How to stay under the limits
- Pace your requests. Send at a steady rate below 5 requests per second per IP address, instead of in bursts.
- Back off on
429. If you receive a429, wait before you retry, and increase the wait after each consecutive429(exponential backoff with jitter). An immediate retry keeps you over the limit. - Fetch more per request. Use the search endpoints with a larger page size instead of one
GETper record. - Cache your access token. Request a new token only when the current one expires. See Get an access token.
Responses that are not rate limits
409 Conflict from POST /api/p/v{version}/assets/{assetId}/locations (Record an asset’s current location) is not a rate-limit signal. It means the reading is older than the one Alvys already holds for that asset and source, so Alvys discarded it. This is a normal result when readings arrive out of order. Do not retry it, and do not slow down because of it.
For other status codes, see Response codes. For questions about these limits, see Need more support?.