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

# List an invoice's documents

> Every document held for one invoice, each with its id and a fresh link.



## OpenAPI

````yaml openapi.json GET /api/v1/invoices/{id}/documents
openapi: 3.1.0
info:
  title: equate API
  version: 1.0.0
  description: >-
    The public equate Agent API. Send a supplier invoice (as text, a
    base64-encoded file, or a URL) to a published agent and receive structured,
    travel-aware extraction — optionally matched against your booking data.
    Authenticated with a workspace API key.
  contact:
    name: equate support
    email: support@equatetravel.ai
servers:
  - url: https://equatetravel.ai
    description: >-
      Production. Replace with your equate workspace domain if you use a custom
      one.
  - url: http://localhost:3000
    description: Local development
security:
  - apiKey: []
tags:
  - name: Agents
    description: >-
      Invoke a published agent to read a document, say what it is, match it to a
      booking and set off its actions.
  - name: Invoices
    description: >-
      Push invoice documents into the workspace's pipelines, and fetch the
      documents held for an invoice.
paths:
  /api/v1/invoices/{id}/documents:
    get:
      tags:
        - Invoices
      summary: List an invoice's documents
      description: >-
        Returns every document held for one invoice (the invoice itself, a
        paired guest copy, and any other files that arrived in the same email),
        each with its `id` and a fresh signed link. `id` in the path is the
        `data.jobId` every webhook delivery carries. The list can be longer than
        a delivery's `artifacts`: an action sends only the documents it was set
        to send. Documents whose files your retention period has removed are
        left out. Call it as often as you need. Each call returns new links and
        leaves earlier ones valid until they expire.
      operationId: getInvoiceDocuments
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The invoice's job id. It is `data.jobId` in a webhook delivery and
            in the response to pushing an invoice. For a delivery sent by an
            agent, it is the agent run's id.
          schema:
            type: string
            format: uuid
        - name: ttl
          in: query
          required: false
          description: >-
            How long the links should live, in seconds. From 60 (1 minute) to
            604800 (7 days).
          schema:
            type: integer
            minimum: 60
            maximum: 604800
            default: 3600
      responses:
        '200':
          description: >-
            The invoice's documents. `documents` is empty when none are held,
            for example after your retention period has removed them.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDocumentsResponse'
              example:
                data:
                  jobId: 0d2c8e6e-5f0b-4a3d-9a3b-4c1e8f0a2b7d
                  reference: OC-44821
                  expiresAt: '2026-12-03T11:30:00.000Z'
                  documents:
                    - id: 3f9a1c2e-8b7d-4e6f-9a0b-1c2d3e4f5a6b
                      role: agent
                      filename: OC-44821.pdf
                      contentType: application/pdf
                      url: https://app.equatetravel.ai/api/files/<signed token>
        '400':
          description: >-
            `ttl` is not a whole number of seconds from 60 to 604800
            (`VALIDATION_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing, malformed, unknown or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            The workspace's plan does not include API access
            (`FEATURE_NOT_AVAILABLE`), or the request came from an address
            outside the workspace's IP allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: No invoice with this id in the key's workspace (`NOT_FOUND`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limit exceeded (`RATE_LIMITED`). Retry after the number of
            seconds in the `Retry-After` header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    InvoiceDocumentsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              description: The id you asked with.
            reference:
              type:
                - string
                - 'null'
              description: >-
                The reference read from the invoice, as in a webhook delivery's
                `data.reference`.
            expiresAt:
              type: string
              format: date-time
              description: When the links in this response stop working.
            documents:
              type: array
              items:
                $ref: '#/components/schemas/InvoiceDocument'
          required:
            - jobId
            - reference
            - expiresAt
            - documents
      required:
        - data
    ApiError:
      type: object
      description: Every error response uses this envelope.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - VALIDATION_ERROR
                - SUBSCRIPTION_REQUIRED
                - FEATURE_NOT_AVAILABLE
                - NOT_FOUND
                - AGENT_DISABLED
                - NOT_PUBLISHED
                - PAYLOAD_TOO_LARGE
                - UNSUPPORTED_MEDIA_TYPE
                - FETCH_FAILED
                - INGEST_FAILED
                - RATE_LIMITED
                - RUN_FAILED
                - INTERNAL_ERROR
              description: A stable, machine-readable error code.
            message:
              type: string
              description: A human-readable explanation.
            details:
              type: object
              additionalProperties: true
              description: >-
                Present for `VALIDATION_ERROR`: a flattened list of field
                issues.
          required:
            - code
            - message
        runId:
          type:
            - string
            - 'null'
          description: 'Present on `RUN_FAILED`: the id of the recorded (failed) run.'
    InvoiceDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The document's id, the same value as `artifacts[].id` in a webhook
            delivery. It stays the same for the life of the file.
        role:
          type: string
          enum:
            - agent
            - client
            - associated
          description: >-
            `agent` is the invoice itself, `client` a paired guest copy,
            `associated` another file from the same email. The same values as
            `artifacts[].role` in a webhook delivery.
        filename:
          type: string
        contentType:
          type: string
          description: The file's media type, for example `application/pdf`.
        url:
          type: string
          format: uri
          description: >-
            A signed link on equate's own domain. `GET` it to download the file.
            The link needs no API key. Valid until `expiresAt`.
      required:
        - id
        - role
        - filename
        - contentType
        - url
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A workspace API key, sent as `Authorization: Bearer ip_live_…`. Create
        and revoke keys in the equate dashboard under Settings → API keys
        (workspace admins only). The full key is shown once at creation — store
        it securely.

````

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