---
title: "Returns the JSON document bundle that drives the PDF/CSV renderers — line items, per-currency subtotals, fee account, issuer block, FX snapshots. Powers the Console preview."
method: GET
path: "/api/v1/admin/invoices/{invoiceId}/document"
tags: ["Invoice", "Admin"]
---

# Returns the JSON document bundle that drives the PDF/CSV renderers — line items, per-currency subtotals, fee account, issuer block, FX snapshots. Powers the Console preview.

`GET /api/v1/admin/invoices/{invoiceId}/document`

Returns the JSON document bundle that drives the PDF/CSV renderers — line items, per-currency subtotals, fee account, issuer block, FX snapshots. Powers the Console preview.

## Path parameters

- `invoiceId` string, uuid, required

## Response `200`

Success

- InvoiceDocumentBundleResponse
  - `success` boolean, required — Indicates if the request was successful
  - `data` object, required — JSON form of the rendered invoice document — line items, totals, parties.
    - `invoice` object, required — Invoice visible to a merchant customer
      - `id` string, uuid, required
      - `invoice_number` string, required
      - `payment_reference` string, required
      - `merchant_id` string, uuid, required
      - `status` union, required — Lifecycle status of the invoice
        - 'draft'
        - 'issued'
        - 'paid'
        - 'void'
      - `currency` string, required — Currency of the invoice
      - `period_start` string, date, required
      - `period_end` string, date, required
      - `total_amount` string, required — Gross billable fees in invoice currency
      - `amount_paid` string, required — Sum of recorded invoice payments
      - `outstanding_amount` string, required — Server-computed total_amount − amount_paid.
      - `transaction_count` number, required
      - `due_date` string, date, nullable, required
      - `issued_at` string, date-time, nullable, required
      - `paid_at` string, date-time, nullable, required
      - `created_at` string, date-time, required
      - `payments` object[], required
        - `id` string, uuid, required
        - `amount` string, required — Payment amount in the invoice currency
        - `currency` string, required — Currency of the payment
        - `payment_method` union, required — How a payment against an invoice was recorded
          - 'manual_bank_transfer'
          - 'immediately_settled'
          - 'issue_credit'
        - `external_reference` string, nullable, required — Bank statement reference or similar correlation key; null for system-inserted
        - `paid_at` string, date-time, required
        - `recorded_by_user_id` string, uuid, nullable, required
        - `recorded_at` string, date-time, required
        - `notes` string, nullable, required
      - `fx_rates` object[], required — FX rate snapshot captured at issue time, one row per source currency
        - `source_currency` string, required — The fee currency the rate converts FROM
        - `rate` string, required — Multiplier applied to convert from source_currency to the invoice currency
        - `captured_at` string, date-time, required — Provider's data-freshness timestamp (rate age)
        - `fetched_at` string, date-time, nullable, required — When our service called the FX provider to lock this rate. Null for rows created before this column existed.
        - `provider` string, required
    - `line_items` object[], required
      - `transaction_id` string, uuid, required
      - `transaction_number` string, required
      - `transaction_created_at` string, date-time, required
      - `deposit_amount_minor` number, required
      - `deposit_currency` string, required — Currency of the deposit
      - `payout_currency` string, required — Currency Quidkey paid the merchant in
      - `exchange_rate` number, required — Stored exchange rate at transaction time (1.0 for same-currency)
      - `fee_amount_minor` number, required — Fee in its original currency (minor units)
      - `fee_currency` string, required — Currency of the fee
      - `fee_rate_type` string, required
      - `fee_rate_value` number, required
      - `fee_rate_unit` string, required
    - `currency_subtotals` object[], required
      - `source_currency` string, required — The fee currency being subtotalled
      - `subtotal_source_minor` number, required
      - `subtotal_invoice_minor` number, nullable, required — Null when the rate could not be resolved (DRAFT + FX provider unavailable)
      - `rate` string, nullable, required
      - `rate_source` union, required
        - 'same_currency'
        - 'stored'
        - 'snapshot'
        - 'estimate'
        - 'pending'
      - `rate_captured_at` string, date-time, nullable, required — Provider's data-freshness timestamp (rate age)
      - `rate_fetched_at` string, date-time, nullable, required — When our service called the FX provider to lock this rate
      - `rate_provider` string, nullable, required
    - `grand_total_minor` number, nullable, required — Null when any subtotal could not be converted
    - `grand_total_is_estimate` boolean, required — True when one or more subtotals used a render-time live rate (DRAFT)
    - `merchant` object, required
      - `id` string, uuid, required
      - `name` string, required
      - `address_lines` string[], required
    - `issuer` object, required
      - `name` string, required
      - `address_lines` string[], required
      - `country` string, required
      - `vat_number` string, nullable, required
      - `contact_email` string, required
      - `contact_url` string, required
    - `fee_account` object, nullable, required
      - `currency` string, required — Account currency
      - `provider` string, required
      - `account_holder_name` string, nullable
      - `iban` string, nullable
      - `swift` string, nullable
      - `account_number` string, nullable
      - `sort_code` string, nullable
      - `routing_number` string, nullable
      - `bsb` string, nullable
    - `fx_rates` object[], required
      - `source_currency` string, required — The fee currency the rate converts FROM
      - `rate` string, required — Multiplier applied to convert from source_currency to the invoice currency
      - `captured_at` string, date-time, required — Provider's data-freshness timestamp (rate age)
      - `fetched_at` string, date-time, nullable, required — When our service called the FX provider to lock this rate. Null for rows created before this column existed.
      - `provider` string, required

## Other responses

- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/banqzinc/apis/quidkey-api.md) · [All operations](https://skmtc.net/banqzinc/apis/quidkey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/banqzinc/quidkey-api/revisions/f86d2bdbcb08/schema)
