> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# List an organization's travel policy conditions

> Lists the condition fields a `TRAVEL` business policy can use, with the operators and values each accepts.

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.


## OpenAPI

````yaml /api-reference/ruleengine.openapi.json get /realms/{realmId}/organizations/{organizationId}/business-policies/travel-conditions
openapi: 3.0.3
info:
  title: Ruleengine
  version: 1.0.0
  description: >-
    Portão 3 ruleengine API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Confidence tiers:
    generated:typed=26 copied:manual=0 unknown=0.
servers:
  - url: https://api.ruleengine.v2.portao3.com.br/
    description: production
  - url: https://api.ruleengine.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Business Policies
  - name: Policy Requests
paths:
  /realms/{realmId}/organizations/{organizationId}/business-policies/travel-conditions:
    get:
      tags:
        - Business Policies
      summary: List an organization's travel policy conditions
      description: >-
        Lists the condition fields a `TRAVEL` business policy can use, with the
        operators and values each accepts.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesTravelConditions
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: >-
            ID of the organization. Its active custom fields are added to the
            catalog.


            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  context:
                    type: string
                    enum:
                      - TRAVEL
                    description: Always `TRAVEL`.
                    example: TRAVEL
                  subjects:
                    type: array
                    items:
                      type: string
                      example: AIR_TRIP
                    description: >-
                      What a `TRAVEL` policy governs: `AIR_TRIP` (a flight) and
                      `BUS_TRIP` (a bus trip).


                      ---


                      Example: `["AIR_TRIP","BUS_TRIP"]`
                  logic:
                    type: array
                    items:
                      type: string
                      example: AND
                    description: >-
                      The values `conditions.logic` and each group's `logic`
                      accept.


                      ---


                      Example: `["AND","OR"]`
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        operator:
                          type: string
                          description: The `operator` to use in a condition.
                          example: GREATER_THAN
                        valueKind:
                          type: string
                          enum:
                            - single
                            - array
                            - none
                            - criteria-string
                          description: >-
                            `single`: one value. `array`: a non-empty array of
                            values. `none`: no value — the number is part of the
                            operator, as in `DATE_WITHIN(3)`. `criteria-string`:
                            a sentence in natural language.
                          example: single
                        label:
                          type: string
                          description: Display label, in Portuguese.
                          example: maior que
                        description:
                          type: string
                          description: >-
                            What the operator does and its pitfalls, in
                            Portuguese.
                          example: O campo é maior que o valor informado.
                      required:
                        - operator
                        - valueKind
                        - label
                        - description
                      description: One operator, and the kind of value it takes.
                    description: Every operator, with the kind of value it takes.
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            The `field` to use in a condition: a dot path into
                            the trip.
                          example: amount
                        type:
                          type: string
                          enum:
                            - integer
                            - number
                            - string
                            - boolean
                            - enum
                            - date
                          description: >-
                            How the condition `value` is typed: `integer`
                            (amounts are integer centavos — see `unit`),
                            `number` (a decimal, for number custom fields),
                            `string`, `boolean`, `enum` (one of `enumValues`,
                            sent in an array) or `date` (`YYYY-MM-DD`, custom
                            fields only).
                          example: integer
                        unit:
                          type: string
                          enum:
                            - centavos
                          description: >-
                            `centavos` on amounts: `150000` is R$ 1,500.00.
                            Absent on other fields.
                          example: centavos
                        enumValues:
                          type: array
                          items:
                            type: string
                          description: >-
                            Every accepted value, for `type: "enum"`. Absent on
                            other types.
                        operators:
                          type: array
                          items:
                            type: string
                            example: EQUALS
                          description: >-
                            Every operator the field accepts — `viewOperator`
                            plus, on some fields, `DATE_WITHIN(n)` or
                            `LLM_EVALUATE`.


                            ---


                            Example:
                            `["EQUALS","NOT_EQUALS","LESS_THAN","GREATER_THAN","GTE","LTE"]`
                        viewOperator:
                          type: array
                          items:
                            type: string
                            example: EQUALS
                          description: >-
                            The operators to offer in a condition editor.


                            ---


                            Example:
                            `["EQUALS","NOT_EQUALS","LESS_THAN","GREATER_THAN","GTE","LTE"]`
                        viewType:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - MONEY
                                - NUMBER
                                - TEXT
                                - BOOLEAN
                                - DATE
                                - MULTI_SELECT
                              description: >-
                                `MONEY`, `NUMBER`, `TEXT`, `BOOLEAN`, `DATE` or
                                `MULTI_SELECT`.
                              example: MONEY
                            prefix:
                              type: string
                              description: '`NUMBER` only: text shown before the number.'
                            suffix:
                              type: string
                              description: '`NUMBER` only: text shown after the number.'
                            options:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: >-
                                      The value to put in the condition's
                                      `value` array.
                                    example: PIX
                                  label:
                                    type: string
                                    description: Display label, in Portuguese.
                                    example: PIX
                                  icon:
                                    type: string
                                    description: >-
                                      Name of an icon to show next to the
                                      option. Absent on most options.
                                required:
                                  - id
                                  - label
                                description: One selectable value of a multi-select field.
                              description: '`MULTI_SELECT` only: the values to pick from.'
                            dynamicOptions:
                              type: string
                              enum:
                                - WALLETS
                                - CURRENCIES
                                - USERS
                              description: >-
                                `MULTI_SELECT` only: where the values come from
                                instead of `options`.
                          required:
                            - type
                          description: Which input to render for the value.
                        label:
                          type: string
                          description: Display label, in Portuguese.
                          example: Valor
                        description:
                          type: string
                          description: >-
                            What the field holds and how to use it, in
                            Portuguese.
                          example: Valor total da viagem, em centavos.
                        availability:
                          type: string
                          enum:
                            - always
                            - conditional
                          description: >-
                            `always`: every trip carries the field.
                            `conditional`: only some do (see `availabilityNote`
                            — flight-only or bus-only fields, custom fields); a
                            condition on a field the trip does not carry is
                            false.
                          example: always
                        availabilityNote:
                          type: string
                          description: >-
                            When the field is `conditional`, when it is present
                            — in Portuguese. Absent otherwise.
                        dateKind:
                          type: string
                          enum:
                            - CALENDAR_DATE
                            - INSTANT
                            - CLIENT_DAY
                          description: >-
                            `date` fields only (custom fields): which day a
                            condition compares — `CLIENT_DAY`, the day as
                            written in the custom field.
                        customField:
                          type: object
                          properties:
                            id:
                              type: string
                              description: ID of the custom field.
                              example: f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b
                            slug:
                              type: string
                              description: >-
                                Slug of the custom field — the last segment of
                                `field`.
                              example: cost-center
                            type:
                              type: string
                              description: >-
                                Type of the custom field: `TEXT`, `NUMBER`,
                                `BOOLEAN`, `DATE`, `SELECT` or `MULTI_SELECT`.
                              example: SELECT
                            required:
                              type: boolean
                              description: Whether the custom field is required.
                              example: false
                            mask:
                              type: string
                              description: >-
                                Display mask of the custom field. Absent when it
                                has none.
                            entity:
                              type: string
                              description: >-
                                Whose custom field it is: `transaction` (the
                                payment's own, `customFields.<slug>`), `wallet`,
                                `vehicle`, `requester` or `card`.
                              example: transaction
                            location:
                              type: string
                              description: >-
                                Where the custom field is defined:
                                `TRANSACTION`, `WALLET`, `VEHICLE`, `USER` or
                                `CARD`.
                              example: TRANSACTION
                          required:
                            - id
                            - slug
                            - type
                            - required
                            - entity
                            - location
                          description: >-
                            Present only on a field built from one of the
                            organization's custom fields. Absent on the fixed
                            fields.
                      required:
                        - field
                        - type
                        - operators
                        - viewOperator
                        - viewType
                        - label
                        - description
                        - availability
                      description: One field a TRAVEL business policy may condition on.
                    description: >-
                      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).
                required:
                  - context
                  - subjects
                  - logic
                  - operators
                  - fields
                description: '`GET .../business-policies/travel-conditions` response.'
        '403':
          description: >-
            `BUSINESS_POLICY_FORBIDDEN` — You are not a member of the
            organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BUSINESS_POLICY_FORBIDDEN
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - RULE_ENGINE
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BUSINESS_POLICY_FORBIDDEN
                origin: RULE_ENGINE
                message: You do not have permission to manage business policies
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID; `fields` names
            it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - RULE_ENGINE
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: RULE_ENGINE
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: organizationId
                    message: Invalid UUID
                    code: ORGANIZATIONID_UUID
        '503':
          description: >-
            `CUSTOM_FIELD_CATALOG_UNAVAILABLE` — The organization's custom
            fields could not be loaded in time; try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - CUSTOM_FIELD_CATALOG_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - RULE_ENGINE
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: CUSTOM_FIELD_CATALOG_UNAVAILABLE
                origin: RULE_ENGINE
                message: Could not load the organization's custom fields — try again

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.