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

# Spend summary

> The CFO view of spend over a period, aggregated from confirmed line-item classification: totals with the committed-vs-variable split, by category (AI/Intelligence broken out), by spend class, by supplier and by tag — every block per currency, never summed across currencies and never a blended grand total — plus a period-over-period delta vs the prior equal window. Counts bills from Approved onward, dated by when the spend was incurred (invoice date). Both query params are optional; the default range is the trailing 30 days (UTC).



## OpenAPI

````yaml /api-reference/openapi.json get /payables/spend-summary
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /payables/spend-summary:
    get:
      tags:
        - Payables
      summary: Spend summary
      description: >-
        The CFO view of spend over a period, aggregated from confirmed line-item
        classification: totals with the committed-vs-variable split, by category
        (AI/Intelligence broken out), by spend class, by supplier and by tag —
        every block per currency, never summed across currencies and never a
        blended grand total — plus a period-over-period delta vs the prior equal
        window. Counts bills from Approved onward, dated by when the spend was
        incurred (invoice date). Both query params are optional; the default
        range is the trailing 30 days (UTC).
      parameters:
        - name: from
          in: query
          schema:
            type: string
            format: date
        - name: to
          in: query
          schema:
            type: string
            format: date
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendSummaryResponse'
        '400':
          description: SpendSummary.InvalidDateRange — `from` is after `to`
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    SpendSummaryResponse:
      type: object
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        defaultCurrency:
          type:
            - 'null'
            - string
        mixedCurrency:
          type: boolean
        totals:
          type: array
          items:
            $ref: '#/components/schemas/SpendTotalsRow'
        byCategory:
          type: array
          items:
            $ref: '#/components/schemas/SpendCategoryRow'
        bySpendClass:
          type: array
          items:
            $ref: '#/components/schemas/SpendClassRow'
        bySupplier:
          type: array
          items:
            $ref: '#/components/schemas/SpendSupplierRow'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/SpendTagRow'
        delta:
          type: array
          items:
            $ref: '#/components/schemas/SpendDeltaRow'
        uncategorisedCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    SpendTotalsRow:
      required:
        - currency
      type: object
      properties:
        currency:
          type: string
        total:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        fixed:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        variable:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        fixedShare:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - 'null'
            - number
            - string
          description: >-
            Fixed / (Fixed + Variable) — committed share among classified lines;
            null when none are classified.
          format: double
        billCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
    SpendCategoryRow:
      required:
        - currency
      type: object
      properties:
        category:
          type:
            - 'null'
            - string
          description: >-
            The stored category key (e.g. ai_intelligence), or null for
            uncategorised line items. Resolve the display name via GET
            /payables/categories.
        currency:
          type: string
        total:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        fixed:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        variable:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        billCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        lineItemCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        billIds:
          type: array
          items:
            type: string
            format: uuid
    SpendClassRow:
      required:
        - spendClass
        - currency
      type: object
      properties:
        spendClass:
          $ref: '#/components/schemas/SpendClass'
        currency:
          type: string
        total:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        billCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        billIds:
          type: array
          items:
            type: string
            format: uuid
    SpendSupplierRow:
      required:
        - supplierName
        - currency
      type: object
      properties:
        supplierId:
          type:
            - 'null'
            - string
          format: uuid
        supplierName:
          type: string
        currency:
          type: string
        total:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        fixed:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        variable:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        billCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        billIds:
          type: array
          items:
            type: string
            format: uuid
    SpendTagRow:
      required:
        - tag
        - currency
      type: object
      properties:
        tag:
          type: string
        currency:
          type: string
        total:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        billCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        billIds:
          type: array
          items:
            type: string
            format: uuid
    SpendDeltaRow:
      required:
        - currency
        - direction
      type: object
      properties:
        currency:
          type: string
        previousFrom:
          type: string
          format: date
        previousTo:
          type: string
          format: date
        previousTotal:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        deltaAmount:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        deltaPercent:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - 'null'
            - number
            - string
          description: >-
            DeltaAmount / PreviousTotal; null when the prior window was zero (no
            baseline to compare).
          format: double
        direction:
          type: string
          description: up | down | flat.
    SpendClass:
      enum:
        - Fixed
        - Variable
        - null

````