> ## 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.

# Patch an organisation's AR settings

> Partially update an organisation's accounts-receivable defaults. Only supplied fields change; a settings row is created on first write. These values are copied onto new invoices, which may then override them individually — changing a default never alters an invoice that already exists.

**Authentication.** An API key (`x-dolfin-api-key`) **or** a JWT Bearer token; the organisation is determined without the `x-dolfin-organisation-id` header.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/organisations/{organisationId}/settings/ar
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Each operation documents its accepted credentials
    under **Authentication** — typically an `x-dolfin-api-key` header (with
    `x-dolfin-organisation-id`) or a JWT Bearer token.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security: []
tags:
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Clients
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Companies
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: Agent
paths:
  /v1/organisations/{organisationId}/settings/ar:
    patch:
      tags:
        - Organisations
      summary: Patch an organisation's AR settings
      description: >-
        Partially update an organisation's accounts-receivable defaults. Only
        supplied fields change; a settings row is created on first write. These
        values are copied onto new invoices, which may then override them
        individually — changing a default never alters an invoice that already
        exists.


        **Authentication.** An API key (`x-dolfin-api-key`) **or** a JWT Bearer
        token; the organisation is determined without the
        `x-dolfin-organisation-id` header.
      parameters:
        - name: organisationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchOrganisationArSettingsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganisationArSettingsResponse'
        '400':
          description: >-
            OrganisationArSettings.Invalid — an organisation AR settings value
            is out of its allowed range
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/HttpValidationProblemDetails'
        '403':
          description: >-
            Module.NotEntitled — the client's plan does not include the module
            this endpoint requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
components:
  schemas:
    PatchOrganisationArSettingsRequest:
      type: object
      properties:
        defaultPaymentTermsDays:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          description: >-
            Default number of days between an invoice's issue date and its due
            date, from 0 to 365. 0 means due on receipt. Copied onto each new
            invoice, which may then override it.
          format: int32
        latePaymentFee:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - 'null'
            - number
            - string
          description: >-
            Percentage fee applied to overdue invoices. Not currently applied
            automatically.
          format: double
        defaultInvoiceMessageTone:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceTone'
              description: >-
                Tone used to compose invoice and reminder emails, unless
                overridden for an individual send.
        defaultReminderOffsets:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/InvoiceReminderOffset'
          description: >-
            Reminder schedule applied automatically when an invoice is sent.
            Supply an empty list to disable automatic reminders. Duplicates are
            removed.
        bankDetails:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BankDetails'
              description: >-
                The organisation's own bank details, shown in the payment
                details section of the invoice PDF.
        defaultInvoiceCcEmails:
          type:
            - 'null'
            - array
          items:
            type: string
          description: >-
            Default CC recipients added to every invoice email and its
            reminders. Supply an empty list to clear. Each must be a valid
            email; duplicates and the customer's own address are removed.
        defaultReplyToEmail:
          type:
            - 'null'
            - string
          description: >-
            Reply-To address for invoice and reminder emails. Send an empty
            string to clear it and fall back to the organisation's contact
            email. Must be a valid email.
        invoiceNumberPrefix:
          type:
            - 'null'
            - string
          description: Prefix for generated invoice numbers (e.g. "INV"). 1-16 characters.
        invoiceNumberPadding:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          description: >-
            Minimum zero-padded digit width of the invoice number sequence,
            1-10.
          format: int32
    OrganisationArSettingsResponse:
      required:
        - defaultInvoiceMessageTone
        - defaultReminderOffsets
        - defaultInvoiceCcEmails
        - invoiceNumberPrefix
        - invoiceNumberNextValue
        - invoiceNumberPadding
      type: object
      properties:
        defaultPaymentTermsDays:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          description: >-
            Default number of days between an invoice's issue date and its due
            date. Copied onto each new invoice, which may then override it. 0
            means due on receipt. Null means the platform default of 30 days
            applies.
          format: int32
        latePaymentFee:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - 'null'
            - number
            - string
          description: >-
            Percentage fee applied to overdue invoices. Not currently applied
            automatically.
          format: double
        defaultInvoiceMessageTone:
          $ref: '#/components/schemas/InvoiceTone'
          description: >-
            Tone used to compose invoice and reminder emails, unless overridden
            for an individual send.
        defaultReminderOffsets:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceReminderOffset'
          description: >-
            Reminder schedule applied automatically when an invoice is sent,
            unless the send call supplies its own. An empty list disables
            automatic reminders.
        bankDetails:
          $ref: '#/components/schemas/BankDetails'
          description: >-
            The organisation's own bank details, shown in the payment details
            section of the invoice PDF.
        defaultInvoiceCcEmails:
          type: array
          items:
            type: string
          description: >-
            Default CC recipients added to every invoice email and its
            reminders, unless an invoice overrides them.
        defaultReplyToEmail:
          type:
            - 'null'
            - string
          description: >-
            Reply-To address for invoice and reminder emails. When null, the
            organisation's contact email is used.
        invoiceNumberPrefix:
          type: string
          description: Prefix for generated invoice numbers, e.g. "INV" produces INV-0001.
        invoiceNumberNextValue:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: >-
            The next invoice sequence number that will be allocated for this
            organisation.
          format: int64
        invoiceNumberPadding:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: >-
            Minimum digit width of the invoice number sequence, zero-padded
            (e.g. 4 → 0001).
          format: int32
      description: >-
        An organisation's accounts-receivable defaults. Each value is the
        starting point for new invoices; individual invoices may override them.
    HttpValidationProblemDetails:
      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
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    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
    InvoiceTone:
      enum:
        - Friendly
        - Direct
        - Formal
    InvoiceReminderOffset:
      enum:
        - OneWeekBefore
        - TwoDaysBefore
        - OnDueDate
        - TwoDaysAfter
        - OneWeekAfter
    BankDetails:
      type: object
      properties:
        accountHolderName:
          type:
            - 'null'
            - string
        accountNumber:
          type:
            - 'null'
            - string
        sortCode:
          type:
            - 'null'
            - string
        routingNumber:
          type:
            - 'null'
            - string
        iban:
          type:
            - 'null'
            - string
        bicSwift:
          type:
            - 'null'
            - string
        country:
          type:
            - 'null'
            - string
          description: ISO 3166-1 alpha-2 country code (e.g. GB, US, DE)
        currency:
          type:
            - 'null'
            - string
          description: ISO 4217 currency code (e.g. GBP, USD, EUR)
  securitySchemes:
    ApiKey:
      type: apiKey
      description: >-
        An API key issued to your client. It carries the client's scope;
        org-scoped calls also require the `x-dolfin-organisation-id` header.
        Keys are created and revoked by a client administrator.
      name: x-dolfin-api-key
      in: header
    Bearer:
      type: http
      description: >-
        A session JWT obtained via the OAuth flow (`POST /auth/codes` → `POST
        /auth/exchange`). Its claims carry the caller's organisation and/or
        client scope.
      scheme: bearer
      bearerFormat: JWT

````