Building OData queries
This guide shows how to build queries against Rently's OData endpoints using the standard
options: filtering, selecting fields, expanding relationships, sorting, paginating and
counting. All examples go against GET https://{tenant}.rently.com.ar/odata/... with the
Authorization: Bearer {token} header.
In Rently, $filter, $select, $expand, $orderby, $top, $skip and
$count are enabled. Collections are paginated server-side with a maximum of 100 records per
page.
Base request
curl 'https://{tenant}.rently.com.ar/odata/Bookings' \
-H 'Authorization: Bearer YOUR_TOKEN'
The response comes in the standard OData envelope: the records go in value.
{
"@odata.context": "https://{tenant}.rently.com.ar/odata/$metadata#Bookings",
"value": [
{ "Id": 1, "Code": "RNT-0001", "Currency": "USD", "IsQuotation": false }
]
}
$filter — filter
Filters the collection by conditions on the entity's fields.
# Confirmed bookings (not quotations) in USD
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$filter=IsQuotation eq false and Currency eq '\''USD'\''' \
-H 'Authorization: Bearer YOUR_TOKEN'
Most used operators:
| Operator | Meaning | Example |
|---|---|---|
eq / ne | equal / not equal | Currency eq 'USD' |
gt ge lt le | greater / greater-or-equal / less / less-or-equal | FromDate ge 2026-01-01T00:00:00Z |
and or not | logical combination | IsQuotation eq false and Balance gt 0 |
contains(...) | substring | contains(Code,'RNT') |
startswith(...) | starts with | startswith(Lastname,'Do') |
Strings go between single quotes ('USD'), dates in ISO 8601 format
(2026-01-01T00:00:00Z), and numbers/booleans without quotes (Balance gt 0,
IsQuotation eq false).
$select — choose fields
Fetch only the fields you need (lighter responses).
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$select=Id,Code,FromDate,ToDate,Currency' \
-H 'Authorization: Bearer YOUR_TOKEN'
$expand — expand relationships
Includes related entities in the same response. In Bookings you can expand, among
others, Customer, Category, DeliveryPlace, ReturnPlace and Agency.
# Bookings with the customer and category data embedded
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$expand=Customer,Category' \
-H 'Authorization: Bearer YOUR_TOKEN'
You can combine $expand with $select inside the relationship:
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$expand=Customer($select=Firstname,Lastname,EmailAddress)' \
-H 'Authorization: Bearer YOUR_TOKEN'
$orderby — sort
# Most recent first
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$orderby=FromDate desc' \
-H 'Authorization: Bearer YOUR_TOKEN'
It accepts asc (default) or desc, and several fields separated by comma.
$top and $skip — paginate
# Second page of 20 records
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$top=20&$skip=20' \
-H 'Authorization: Bearer YOUR_TOKEN'
The server limits each page to 100 records. To walk through large volumes, iterate with
$skip increasing by $top.
$count — total records
Add $count=true to receive the total in @odata.count, useful for paginating in a UI.
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$count=true&$top=20' \
-H 'Authorization: Bearer YOUR_TOKEN'
{
"@odata.context": "https://{tenant}.rently.com.ar/odata/$metadata#Bookings",
"@odata.count": 1532,
"value": [ /* ...20 bookings... */ ]
}
All together
An example combining several options: confirmed bookings, from a date, with the customer expanded, only some fields, sorted and paginated.
curl 'https://{tenant}.rently.com.ar/odata/Bookings?$filter=IsQuotation eq false and FromDate ge 2026-01-01T00:00:00Z&$expand=Customer($select=Firstname,Lastname)&$select=Id,Code,FromDate,Currency&$orderby=FromDate desc&$top=20&$count=true' \
-H 'Authorization: Bearer YOUR_TOKEN'
When using these URLs from code, remember to URL-encode the values (spaces become
%20, etc.). In curl it's enough to wrap the URL in quotes as in the examples.
Resource-specific filters
In addition to the OData options, some endpoints accept their own parameters:
GET /odata/Bookings?customerId={id}— a customer's bookings (accepts the internal Id or the customer'sGlobalId).GET /odata/Agencies?q={text}— quick search of agencies by name or IATA code.
The detail of each resource, with its fields and parameters, is in the OData section of the reference.