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

# Get Invoice

> Authenticate with either a Supabase session (member of the invoice's organization) or an API key with the `read:invoices` scope belonging to that same organization. This is a FLAT route — no `organizationId` in the URL, unlike create/list above; the organization is resolved from the invoice's globally-unique `uuid`. Returns the same shape as the Create Invoice response, including the full stamped XML inline.

Returns a single stamped CFDI invoice by its folio fiscal UUID, in the same shape as the [Create Invoice](/api-reference/invoices/create) response — including the full XML inline. Like [Cancel Invoice](/api-reference/invoices/cancel), this is a **flat** route — it does not carry `/organizations/{organizationId}/` in the URL. The invoice's `uuid` (its folio fiscal, globally unique across all organizations) is enough to resolve the owning organization server-side, combined with the caller's own auth context (session or API key).

## Authentication

Accepts **either**:

* A Supabase Bearer session (`Authorization: Bearer <token>`) — the authenticated user must be a member of the invoice's organization.
* An API key (`X-API-Key: sk_...`) with the `read:invoices` scope — the key's own organization must match the invoice's organization, or the request is rejected with `403 Forbidden`.

## Path Parameters

| Parameter | Type          | Required | Description                                                                                               |
| --------- | ------------- | -------- | --------------------------------------------------------------------------------------------------------- |
| `uuid`    | string (UUID) | Yes      | Folio fiscal UUID (`uuidFiscal`) of the invoice to fetch — globally unique, not scoped to an organization |

## Example Request

```bash cURL theme={null}
curl -X GET https://api.timbrix.mx/invoices/d3bfbc57-44af-4390-a064-f0afab85e5df \
  -H "Authorization: Bearer <your_token>"
```

```typescript TypeScript SDK theme={null}
const invoice = await timbrix.invoices.get(
  "d3bfbc57-44af-4390-a064-f0afab85e5df"
)
console.log(invoice.xml)
```

## Example Response

```json theme={null}
{
  "id": "0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab",
  "uuid": "d3bfbc57-44af-4390-a064-f0afab85e5df",
  "status": "valid",
  "type": "I",
  "series": "A",
  "folioNumber": "1",
  "total": 116,
  "date": "2026-07-30T15:50:00",
  "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><cfdi:Comprobante ...>",
  "createdAt": "2026-07-30T15:50:03.412Z"
}
```

| Field         | Type   | Description                                                      |
| ------------- | ------ | ---------------------------------------------------------------- |
| `id`          | string | Timbrix invoice record ID                                        |
| `uuid`        | string | Folio fiscal UUID asignado por el SAT vía PAC                    |
| `status`      | string | Always `"valid"` — this endpoint only ever returns stamped CFDIs |
| `type`        | string | `I` = Ingreso, `E` = Egreso, `T` = Traslado                      |
| `series`      | string | Invoice series                                                   |
| `folioNumber` | string | Invoice folio number                                             |
| `total`       | number | Invoice total                                                    |
| `date`        | string | Issuance date-time (ISO 8601, no timezone)                       |
| `xml`         | string | The full stamped CFDI XML, inline (UTF-8)                        |
| `createdAt`   | string | ISO 8601 timestamp of when the CFDI was stamped                  |

<Note>
  This response includes `status`, `type`, and the full `xml` — fields not
  present in the [List Invoices](/api-reference/invoices/list) summary shape. If
  you only need the XML file itself (not wrapped in JSON), use [Download Invoice
  XML](/api-reference/invoices/download-xml) instead.
</Note>

## Common Errors

### 401 Unauthorized

Missing or invalid Bearer token / API key.

### 403 Forbidden

The authenticated user is not a member of the invoice's organization, or the API key does not have the `read:invoices` scope / belongs to a different organization than the one that owns the invoice.

### 404 Not Found

`uuid` does not match any invoice.


## OpenAPI

````yaml GET /invoices/{uuid}
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: https://api.timbrix.mx
    description: Production
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
  - name: invoices
    description: CFDI 4.0 invoice creation, listing, and cancellation
paths:
  /invoices/{uuid}:
    get:
      tags:
        - invoices
      summary: Get a single invoice by folio fiscal UUID
      description: >-
        Authenticate with either a Supabase session (member of the invoice's
        organization) or an API key with the `read:invoices` scope belonging to
        that same organization. This is a FLAT route — no `organizationId` in
        the URL, unlike create/list above; the organization is resolved from the
        invoice's globally-unique `uuid`. Returns the same shape as the Create
        Invoice response, including the full stamped XML inline.
      operationId: InvoicesController_get
      parameters:
        - name: uuid
          required: true
          in: path
          description: Folio fiscal UUID of the invoice
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceResponseDto'
        '403':
          description: Caller does not belong to the invoice's organization
        '404':
          description: uuid does not match any invoice
      security:
        - apiKey: []
        - bearer: []
components:
  schemas:
    InvoiceResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Timbrix invoice record ID
          example: 0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab
        uuid:
          type: string
          description: Folio fiscal UUID asignado por el SAT vía PAC
          example: d3bfbc57-44af-4390-a064-f0afab85e5df
        status:
          type: string
          enum:
            - valid
          example: valid
        type:
          type: string
          enum:
            - I
            - E
            - T
          example: I
          description: I = Ingreso, E = Egreso, T = Traslado
        series:
          type: string
          example: A
        folioNumber:
          type: string
          example: '1'
        total:
          type: number
          example: 116
        date:
          type: string
          example: '2026-07-30T22:50:00'
        xml:
          type: string
          description: XML del CFDI timbrado (UTF-8)
        createdAt:
          type: string
          example: '2026-07-30T22:50:03.412Z'
      required:
        - id
        - uuid
        - status
        - type
        - series
        - folioNumber
        - total
        - date
        - xml
        - createdAt
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API Key for authentication (format: sk_...)'
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````