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

# Update an invoice (partial)

> Partially updates invoice fields such as status, reference, notes, and provider-specific properties. Idempotent via Idempotency-Key.



## OpenAPI

````yaml openapi.json patch /api/v1/invoices/{id}
openapi: 3.0.3
info:
  title: Polinate External API
  version: 1.0.0
  description: >-
    External API for partners and services. Authentication via X-Business-Id and
    X-API-Key headers.


    Credentials location: In the Polinate app, navigate to Business Settings →
    Integrations to find your Business ID and API Key.
servers:
  - url: https://integrations.polinate.ai
    description: Production
security: []
tags:
  - name: Items
    description: >-
      Manage items and item variants. Auth: X-Business-Id and X-API-Key (see
      Business Settings → Integrations).
  - name: Buyers
    description: >-
      Create buyers and related contacts/locations. Auth: X-Business-Id and
      X-API-Key (see Business Settings → Integrations).
  - name: Pricing
    description: >-
      Create price lists and entries. Auth: X-Business-Id and X-API-Key (see
      Business Settings → Integrations).
  - name: Invoices
    description: >-
      List and update invoices. Auth: X-Business-Id and X-API-Key (see Business
      Settings → Integrations).
  - name: Orders
    description: >-
      Order ingestion. Auth: X-Business-Id and X-API-Key (see Business Settings
      → Integrations).
paths:
  /api/v1/invoices/{id}:
    patch:
      tags:
        - Invoices
      summary: Update an invoice (partial)
      description: >-
        Partially updates invoice fields such as status, reference, notes, and
        provider-specific properties. Idempotent via Idempotency-Key.
      operationId: updateInvoice
      parameters:
        - schema:
            type: string
            example: inv_123
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Business identifier for external auth. Find in Polinate app →
              Business Settings → Integrations.
            example: '{{businessId}}'
          required: true
          name: X-Business-Id
          in: header
        - schema:
            type: string
            description: >-
              Per-business API key for external auth. Find in Polinate app →
              Business Settings → Integrations.
            example: '{{apiKey}}'
          required: true
          name: X-API-Key
          in: header
        - schema:
            type: string
            description: Idempotency key for POST operations
            example: '{{idempotencyKey}}'
          required: false
          name: Idempotency-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                reference:
                  type: string
                  nullable: true
                notes:
                  type: string
                  nullable: true
                properties:
                  type: object
                  properties: {}
              example:
                status: PAID
                reference: PO-123
                notes: Thanks!
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
              example:
                id: inv_123
                status: PAID
        '400':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
        '429':
          description: Rate limited
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait before retrying
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardError'
components:
  schemas:
    Invoice:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - DELETED
            - DRAFT
            - AUTHORISED
            - PARTIALLY_PAID
            - PAID
            - OVERPAID
            - OVERDUE
            - VOIDED
            - DEFAULTED
            - CREDITED
            - REFUNDED
        reference:
          type: string
        notes:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        properties:
          type: object
          properties: {}
        invoiceLineItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
      required:
        - id
    StandardError:
      type: object
      properties:
        errorCode:
          type: string
        message:
          type: string
        fieldErrors:
          type: object
          additionalProperties:
            type: string
      required:
        - errorCode
        - message
    InvoiceLineItem:
      type: object
      properties:
        id:
          type: string
        invoiceId:
          type: string
        itemVariantId:
          type: string
        description:
          type: string
        quantity:
          type: number
        unitAmount:
          type: number
        currency:
          type: string
      required:
        - id
        - invoiceId

````