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

# Detalhar fatura

> Busca uma fatura pelo ID, com os itens, a nota fiscal e o detalhamento por linha do que foi faturado no período.



## OpenAPI

````yaml api-reference/v3/openapi.json GET /api/v3/invoices/{id}
openapi: 3.1.0
info:
  version: v3
  title: Salvy API
  x-logo:
    url: web/logo.png
servers:
  - url: https://api.salvy.com.br
    description: Salvy API URL
security:
  - bearerAuth: []
tags:
  - name: Public API
  - name: Outgoing Webhooks
paths:
  /api/v3/invoices/{id}:
    get:
      tags:
        - Public API
      description: >-
        Busca uma fatura pelo ID, com os itens, a nota fiscal e o detalhamento
        por linha do que foi faturado no período.
      operationId: publicGetInvoiceV3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  id:
                    description: Identificador da fatura na plataforma Salvy.
                    example: 123e4567-e89b-12d3-a456-426614174000
                    title: UUID
                    type: string
                    examples:
                      - 123e4567-e89b-12d3-a456-426614174000
                      - 123e4567-e89b-12d3-a456-426614174001
                  companyId:
                    description: >-
                      Identificador da empresa dona da fatura. Útil ao listar
                      faturas de várias empresas com uma chave de organização.
                    example: 123e4567-e89b-12d3-a456-426614174000
                    title: UUID
                    type: string
                    examples:
                      - 123e4567-e89b-12d3-a456-426614174000
                      - 123e4567-e89b-12d3-a456-426614174001
                  status:
                    type: string
                    enum:
                      - pending
                      - paid
                      - failed
                      - voided
                      - refunded
                      - charged-back
                    description: >-
                      Situação da fatura. Faturas em atraso permanecem `pending`
                      ou `failed`; use `isLate` para identificá-las.
                    example: pending
                  isLate:
                    type: boolean
                    description: >-
                      Verdadeiro quando a fatura está aberta (`pending` ou
                      `failed`) e a data de vencimento já passou.
                    example: false
                  amountCents:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Valor total da fatura, em centavos.
                    example: 129900
                  dueDate:
                    type: string
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    description: Data de vencimento da fatura.
                    example: '2026-08-10'
                  referenceMonth:
                    anyOf:
                      - title: PlainMonth
                        type: string
                        description: A month in ISO 8601 format.
                        examples:
                          - 2023-10
                      - type: 'null'
                    description: >-
                      Mês de referência do consumo faturado, no formato YYYY-MM.
                      Nulo em faturas antigas, anteriores ao registro do mês de
                      referência.
                    example: 2026-07
                  createdAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    description: Data de criação da fatura.
                    example: '2026-08-01T03:00:00.000Z'
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Identificador do item da fatura.
                          example: 123e4567-e89b-12d3-a456-426614174000
                          title: UUID
                          type: string
                          examples:
                            - 123e4567-e89b-12d3-a456-426614174000
                            - 123e4567-e89b-12d3-a456-426614174001
                        product:
                          type: string
                          enum:
                            - telecom
                            - asset-management
                            - saas-management
                          description: Produto ao qual o item se refere.
                          example: telecom
                        description:
                          type: string
                          description: Descrição do item como aparece na fatura.
                          example: Assinatura de linhas móveis - 07/2026
                        quantity:
                          type: number
                          description: Quantidade cobrada.
                          example: 12
                        unitAmountCents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Valor unitário do item, em centavos.
                          example: 4990
                      required:
                        - id
                        - product
                        - description
                        - quantity
                        - unitAmountCents
                      additionalProperties: false
                    description: Itens que compõem o valor da fatura.
                  nfe:
                    anyOf:
                      - type: object
                        properties:
                          number:
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              - type: 'null'
                            description: Número da nota fiscal.
                            example: 12345
                          amountCents:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            description: Valor da nota fiscal, em centavos.
                            example: 129900
                        required:
                          - number
                          - amountCents
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      Nota fiscal emitida para a fatura. Nulo enquanto a nota
                      não foi emitida, e em faturas cuja nota foi cancelada.
                required:
                  - id
                  - companyId
                  - status
                  - isLate
                  - amountCents
                  - dueDate
                  - referenceMonth
                  - createdAt
                  - items
                  - nfe
                additionalProperties: false
        '401':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                      - insufficient-scope
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - resource-not-found
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '413':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - payload-too-large
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - input-validation-error
                      - unprocessable-entity
                      - company-not-active
                  message:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        message:
                          type: string
                      required:
                        - key
                        - message
                      additionalProperties: false
                required:
                  - code
                  - message
                additionalProperties: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unknown
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
      deprecated: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: key

````