Errors and pagination
This guide describes how the Rently API communicates errors (JSON structure and codes), what the most common HTTP status codes mean, and how to walk through paginated responses with the offset and limit parameters.
All examples assume you have already obtained a Bearer token. See the authentication guide for the detail of the flow. The authorization header is sent on every call:
Authorization: Bearer {token}
Error format
When a request cannot be completed due to a business or validation error, the API responds with a JSON body with the following structure:
| Field | Type | Description |
|---|---|---|
ErrorMessage | string (nullable) | Human-readable message describing the error. |
ErrorCode | integer | Numeric code identifying the error type (see codes table). |
Id | string (nullable) | Correlation identifier to trace the error in support. |
ErrorCode is always serialized as an integer, not as text. For example, 1 corresponds to CustomerNotFound.
Error response example
{
"ErrorMessage": "The requested resource was not found",
"ErrorCode": 1,
"Id": "0HMVB9A2K3C4D-00000001"
}
Store the value of Id in your logs. It is the correlation identifier that lets Rently support locate the exact trace of the request that failed.
Error codes (ErrorCode)
The following table lists all the error codes the API can return:
The numeric values are not contiguous: the enumeration skips positions (for example, from 15 to 21). Map your retries and messages from the exact value and do not assume sequential ranges.
HTTP status codes
The API uses a limited set of status codes. Note that authentication failures are reported as 403 (the API does not return 401).
| Status | Meaning | Body |
|---|---|---|
200 OK | The request was processed successfully. | Resource payload or paginated result. |
400 Bad Request | Business or validation error (Api Error). | JSON with ErrorMessage, ErrorCode and Id. |
403 Forbidden | User not authenticated or without permissions for the endpoint. | No body. |
404 Not Found | The requested resource does not exist. | No body. |
A 403 can mean either that the token is invalid or missing or that the authenticated user does not have the required permission for that endpoint. Check the Authorization header first and then the user's permissions.
How to handle errors
200→ process the response normally.400→ readErrorCodeto decide the action (fix data, re-quote, etc.) and showErrorMessageto the operator.403→ check that the token is valid, current and matches the same tenant; confirm that the user has permissions.404→ the identifier used does not correspond to any resource; validate the IDs before retrying.
Pagination
Endpoints that return lists (for example GET /api/bookings/list, GET /api/customers or GET /api/cars) use offset and limit pagination.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
offset | integer | 0 | Page starting point. Must be >= 0. |
limit | integer | 30 | Maximum number of items per page. Capped at a maximum of 100. |
If you send a limit greater than 100, the API automatically caps it at 100. A negative offset is normalized to 0.
Result shape
Paginated responses share the same PagedResult structure:
| Field | Type | Description |
|---|---|---|
Offset | integer | Offset applied to this page. |
Limit | integer | Limit applied to this page. |
Total | integer | Total of available items across all pages. |
Results | array (nullable) | Items of the current page. |
NextOffset | integer | Offset to use to request the next page. |
Paginated response example
{
"Offset": 0,
"Limit": 30,
"Total": 2,
"Results": [
{ "Id": 1 },
{ "Id": 2 }
],
"NextOffset": 0
}
Request example
curl "https://{tenant}.rently.com.ar/api/customers?offset=0&limit=30&language=es-AR" \
-H "Authorization: Bearer {token}"
How to walk through all the pages
To iterate the entirety of a listing, use the NextOffset from each response as the offset of the next request. The iteration ends when Results returns fewer items than Limit.
# Page 1
curl "https://{tenant}.rently.com.ar/api/bookings/list?offset=0&limit=30&language=es-AR" \
-H "Authorization: Bearer {token}"
# Page 2: use the NextOffset returned by the previous page
curl "https://{tenant}.rently.com.ar/api/bookings/list?offset={NextOffset}&limit=30&language=es-AR" \
-H "Authorization: Bearer {token}"
For the iteration, check Results.Count < Limit as the end condition instead of comparing against Total. This works consistently with both pagination styles of the API.
In GET /api/bookings/list the offset parameter works as a cursor by Id, not as a number of records to skip. Always pass 0 on the first call (regardless of the sort direction) and, on the following ones, the NextOffset value returned by the previous response. Do not build the offset manually by adding page sizes.