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

# Enviar marcaciones

> Registra hasta 500 marcaciones. Idempotente: un registro existente del empleado en esa fecha se actualiza. Cada registro se procesa por separado; si todos fallan la respuesta es 422.

**Permiso requerido:** `hr.attendances`



## OpenAPI

````yaml /api-reference/openapi.json post /hr/attendances
openapi: 3.0.3
info:
  title: FileXpress API Externa
  version: 1.0.0
  description: >-
    API para integrar sistemas de terceros con FileXpress: facturación, RRHH y
    contabilidad.
servers:
  - url: https://api.filexpress.app/api/external
    description: Producción
security:
  - ApiKey: []
tags:
  - name: General
  - name: Facturación · Ventas
  - name: Facturación · Compras
  - name: Facturación · Clientes
  - name: Facturación · Proveedores
  - name: Facturación · Productos
  - name: Catálogos
  - name: RRHH · Empleados
  - name: RRHH · Asistencia
  - name: RRHH · Permisos
  - name: RRHH · Planillas
  - name: Contabilidad
paths:
  /hr/attendances:
    post:
      tags:
        - RRHH · Asistencia
      summary: Enviar marcaciones
      description: >-
        Registra hasta 500 marcaciones. Idempotente: un registro existente del
        empleado en esa fecha se actualiza. Cada registro se procesa por
        separado; si todos fallan la respuesta es 422.


        **Permiso requerido:** `hr.attendances`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttendanceBatchRequest'
            example:
              records:
                - document_number: 01234567-8
                  date: '2026-10-01'
                  check_in: '08:02'
                  check_out: '17:05'
                - employee_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                  date: '2026-10-01'
                  check_in: '07:55'
                  check_out: '18:30'
                  notes: Cierre de mes
                - document_number: 98765432-1
                  date: '2026-10-01'
                  check_in: '08:10'
      responses:
        '200':
          description: Éxito
          content:
            application/json:
              example:
                status: true
                data:
                  created: 2
                  updated: 0
                  failed: 1
                  results:
                    - index: 0
                      status: created
                      id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                      employee_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                    - index: 1
                      status: created
                      id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                      employee_id: 9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11
                    - index: 2
                      status: error
                      message: >-
                        Employee not found (send a valid employee_id or
                        document_number).
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '422':
          $ref: '#/components/responses/E422'
        '429':
          $ref: '#/components/responses/E429'
components:
  schemas:
    AttendanceBatchRequest:
      type: object
      properties:
        records:
          type: array
          maxItems: 500
          items:
            type: object
            properties:
              employee_id:
                type: string
                format: uuid
                description: Empleado (o document_number).
              document_number:
                type: string
                description: Documento del empleado (o employee_id).
              date:
                type: string
                format: date
                description: Fecha.
              check_in:
                type: string
                description: Entrada HH:MM (24 h).
              check_out:
                type: string
                description: Salida HH:MM (24 h).
              notes:
                type: string
                description: Observaciones.
            required:
              - date
      required:
        - records
  responses:
    E401:
      description: API Key ausente o inválida
      content:
        application/json:
          example:
            status: false
            message: Invalid API Key.
    E403:
      description: Integración sin el permiso requerido o desactivada
      content:
        application/json:
          example:
            status: false
            message: This integration does not have the 'hr.employees' permission.
            required_scope: hr.employees
    E422:
      description: Error de validación
      content:
        application/json:
          example:
            status: false
            message: Validation errors
            errors:
              start_date:
                - The start date field is required.
    E429:
      description: Límite de peticiones excedido
      content:
        application/json:
          example:
            status: false
            message: Rate limit exceeded. Please try again later.
            rate_limit: 100
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key de la integración (Integraciones → Nueva Integración).

````

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