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

# Get invoice batch by id



## OpenAPI

````yaml /openapi.json get /api/v1/invoice_batches/{id}
openapi: 3.1.0
info:
  title: YoFacturo API v1
  version: 1.0.0
  summary: API for authentication and invoice batch ingestion and status
  description: |
    API v1 operational endpoints.

    Authentication flow:
    1. Exchange organization api_key for a session token.
    2. Use Authorization: Bearer <session_token> for protected endpoints.
servers:
  - url: https://app.yofacturo.es
security: []
tags:
  - name: Auth
  - name: Invoice Batches
  - name: Batch Invoices
paths:
  /api/v1/invoice_batches/{id}:
    get:
      tags:
        - Invoice Batches
      summary: Get invoice batch by id
      operationId: getInvoiceBatch
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: Invoice batch found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceBatchResponse'
        '401':
          description: Missing, invalid, or expired bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Batch not found in current organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    InvoiceBatchResponse:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/InvoiceBatch'
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
    InvoiceBatch:
      type: object
      additionalProperties: false
      required:
        - id
        - external_batch_id
        - status
        - invoices_count
        - received_at
      properties:
        id:
          type: integer
        external_batch_id:
          type: string
          nullable: true
        status:
          type: string
        invoices_count:
          type: integer
        received_at:
          type: string
          format: date-time
        processed_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token

````