> ## Documentation Index
> Fetch the complete documentation index at: https://docs.federalaccess.cl/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an access

> Returns one access, with the same JSON as an element of the list. It is available as soon as it exists, without the delay of the list. Requires the `accesses:read` scope.



## OpenAPI

````yaml https://apex.federalaccess.cl/public/v1/openapi.yaml get /public/v1/accesses/{id}
openapi: 3.0.1
info:
  title: Federal Access Public API
  version: v1
  description: >
    Public API for third-party integrations with Federal Access.


    **Authentication.** Send your API key as `Authorization: Bearer <key>`. Each
    endpoint requires a scope, named in its description.


    **Errors.** Errors share one JSON envelope: `{ "error": { "code", "message",
    "request_id", "details" } }`. `details` appears only on some errors. Unknown
    paths answer 404 with code `not_found`, and malformed request bodies answer
    400 with code `bad_request`.


    **Rate limiting.** Requests are rate-limited per installation. Going over
    the limit answers 429 with a `Retry-After` header.
servers:
  - url: https://apex.federalaccess.cl
    description: Production
security: []
paths:
  /public/v1/accesses/{id}:
    get:
      tags:
        - Accesses
      summary: Get an access
      description: >-
        Returns one access, with the same JSON as an element of the list. It is
        available as soon as it exists, without the delay of the list. Requires
        the `accesses:read` scope.
      operationId: getAccess
      parameters:
        - name: id
          in: path
          required: true
          description: Access identifier
          schema:
            type: integer
      responses:
        '200':
          description: The access
          content:
            application/json:
              example:
                data:
                  id: 9001
                  occurred_at: '2026-03-10T12:00:00.000-03:00'
                  received_at: '2026-03-10T12:00:02.123-03:00'
                  direction: entry
                  visitor_type: member
                  access_type: vehicular
                  visitor_name: Ana Pérez
                  license_plate: ABCD12
                  site:
                    id: 7
                    name: Depto 101
                  user_id: 55
                  invitation_id: null
                  passengers:
                    - first_name: Luis
                      last_name: Soto
                  source:
                    type: lpr
                    id: 3
                    name: Lector portón
                  free_access: false
                  mfa: false
              schema:
                $ref: '#/components/schemas/AccessResponse'
        '401':
          description: >-
            Unauthorized. Every authentication failure answers this same
            response.
          headers:
            WWW-Authenticate:
              schema:
                type: string
                example: Bearer realm="public_api"
              description: Always present on a 401
          content:
            application/json:
              example:
                error:
                  code: unauthorized
                  message: Invalid or missing API key.
                  request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden: the API key lacks the `accesses:read` scope, or the
            installation is inactive
          content:
            application/json:
              examples:
                missing_scope:
                  summary: The key lacks the required scope
                  value:
                    error:
                      code: forbidden
                      message: >-
                        Forbidden. The API key lacks the required scope:
                        accesses:read.
                      request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The access does not exist, belongs to another installation, or was
            discarded
          content:
            application/json:
              example:
                error:
                  code: record_not_found
                  message: Access not found.
                  request_id: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    AccessResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Access'
      required:
        - data
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: unauthorized
              description: Stable, machine-readable error code
            message:
              type: string
              example: Invalid or missing API key.
              description: Human-readable message
            request_id:
              type: string
              example: 7f3c1d2e-4b5a-4c6d-8e9f-0a1b2c3d4e5f
              description: The request's X-Request-Id, useful when contacting support
            details:
              type: object
              additionalProperties: true
              example:
                retry_after: 600
              description: Extra information, present only on some errors
          required:
            - code
            - message
            - request_id
      required:
        - error
    Access:
      type: object
      properties:
        id:
          type: integer
          example: 9001
          description: Access identifier
        occurred_at:
          type: string
          format: date-time
          description: When the access happened at the gate
        received_at:
          type: string
          format: date-time
          description: >-
            When the access reached the cloud. The list is ordered by this
            arrival, not by occurred_at
        direction:
          type: string
          enum:
            - entry
            - exit
          description: Direction of the access
        visitor_type:
          type: string
          enum:
            - member
            - habitual
            - invite
            - occasional
          description: Kind of person that accessed
        access_type:
          type: string
          enum:
            - vehicular
            - pedestrian
          description: Vehicular when there is a license plate
        visitor_name:
          type: string
          nullable: true
          description: Name of the person, null when it cannot be resolved
        license_plate:
          type: string
          nullable: true
          example: ABCD12
          description: License plate, if vehicular
        site:
          type: object
          nullable: true
          description: Site visited, null for accesses without a site
          properties:
            id:
              type: integer
              example: 7
              description: Site identifier
            name:
              type: string
              example: Depto 101
              description: Site name
          required:
            - id
            - name
        user_id:
          type: integer
          nullable: true
          description: Identifier of the user, for members and habitual visitors
        invitation_id:
          type: integer
          nullable: true
          description: Identifier of the invitation used, if any
        passengers:
          type: array
          description: Passengers of the access
          items:
            type: object
            properties:
              first_name:
                type: string
                nullable: true
                description: Passenger first name
              last_name:
                type: string
                nullable: true
                description: Passenger last name
            required:
              - first_name
              - last_name
        source:
          type: object
          nullable: true
          description: Device or button that registered the access
          properties:
            type:
              type: string
              enum:
                - qr
                - faceid
                - lpr
                - pda_button
                - client_button
                - other
              description: Kind of source; `other` for a kind this version does not know
            id:
              type: integer
              example: 3
              description: Source identifier
            name:
              type: string
              example: Lector portón
              description: Source name
          required:
            - type
            - id
            - name
        free_access:
          type: boolean
          description: Whether the access did not require a site
        mfa:
          type: boolean
          description: Whether the access used multi-factor authentication
      required:
        - id
        - occurred_at
        - received_at
        - direction
        - visitor_type
        - access_type
        - visitor_name
        - license_plate
        - site
        - user_id
        - invitation_id
        - passengers
        - source
        - free_access
        - mfa
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key sent as `Authorization: Bearer <key>`.'

````

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