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

# List Expenses

> Retrieve a paginated list of expenses with comprehensive filtering options

## Overview

The List Expenses endpoint allows you to retrieve all expenses for your firm with advanced filtering, sorting, and pagination capabilities. You can filter by supplier, category, payment status, date ranges, and more.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination (minimum: 1)
</ParamField>

<ParamField query="per_page" type="integer" default="50">
  Number of items per page (minimum: 1, maximum: 100)
</ParamField>

<ParamField query="supplier_id" type="string">
  Filter by supplier using their CzUid
</ParamField>

<ParamField query="category_id" type="integer">
  Filter by expense category ID. If the category has subcategories, all subcategories will be included
</ParamField>

<ParamField query="status" type="string">
  Filter by payment status

  * `paid` - Expense has been paid
  * `unpaid` - Expense is not paid and not overdue
  * `overdue` - Expense is past its due date
  * `registered` - Expense is registered but not categorized as paid/unpaid
</ParamField>

<ParamField query="currency" type="string">
  Filter by currency code (e.g., RON, EUR, USD)
</ParamField>

<ParamField query="payment_type" type="integer">
  Filter by payment type ID (1-7):

  * `1` - Cash
  * `2` - Bank transfer
  * `3` - Card
  * `4` - Check
  * `5` - Promissory note
  * `6` - Other
  * `7` - Compensation
</ParamField>

<ParamField query="start_date" type="string" format="date">
  Start date for filtering expenses (YYYY-MM-DD format)
</ParamField>

<ParamField query="end_date" type="string" format="date">
  End date for filtering expenses (YYYY-MM-DD format)
</ParamField>

<ParamField query="min_amount" type="number">
  Minimum expense total (inclusive). Matched against the original-currency total.
</ParamField>

<ParamField query="max_amount" type="number">
  Maximum expense total (inclusive). Matched against the original-currency total.
</ParamField>

<ParamField query="sort" type="string" default="created_at">
  Sort field:

  * `created_at` - Sort by creation date
  * `date` - Sort by expense date
  * `due_date` - Sort by due date
  * `amount` - Sort by amount
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort order:

  * `asc` - Ascending
  * `desc` - Descending
</ParamField>

<ParamField query="expand" type="string">
  Comma-separated list of related data to include:

  * `supplier` - Include full supplier details
  * `category` - Include full category details
  * `user` - Include user information
</ParamField>

## Response

<ResponseField name="expenses" type="array">
  Array of expense objects

  <Expandable title="Expense Object Properties">
    <ResponseField name="id" type="string">
      Unique CzUid identifier for the expense
    </ResponseField>

    <ResponseField name="reference" type="string">
      Reference number or invoice number
    </ResponseField>

    <ResponseField name="description" type="string">
      Expense description
    </ResponseField>

    <ResponseField name="amount" type="object">
      Original expense amounts

      <Expandable title="Amount Object">
        <ResponseField name="total" type="string">Total amount</ResponseField>
        <ResponseField name="without_vat" type="string">Amount without VAT</ResponseField>
        <ResponseField name="vat" type="string">VAT amount</ResponseField>
        <ResponseField name="currency" type="string">Currency code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="account_amount" type="object">
      Accounting amounts (converted to firm's base currency)

      <Expandable title="Account Amount Object">
        <ResponseField name="total" type="string">Total amount in base currency</ResponseField>
        <ResponseField name="without_vat" type="string">Amount without VAT in base currency</ResponseField>
        <ResponseField name="vat" type="string">VAT amount in base currency</ResponseField>
        <ResponseField name="currency" type="string">Base currency code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="vat_percent" type="integer">VAT percentage</ResponseField>
    <ResponseField name="with_vat" type="boolean">Whether amount includes VAT</ResponseField>
    <ResponseField name="date" type="string">Expense date (YYYY-MM-DD)</ResponseField>
    <ResponseField name="due_date" type="string">Payment due date (YYYY-MM-DD)</ResponseField>
    <ResponseField name="paid_date" type="string">Payment date (if paid)</ResponseField>
    <ResponseField name="is_paid" type="boolean">Whether expense is paid</ResponseField>
    <ResponseField name="payment_type" type="object">Payment type information</ResponseField>
    <ResponseField name="status" type="string">Expense status (paid, unpaid, overdue, registered)</ResponseField>
    <ResponseField name="supplier_id" type="string">Supplier CzUid (when not expanded)</ResponseField>
    <ResponseField name="category_id" type="integer">Category ID (when not expanded)</ResponseField>
    <ResponseField name="user_id" type="integer">User ID (when not expanded)</ResponseField>
    <ResponseField name="created_at" type="string">Creation timestamp</ResponseField>
    <ResponseField name="updated_at" type="string">Last update timestamp</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information

  <Expandable title="Pagination Object">
    <ResponseField name="page" type="integer">Current page number</ResponseField>
    <ResponseField name="per_page" type="integer">Items per page</ResponseField>
    <ResponseField name="total" type="integer">Total number of expenses</ResponseField>
    <ResponseField name="total_pages" type="integer">Total number of pages</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="totals" type="object">
  Summary totals for filtered expenses

  <Expandable title="Totals Object">
    <ResponseField name="amount" type="string">Total original amount</ResponseField>
    <ResponseField name="amount_without_vat" type="string">Total amount without VAT</ResponseField>
    <ResponseField name="vat" type="string">Total VAT amount</ResponseField>
    <ResponseField name="account_amount" type="string">Total amount in base currency</ResponseField>
    <ResponseField name="account_amount_without_vat" type="string">Total amount without VAT in base currency</ResponseField>
    <ResponseField name="account_vat" type="string">Total VAT in base currency</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log(data.expenses);
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => 'https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer YOUR_API_KEY',
          'Content-Type: application/json'
      ]
  ]);

  $response = curl_exec($curl);
  $data = json_decode($response, true);
  curl_close($curl);

  print_r($data['expenses']);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "expenses": [
      {
        "id": "exp_abc123",
        "reference": "INV-2024-001",
        "description": "Office supplies",
        "amount": {
          "total": "238.00",
          "without_vat": "200.00",
          "vat": "38.00",
          "currency": "RON"
        },
        "account_amount": {
          "total": "238.00",
          "without_vat": "200.00",
          "vat": "38.00",
          "currency": "RON"
        },
        "vat_percent": 19,
        "with_vat": true,
        "date": "2024-01-15",
        "due_date": "2024-02-15",
        "paid_date": null,
        "is_paid": false,
        "payment_type": null,
        "status": "unpaid",
        "supplier": {
          "id": "sup_xyz789",
          "name": "Office Depot SRL",
          "cui": "RO12345678",
          "address": "Str. Exemplu 123",
          "city": "Bucharest"
        },
        "category": {
          "id": 1,
          "name": "Office Expenses",
          "parent_id": null
        },
        "user_id": 1,
        "created_at": "2024-01-15 10:30:00",
        "updated_at": "2024-01-15 10:30:00"
      }
    ],
    "pagination": {
      "page": 1,
      "per_page": 20,
      "total": 150,
      "total_pages": 8
    },
    "totals": {
      "amount": "15750.00",
      "amount_without_vat": "13235.29",
      "vat": "2514.71",
      "account_amount": "15750.00",
      "account_amount_without_vat": "13235.29",
      "account_vat": "2514.71"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /expenses
openapi: 3.1.0
info:
  title: Contazen API
  version: 1.2.0
  description: >
    Build powerful integrations with the Contazen invoicing platform. The
    Contazen API is organized around REST, 

    has predictable resource-oriented URLs, accepts JSON request bodies, returns
    JSON-encoded responses, 

    and uses standard HTTP response codes, authentication, and verbs.


    ## Authentication

    The API uses Bearer token authentication. Include your API key in the
    Authorization header.


    ### Getting your API Key

    1. Log in to your Contazen account

    2. Navigate to Settings > API

    3. Generate or copy your API key (starts with `sk_live_` for production or
    `sk_test_` for testing)


    ### Using the API Key

    Include your API key in the Authorization header:

    ```

    Authorization: Bearer sk_live_YOUR_API_KEY

    ```


    ### Example Request with cURL

    ```bash

    curl --request GET \
      --url https://api.contazen.ro/v1/clients \
      --header 'Authorization: Bearer sk_live_YOUR_API_KEY' \
      --header 'Accept: application/json'
    ```


    ## Rate Limiting

    - 1000 requests per hour per API key

    - 100 create operations per minute per API key


    Rate limit information is included in response headers:

    - `X-RateLimit-Limit`: Maximum requests allowed

    - `X-RateLimit-Remaining`: Requests remaining

    - `X-RateLimit-Reset`: Reset time (Unix timestamp)


    ## Pagination

    All list endpoints return paginated results with the following format:

    ```json

    {
      "success": true,
      "data": {
        "object": "list",
        "data": [...],
        "has_more": true,
        "total": 245,
        "page": 1,
        "per_page": 50,
        "total_pages": 5
      },
      "meta": {
        "version": "v1",
        "request_id": "req_1a2b3c4d",
        "response_time": "23.45ms"
      }
    }

    ```


    ## Multi-Work-Point Access

    API keys belong to a specific work point but can access data from all work
    points

    within the same parent company.


    ## Error Handling

    The API uses conventional HTTP response codes to indicate success or
    failure. 

    In general: 2xx codes indicate success, 4xx codes indicate an error due to
    the 

    information provided, and 5xx codes indicate an error with Contazen's
    servers.


    ## Expanding Nested Objects

    Many endpoints support the `expand` parameter to include related objects in
    the response.

    This follows the Stripe API pattern. For example:

    - `expand[]=lines` - Include invoice line items

    - `expand[]=payments` - Include payment records

    - `expand[]=client` - Include full client object


    ## Localization

    The API supports multiple languages through:

    - `locale` query parameter (en, ro)

    - `Accept-Language` header

    - Default: English
  contact:
    name: Contazen Support
    email: support@contazen.ro
    url: https://contazen.ro
  license:
    name: Proprietary
    url: https://www.contazen.ro/termeni-si-conditii-de-utilizare/
servers:
  - url: https://api.contazen.ro/v1
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: API authentication and test endpoints
  - name: Clients
    description: Manage your customers (B2B and B2C)
  - name: Invoices
    description: Create and manage invoices, proformas, and receipts
  - name: Products
    description: Manage your product and service catalog
  - name: Expenses
    description: Track and manage business expenses
  - name: Expense Categories
    description: Organize expenses with categories
  - name: Suppliers
    description: Manage expense suppliers and vendors
  - name: Settings
    description: API settings and configuration
  - name: Payments
    description: Payments received against invoices
  - name: Receipts
    description: Cash receipts (chitanțe) — standalone or paired with an invoice
  - name: Company Lookup
    description: Romanian company lookup (ANAF / VIES)
  - name: Invoice Series
    description: Manage invoice numbering series
  - name: Bank Accounts
    description: Manage IBAN bank accounts
  - name: E-Factura
    description: Romanian e-invoicing status and configuration
  - name: Supplier Bills
    description: Supplier invoices imported from the ANAF SPV inbox
  - name: VAT Rates
    description: Firm-scoped custom VAT rates on top of the Romanian catalog
  - name: Currencies
    description: Currencies enabled for the firm's bill templates
  - name: Languages
    description: Languages enabled for the firm's bill templates
  - name: Conta
    description: |
      Public ANAF data for the firm's CUI: fiscal profile (TVA scope, RTVAI,
      split TVA, status, e-Factura registration, CAEN) and annual balance
      sheets (cifra de afaceri, profit, capitaluri, datorii, salariați).

      Powered by the public ANAF webservices (no OAuth required for these
      endpoints). The data is cached locally and refreshed on demand via
      the `/sync` actions.
paths:
  /expenses:
    get:
      tags:
        - Expenses
      summary: List all expenses
      description: Retrieves a paginated list of expenses with optional filters
      operationId: listExpenses
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: Items per page
        - name: supplier_id
          in: query
          schema:
            type: string
          description: Filter by supplier CzUid
        - name: category_id
          in: query
          schema:
            type: integer
          description: Filter by category ID
        - name: status
          in: query
          schema:
            type: string
            enum:
              - paid
              - unpaid
              - overdue
              - registered
          description: Filter by payment status
        - name: currency
          in: query
          schema:
            type: string
          description: Filter by currency code
        - name: payment_type
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 7
          description: |
            Filter by payment type:
            1 = Cash
            2 = Bank transfer
            3 = Card
            4 = Check
            5 = Promissory note
            6 = Other
            7 = Compensation
        - name: start_date
          in: query
          schema:
            type: string
            format: date
          description: Start date (YYYY-MM-DD)
        - name: end_date
          in: query
          schema:
            type: string
            format: date
          description: End date (YYYY-MM-DD)
        - name: min_amount
          in: query
          schema:
            type: number
          description: Minimum amount filter
        - name: max_amount
          in: query
          schema:
            type: number
          description: Maximum amount filter
        - name: search
          in: query
          schema:
            type: string
          description: Search in reference and description
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - created_at
              - date
              - due_date
              - amount
            default: date
          description: Sort field
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort order
        - name: expand
          in: query
          schema:
            type: string
          description: >-
            Comma-separated list of relations to expand. Supported: `supplier`,
            `category`, `user`.
      responses:
        '200':
          description: List of expenses
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/ExpenseList'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  schemas:
    ExpenseList:
      type: object
      allOf:
        - $ref: '#/components/schemas/PaginationMeta'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Expense'
            totals:
              type: object
              description: Aggregated totals for all expenses matching the filters
              properties:
                subtotal:
                  type: number
                  format: float
                  description: Total amount without VAT
                vat:
                  type: number
                  format: float
                  description: Total VAT amount
                total:
                  type: number
                  format: float
                  description: Total amount including VAT
                paid:
                  type: number
                  format: float
                  description: Total amount of paid expenses
                unpaid:
                  type: number
                  format: float
                  description: Total amount of unpaid expenses
            count:
              type: integer
    ResponseMeta:
      type: object
      properties:
        version:
          type: string
          default: v1
        request_id:
          type: string
          format: uuid
          description: Unique request identifier for debugging
        response_time:
          type: string
          example: 23.45ms
    PaginationMeta:
      type: object
      properties:
        object:
          type: string
          default: list
        has_more:
          type: boolean
        total:
          type: integer
        page:
          type: integer
        per_page:
          type: integer
        total_pages:
          type: integer
    Expense:
      type: object
      required:
        - id
        - reference
        - amount
        - date
        - due_date
        - status
      properties:
        id:
          type: string
          description: Unique identifier (CzUid)
          example: exp_1a2b3c4d5e
        reference:
          type: string
          description: Invoice/document reference number
        description:
          type: string
        amount:
          type: object
          properties:
            total:
              type: number
              example: 500
            without_vat:
              type: number
            vat:
              type: number
            currency:
              type: string
        account_amount:
          type: object
          description: Amounts in account currency (RON)
          properties:
            total:
              type: number
            without_vat:
              type: number
            vat:
              type: number
            currency:
              type: string
              default: RON
        vat_percent:
          type: integer
          enum:
            - 0
            - 5
            - 9
            - 11
            - 19
            - 21
        with_vat:
          type: boolean
          description: Whether amount includes VAT
        date:
          type: string
          format: date
        due_date:
          type: string
          format: date
        paid_date:
          type: string
          format: date
          nullable: true
        is_paid:
          type: boolean
        payment_type:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
        status:
          type: string
          enum:
            - paid
            - unpaid
            - overdue
            - registered
        supplier_id:
          type: string
        supplier:
          $ref: '#/components/schemas/Supplier'
        category_id:
          type: integer
        category:
          $ref: '#/components/schemas/ExpenseCategory'
        user_id:
          type: integer
        user:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
        currency_exchange:
          type: object
          nullable: true
          properties:
            from:
              type: string
            to:
              type: string
            rate:
              type: number
        attachment:
          type: object
          nullable: true
          description: Single attachment (stored in the 'image' field)
          properties:
            url:
              type: string
            filename:
              type: string
            type:
              type: string
              enum:
                - pdf
                - image
            size:
              type: integer
        efactura:
          type: object
          nullable: true
          description: |
            Populated when the expense was imported from the ANAF e-Factura SPV
            inbox. `null` for manually created expenses.
          properties:
            supplier_invoice_id:
              type: string
            invoice_number:
              type: string
              nullable: true
            anaf_message_id:
              type: string
              nullable: true
            xml_available:
              type: boolean
            pdf_available:
              type: boolean
            pdf_url:
              type: string
              nullable: true
              description: >-
                Bearer-authenticated URL that streams the e-Factura PDF;
                regenerated on demand when missing
        items:
          type: array
          description: |
            Line rows for the expense. Always at least one entry — legacy flat
            expenses get a single synthesized line built from the header totals
            so API consumers can render a uniform table. Send `items` on
            create/update to persist real multi-line rows.
          items:
            $ref: '#/components/schemas/ExpenseLine'
        vat_breakdown:
          type: array
          nullable: true
          description: |
            Per-rate VAT tranches when the receipt mixes two or more rates.
            `null` for single-rate expenses.
          items:
            $ref: '#/components/schemas/ExpenseVatBreakdownEntry'
        category_source:
          type: string
          nullable: true
          enum:
            - ai
            - supplier
            - manual
          description: |
            How the category was assigned. `null` on uncategorized expenses
            or legacy rows where provenance wasn't recorded.
        category_confidence:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          description: Auto-classifier confidence when category_source is 'ai'.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
              description: Human-readable error message
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - invalid_request_error
                - rate_limit_error
                - permission_error
                - validation_error
            code:
              type: string
              description: Machine-readable error code
            param:
              type: string
              description: The parameter that caused the error
            doc_url:
              type: string
              format: uri
              description: URL to relevant documentation
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    Supplier:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Unique identifier (CzUid)
          example: sup_1a2b3c4d5e
        name:
          type: string
        cui:
          type: string
          description: Tax identification number
        rc:
          type: string
          description: Company registration number
        cnp:
          type: string
          description: Personal identification number
        address:
          type: string
        city:
          type: string
        county:
          type: string
        country:
          type: string
        postal_code:
          type: string
        phone:
          type: string
        email:
          type: string
        iban:
          type: string
        bank:
          type: string
        contact_person:
          type: string
        contact_phone:
          type: string
        contact_email:
          type: string
        is_vat_payer:
          type: boolean
        statistics:
          type: object
          properties:
            expense_count:
              type: integer
            total_amount:
              type: number
            paid_amount:
              type: number
            unpaid_amount:
              type: number
        recent_expenses:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              reference:
                type: string
              amount:
                type: number
              currency:
                type: string
              date:
                type: string
                format: date
              is_paid:
                type: boolean
        metadata:
          type: object
          description: |
            Lightweight expense aggregates. Returned by `GET /suppliers` only
            when `with_totals=1` is supplied. Cheaper than `expand=statistics`
            since the totals come from a single inline subquery rather than
            a per-row N+1 follow-up. Amounts are expressed in the firm's
            accounting currency.
          properties:
            expense_count:
              type: integer
              description: Number of non-deleted expenses for this supplier
            total_expenses:
              type: number
              description: Sum of `account_amount_total` across all matching expenses
            unpaid_total:
              type: number
              description: Sum of `account_amount_total` across unpaid matching expenses
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ExpenseCategory:
      type: object
      required:
        - id
        - name
        - type
      properties:
        id:
          type: integer
        name:
          type: string
        parent_id:
          type: integer
          nullable: true
        is_default:
          type: boolean
          description: Whether this is a system default category
        is_visible:
          type: boolean
        type:
          type: string
          enum:
            - system
            - custom
        expense_count:
          type: integer
          description: Number of expenses in this category
        children:
          type: array
          items:
            $ref: '#/components/schemas/ExpenseCategory'
    ExpenseLine:
      type: object
      required:
        - id
        - line_index
        - name
        - quantity
        - unit_price
        - vat_rate
        - amount_wvat
        - amount_vat
        - amount
      properties:
        id:
          type: integer
          description: Line row ID. `0` for synthesized legacy lines.
        line_index:
          type: integer
          description: Zero-based position within the expense.
        name:
          type: string
        description:
          type: string
          nullable: true
        quantity:
          type: number
          description: Supports fractional quantities (e.g. 0.5 kg).
        unit_code:
          type: string
          nullable: true
          description: Optional UN/ECE unit code (e.g. H87, KGM).
        unit_price:
          type: number
          description: >-
            Net unit price (excluding VAT). Negative values represent discount
            rows (e.g. bon fiscal `DISCOUNT 4,40-A`); the sign is preserved
            through net/VAT/gross.
        vat_rate:
          type: integer
          enum:
            - 0
            - 5
            - 9
            - 11
            - 19
            - 21
        amount_wvat:
          type: number
          description: Line net, 2dp, `round(quantity * unit_price, 2)`.
        amount_vat:
          type: number
          description: Line VAT, 2dp, `round(amount_wvat * vat_rate / 100, 2)`.
        amount:
          type: number
          description: Line gross, 2dp, `amount_wvat + amount_vat`.
        category_id:
          type: string
          nullable: true
          description: >-
            Optional per-line category override (falls back to expense-level
            category).
        product_id:
          type: string
          nullable: true
          description: Optional link to a product in the firm's catalog.
    ExpenseVatBreakdownEntry:
      type: object
      required:
        - rate
        - vat_amount
      properties:
        rate:
          type: integer
          enum:
            - 0
            - 5
            - 9
            - 11
            - 19
            - 21
        net:
          type: number
          nullable: true
          description: Sum of line nets at this rate (2dp).
        vat_amount:
          type: number
          description: Sum of line VATs at this rate (2dp).
        gross:
          type: number
          nullable: true
          description: Sum of line gross values at this rate (2dp).
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use your API key (sk_live_xxx or sk_test_xxx)

````