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

# List all invoice versions

> 
Returns an array of past invoice versions for the specified invoice.

Each version represents a historical snapshot of the invoice at a specific point in time, including the PDF generated at that time.

## Signed URLs

Each version includes a `generated_url` field with a signed URL that expires in 1 hour.




## OpenAPI

````yaml https://api.salesbricks.com/api/v2/openapi.yaml get /invoices/{invoice_id}/versions
openapi: 3.0.3
info:
  title: Salesbricks REST API
  version: 2.0.0
  description: API reference for external integrations
servers:
  - url: https://api.salesbricks.com/api/v2
    description: Production
  - url: https://api.staging.salesbricks.com/api/v2
    description: Staging
security:
  - ApiKeyAuth: []
tags:
  - name: Subscriptions
    description: >-
      Operations related to subscription management, including creation,
      updates, and retrieving subscription details. Subscriptions can be
      upgraded to add / remove add-ons by using the POST
      /subscriptions/{subscription_id}/upgrade endpoint and can be recasted for
      replacing the current agreement using the POST
      /subscriptions/{subscription_id}/recast endpoint
  - name: Customers
    description: >-
      Operations related to customer management, including creation, updates,
      and managing customer person objects.
  - name: Invoices
    description: Operations related to subscription's invoicing details.
  - name: Plans
    description: >-
      Operations related to listing and getting plan details including bricks in
      the plan.
  - name: Payment Methods
    description: Operations related to subscription's payment method.
paths:
  /invoices/{invoice_id}/versions:
    get:
      tags:
        - Invoice Versions
      summary: List all invoice versions
      description: >

        Returns an array of past invoice versions for the specified invoice.


        Each version represents a historical snapshot of the invoice at a
        specific point in time, including the PDF generated at that time.


        ## Signed URLs


        Each version includes a `generated_url` field with a signed URL that
        expires in 1 hour.
      operationId: listInvoiceVersions
      parameters:
        - in: path
          name: invoice_id
          schema:
            type: string
            pattern: ^([a-zA-Z\d\-]+)$
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceVersionsResponse'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                NotFoundResponse:
                  value:
                    error:
                      code: ERR_NOT_FOUND
                      message: >-
                        Not found — the resource you are looking for does not
                        exist.
                  summary: Not Found Response
          description: ''
components:
  schemas:
    InvoiceVersionsResponse:
      type: object
      description: |-
        Response serializer for listing invoice versions.

        Returns an array of past invoice versions.
      properties:
        versions:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceVersion'
          description: >-
            Array of past invoice versions, ordered by created_at descending
            (newest first)
      required:
        - versions
    ErrorResponse:
      type: object
      description: >-
        Standardizes API error responses with a consistent structure containing
        error code and message.
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    InvoiceVersion:
      type: object
      description: >-
        Serializer for an invoice version.


        Represents a historical snapshot of an invoice at a specific point in
        time.
      properties:
        invoice_version_id:
          type: string
          format: uuid
          description: Unique identifier for this version
        invoice_id:
          type: string
          format: uuid
          description: The parent invoice being versioned
        invoice_number:
          type: string
          description: 'Snapshot: Invoice number at time of version'
        amount:
          type: integer
          description: 'Snapshot: Total invoice amount at time of version'
        generated_pdf_url:
          type: string
          readOnly: true
          description: Signed URL to the PDF file for this version. Expires in 1 hour.
        created_at:
          type: string
          format: date-time
          description: When this version was created
        buyer_address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          description: >-
            Snapshot: buyer address at time of version. Null for versions
            predating address snapshotting.
      required:
        - amount
        - buyer_address
        - created_at
        - generated_pdf_url
        - invoice_id
        - invoice_number
        - invoice_version_id
    Error:
      type: object
      description: >-
        Represents individual error details with a standardized code and
        descriptive message.
      properties:
        code:
          enum:
            - ERR_NOT_FOUND
            - ERR_BAD_REQUEST
            - ERR_SERVER_ERROR
          type: string
          x-spec-enum-id: dc5a5d6feae1b697
          description: >-
            Error code indicating the type of error: NOT_FOUND for missing
            resources, BAD_REQUEST for invalid input, SERVER_ERROR for internal
            server issues


            * `ERR_NOT_FOUND` - ERR_NOT_FOUND

            * `ERR_BAD_REQUEST` - ERR_BAD_REQUEST

            * `ERR_SERVER_ERROR` - ERR_SERVER_ERROR
        message:
          type: string
        error_id:
          type: string
          format: uuid
          description: >-
            Correlation handle for SERVER_ERROR responses — quote this when
            contacting support; it joins to the structured server log line for
            the failure. Not present on 4xx responses.
      required:
        - code
        - message
    Address:
      type: object
      description: >-
        Read serializer for an address. Works for both an ``Address`` model

        instance and a JSON snapshot dict (e.g.
        ``InvoiceVersion.buyer_address``),

        so all fields are nullable to accommodate partial/legacy snapshots.
      properties:
        line_1:
          type: string
          nullable: true
          description: First line of the address
        line_2:
          type: string
          nullable: true
          description: Second line of the address
        city:
          type: string
          nullable: true
          description: City
        region:
          type: string
          nullable: true
          description: State, province, or region
        zip:
          type: string
          nullable: true
          description: Postal/ZIP code
        country:
          type: string
          nullable: true
          description: Country
      required:
        - city
        - country
        - line_1
        - line_2
        - region
        - zip
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-SALESBRICKS-KEY
      description: API key for authentication

````

## Related topics

- [BrIQ AI Assistant](/documentation/briq.md)
- [Reports & Charts](/documentation/reports-and-charts.md)
- [Checkout & Invoice Payment Options](/quickstart-guide/checkout-invoice-payment-options.md)
