Skip to main content
GET
List an organization's travel policy conditions
A TRAVEL policy decides what happens when a flight or bus trip is sent for approval: approve it, deny it, or ask its approvals. This catalog is what its conditions are checked against on create and update: a field that is not listed here, an operator a field does not accept, or a value of the wrong type is refused. Use it to build the condition editor of a policy that governs flight and bus trips: fields is the full list, operators describes every operator, and subjects names the trip types a policy can govern (AIR_TRIP, BUS_TRIP). Each field says whether every trip carries it (always) or only one kind of trip does (conditional, with a note saying which) — a condition on a field the trip does not carry is never true, whatever its operator. The list ends with one field per active custom field of the organization that is used on trips (customFields.<slug>), in the order the organization created them. Each carries customField with its definition, so a client can group them apart from the fixed fields. Fields that hold several values — the passengers, the cabin classes, the airlines, the bus service classes — match when ANY of them is one of the listed values (INCLUDES) or when NONE of them is (NOT_INCLUDES). Labels and descriptions are in Portuguese. Any member of the organization can read the catalog.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of the organization. Its active custom fields are added to the catalog.

Format: UUID

Response

Successful response

GET .../business-policies/travel-conditions response.

context
enum<string>
required

Always TRAVEL.

Available options:
TRAVEL
Example:

"TRAVEL"

subjects
string[]
required

What a TRAVEL policy governs: AIR_TRIP (a flight) and BUS_TRIP (a bus trip).


Example: ["AIR_TRIP","BUS_TRIP"]

logic
string[]
required

The values conditions.logic and each group's logic accept.


Example: ["AND","OR"]

operators
object[]
required

Every operator, with the kind of value it takes.

fields
object[]
required

Every field a condition can test: the fixed fields, then one per active custom field the organization uses on trips (text, number, boolean, date and selection custom fields only).