> ## 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.

# Get a custom field

> Returns one custom-field definition by ID, whether active or deactivated.



## OpenAPI

````yaml /api-reference/identity.openapi.json get /realms/{realmId}/organizations/{organizationId}/custom-fields/{customFieldId}
openapi: 3.0.3
info:
  title: Identity
  version: 1.0.0
  description: >-
    Portão 3 identity 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). 4 app groups run without
    the identity authorizer; publicPatterns enumerates every route they expose,
    except POST /auth/sign-in, documented with HTTP Basic for the API-client
    credentials flow. Confidence tiers: generated:typed=45 copied:manual=0
    unknown=0.
servers:
  - url: https://api.identity.v2.portao3.com.br/
    description: production
  - url: https://api.identity.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Authentication
  - name: Current User
  - name: Custom Fields
  - name: API Clients
  - name: Users
  - name: Organizations
  - name: Groups
  - name: Realms
paths:
  /realms/{realmId}/organizations/{organizationId}/custom-fields/{customFieldId}:
    get:
      tags:
        - Custom Fields
      summary: Get a custom field
      description: >-
        Returns one custom-field definition by ID, whether active or
        deactivated.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdCustomFieldsByCustomFieldId
      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 your organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: customFieldId
          in: path
          required: true
          description: |-
            ID of the custom field.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: 9c4f0a2e-7b3d-4e8a-a1f5-2d6c8b0e4a71
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier of the custom field.
                    example: 9c4f0a2e-7b3d-4e8a-a1f5-2d6c8b0e4a71
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - DEACTIVATED
                    description: >-
                      `ACTIVE` fields are rendered and validated on the entities
                      listed in `location`. `DEACTIVATED` fields are hidden from
                      new entries while their stored values stay readable.
                      Changed only through the activate and deactivate
                      endpoints.
                    example: ACTIVE
                  realm:
                    type: string
                    description: Realm the field belongs to.
                    example: 6f1d2c3b-4a5e-4f60-9b7c-8d9e0f1a2b3c
                  organization:
                    type: string
                    description: Organization the field belongs to.
                    example: 0b8e7d6c-5a4f-4e3d-9c2b-1a0f9e8d7c6b
                  label:
                    type: string
                    description: Human-readable name shown wherever the field is rendered.
                    example: Centro de custo
                  slug:
                    type: string
                    description: >-
                      Stable key of the field: the property name under which its
                      value is stored in the `customFields` map of transactions,
                      cards, wallets, users and the other entities in
                      `location`. Unique per organization and immutable after
                      creation.
                    example: centro-de-custo
                  type:
                    type: string
                    enum:
                      - TEXT
                      - NUMBER
                      - DATE
                      - BOOLEAN
                      - SELECT
                      - MULTI_SELECT
                      - CUSTOMER
                      - FILE
                      - MULTI_FILE
                    description: Value type the field accepts. Immutable after creation.
                    example: SELECT
                  values:
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                          description: >-
                            Stored identifier of the option — the value written
                            to the entity's `customFields` map when this option
                            is chosen. Immutable, and unique within the field on
                            creation. A few definitions created before that rule
                            still carry a repeated `value` (each occurrence with
                            its own label and `_id`), and updates preserve them
                            — treat `values` as an ordered list, not as a map
                            keyed by `value`.
                          example: marketing
                        label:
                          type: string
                          description: Display text of the option.
                          example: Marketing
                        description:
                          type: string
                          description: >-
                            Optional help text for the option. Empty when none
                            was given.
                          example: Campanhas e eventos
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - DEACTIVATED
                          description: >-
                            `ACTIVE` options can be selected. `DEACTIVATED`
                            options are kept so historical values still render,
                            but can no longer be chosen.
                          example: ACTIVE
                        _id:
                          type: string
                          description: >-
                            Internal identifier assigned when the option is
                            stored. Present on reads (get, list, activate,
                            deactivate); absent on the create response and, on
                            an update response, for an option that request has
                            just appended — the update returns what it wrote, so
                            fetch the field again if you need the new option's
                            `_id`. Ignored on writes: match options by `value`.
                          example: 68d3f1a2c4b5e6f7a8b9c0d1
                      required:
                        - value
                        - label
                      description: >-
                        One selectable option of a `SELECT` / `MULTI_SELECT`
                        custom field.
                    description: >-
                      Selectable options of a `SELECT` / `MULTI_SELECT` field.
                      Normally empty for the other types.
                  location:
                    type: array
                    items:
                      type: string
                      enum:
                        - TRANSACTION
                        - CARD
                        - WALLET
                        - CUSTOMER
                        - TRIP
                        - TRAVEL_PASSENGER
                        - USER
                        - VEHICLE
                      example: TRANSACTION
                    description: >-
                      Entities the field is attached to. A value is accepted —
                      and, when `required` is true, demanded — on each listed
                      entity.


                      ---


                      Example: `["TRANSACTION","CARD"]`
                  mask:
                    type: string
                    description: >-
                      Display format of a `NUMBER` field: `NONE` (plain number),
                      `BRL` (Brazilian reais), `USD` (US dollars) or `PERCENT`.
                      Empty for the other types.
                    example: BRL
                  required:
                    type: boolean
                    description: >-
                      Whether a value must be provided on every entity listed in
                      `location`.
                    example: true
                  description:
                    type: string
                    description: >-
                      Optional help text shown alongside the field. Empty when
                      none was given.
                    example: Centro de custo responsável pela despesa
                  createdBy:
                    type: string
                    description: ID of the user who created the field.
                    example: 3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b
                  updatedBy:
                    type: string
                    description: ID of the user who last changed the field.
                    example: 3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b
                  createdAt:
                    type: string
                    description: When the field was created (ISO 8601, UTC).
                    example: '2026-09-02T14:21:05.318Z'
                  updatedAt:
                    type: string
                    description: When the field was last changed (ISO 8601, UTC).
                    example: '2026-09-18T09:07:44.902Z'
                required:
                  - id
                  - status
                  - realm
                  - organization
                  - label
                  - slug
                  - type
                  - values
                  - location
                  - mask
                  - required
                  - description
                  - createdBy
                  - updatedBy
                description: A custom-field definition.
        '404':
          description: >-
            `CUSTOM_FIELD_NOT_FOUND` — No field with that ID exists in 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:
                      - CUSTOM_FIELD_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - IDENTITY
                    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_NOT_FOUND
                origin: IDENTITY
                message: Custom field not found
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID; `fields` lists
            each one.
          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:
                      - IDENTITY
                    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: IDENTITY
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: customFieldId
                    message: Invalid UUID
                    code: CUSTOMFIELDID_UUID

````

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