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

# Update the customer-facing name or company settings

> Changes the customer-facing company name, fiscal year start month, and/or VAT period length. An operator may change `display_name` alone; fiscal/VAT and other statutory settings require an interactive admin or existing broad-approver session. API keys receive 403. `display_name` is the optional trading name used as the primary seller name on outgoing invoices; the legal name and Business ID remain on every issued invoice. `vat_period_valid_from` must be a period-aligned `YYYY-MM-DD` date.



## OpenAPI

````yaml /openapi.yaml post /company/settings
openapi: 3.1.0
info:
  title: LAC Customer API
  version: '2026-07-15'
  description: >
    Last Accounting Company (LAC) is an AI-native accounting firm for Finnish
    SMBs:

    continuous reconciliation, daily close, real-time dashboards, and full Vero
    reporting.

    This API is the same surface the LAC customer portal UI uses. It gives you
    programmatic

    access to your books (read-only general-ledger views), financial statements,
    documents,

    invoicing, payroll, source-system connections, and the message channel to
    Björn, the

    accounting agent.


    ## Authentication


    Every request carries `Authorization: Bearer <token>`. Two token kinds are
    accepted:


    - **Portal API key** (`lac_sk_...`) — minted in portal Settings → API
    access. Keys have a
      scope of `read` or `write`. Read-scoped keys are refused on all mutating methods
      (POST/PATCH/DELETE). Write-scoped keys act as the `operator` role: they can never
      use payroll endpoints (reads included), change company settings, grant access,
      approve or return an invoice, or manage API keys. Payroll and company settings
      require an interactive admin or existing broad approver. Invoice decisions require the matching invoice
      review permission. Write-scoped keys can prepare draft partner
      seller profiles. An interactive company admin must review the evidence and activate
      a profile or change an active profile.
    - **Firebase ID token** — the interactive session token used by the portal
    UI itself.


    API keys are pinned to a single company, so the `customer_id` parameter
    (query string on

    GETs, body field on writes) can always be omitted when authenticating with
    an API key.

    Interactive tokens with access to multiple companies use `customer_id` to
    select one.


    ## Conventions


    - All field names are `snake_case` on the wire.

    - Monetary amounts are **integer cents** (fields suffixed `_cents`).

    - Rates and percentages are **basis points** (fields suffixed
    `_basis_points`;
      10000 = 100%, e.g. Finnish standard VAT 25.5% = 2550).
    - Quantities on invoice lines are decimal strings (e.g. `"1"`, `"2.5"`).

    - Dates are `YYYY-MM-DD`; periods are `YYYY-MM`; ranges accept `YYYY-MM`,
    `YYYY-Qn`,
      `YYYY`, `all`, `this_month`, or `last_6_months`.

    ## Limits


    - Document uploads: at most 20 files and 25 MB per request.

    - Sheet pagination: `limit` is capped at 200 rows per page (0 =
    unpaginated).


    ## Errors


    Errors return a JSON envelope `{"error": "...", "detail": "..."}` with a
    conventional

    HTTP status code (401 missing/invalid token, 403 insufficient scope or role,
    404 not

    found, 422 validation failure).


    More at
    [docs.lastaccountingcompany.com](https://docs.lastaccountingcompany.com).
  contact:
    name: Last Accounting Company
    url: https://docs.lastaccountingcompany.com
servers:
  - url: https://api.app.lastaccountingcompany.com/portal
    description: Production (note the /portal base path).
security:
  - apiKey: []
tags:
  - name: Company
    description: Company profile, identity, overview, and agent status.
  - name: Onboarding
    description: Saved customer onboarding facts, source inventory, and opening statements.
  - name: Books
    description: >-
      Read-only windows into the canonical general ledger: the spreadsheet-style
      Books/VAT sheet, financial statements, and analytics. There is no
      cell-edit or batch-edit API — the books are maintained by LAC. The one
      write here is a row declaration: your answer about a row (no receipt
      exists, private, a split, or a different booking), recorded as evidence
      for Björn.
  - name: Dimensions
    description: >-
      Project, cost-centre, department, and customer-defined reporting lenses
      over posted general-ledger lines. Provider catalogs are read-only; local
      axes and values are available for bank/file-only books.
  - name: Documents
    description: Receipt/invoice/contract uploads and per-file ingest metadata.
  - name: Messages
    description: The chat channel to Björn, the accounting agent.
  - name: Work log
    description: >-
      Append-only work-hours log (date, minutes, note). Hours are records for
      invoicing and payroll evidence; they do not post to the books. Kilometres
      are not logged here — vehicle travel is submitted as an expense claim in
      the portal, where statutory reimbursement rates apply.
  - name: Filings
    description: Filing authorization, review requests, and produced output packages.
  - name: Invoicing
    description: >-
      Sales invoicing — drafts, partner seller profiles, e-invoice sending, PDF
      finalizing, credit notes, reminders, recurring templates, and the
      invoice-customer register. LAC sends buyer invoices on the e-invoice
      network only. A partner-profile invoice also sends its legal seller a
      bookkeeping PDF copy.
  - name: Payroll
    description: >-
      Payroll workspace — employees, tax cards, employer settings, draft runs,
      and payslips. Every payroll operation (reads included) requires an
      interactive admin or existing broad-approver session and is NOT available
      to API keys.
  - name: Payments
    description: >-
      Contextual review and named-human release for source-bound purchase,
      payroll, and reimbursement payments. There is no manual payment composer
      and no bank file: a batch that cannot be delivered directly to the bank
      fails closed rather than becoming the customer's manual task.
  - name: Connections
    description: >-
      Source-system connections (bank, settlement providers, commerce,
      accounting systems, inbox/Gmail, Google Sheets) and service-connection
      requests/confirmations. PayPal consent can start through this API and
      returns a URL that a company admin must open. Other browser-interactive
      consent flows remain portal-only.
  - name: Imports
    description: Historical import runs (e.g. migrated books) and their artifacts.
  - name: API keys
    description: >-
      Manage portal API keys. These endpoints require an interactive admin
      session (Firebase token) and are NOT available to API-key bearers, which
      receive 403.
  - name: Lens
    description: >-
      Typed, display-ready read models over the books: the transactions window
      (full row universe, three-state status, keyset pagination), the per-row
      booking view, data coverage, and the connections catalog.
  - name: Accounting
    description: >-
      The accountant's read models: general ledger, journal entries, context
      cards, the filings strip with previews, and the SQL explorer. Every
      endpoint here requires LAC staff access or the company admin role; other
      bearers receive 403.
paths:
  /company/settings:
    post:
      tags:
        - Company
      summary: Update the customer-facing name or company settings
      description: >-
        Changes the customer-facing company name, fiscal year start month,
        and/or VAT period length. An operator may change `display_name` alone;
        fiscal/VAT and other statutory settings require an interactive admin or
        existing broad-approver session. API keys receive 403. `display_name` is
        the optional trading name used as the primary seller name on outgoing
        invoices; the legal name and Business ID remain on every issued invoice.
        `vat_period_valid_from` must be a period-aligned `YYYY-MM-DD` date.
      operationId: updateCompanySettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                  description: Target company. Optional for single-company sessions.
                display_name:
                  type: string
                  maxLength: 70
                  description: >-
                    Customer-facing calling/trading name. Empty clears it and
                    falls back to the legal name.
                fiscal_year_start_month:
                  type: integer
                  description: Month the fiscal year starts (1-12).
                vat_period_months:
                  type: integer
                  description: VAT reporting period length in months (e.g. 1, 3, 12).
                vat_period_valid_from:
                  type: string
                  description: Period-aligned effective date, `YYYY-MM-DD`.
                invoice_approval_policy:
                  type: string
                  enum:
                    - 'off'
                    - required
                  description: >-
                    Whether a draft sales invoice needs an approver before it is
                    issued. Admin only — a request that includes this field is
                    refused for anyone else, including an approver.
                purchase_invoice_approval_policy:
                  type: string
                  enum:
                    - 'off'
                    - approval
                    - verify_and_approve
                  description: >-
                    Review required for received purchase invoices. Admin only.
                    Approval needs an active approver. Verify and approve needs
                    an active verifier and a different active approver.
      responses:
        '200':
          description: Updated company profile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyProfile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - firebaseToken: []
components:
  schemas:
    CompanyProfile:
      type: object
      description: The company's registered details and accounting configuration.
      properties:
        customer_id:
          type: string
        legal_name:
          type: string
        display_name:
          type: string
          description: Customer-facing calling name; falls back to legal_name.
        business_id:
          type: string
          description: Finnish business ID (Y-tunnus).
        vat_number:
          type: string
        country_code:
          type: string
        currency:
          type: string
        fiscal_year_start_month:
          type: integer
          description: Month the fiscal year starts (1-12).
        vat_period_months:
          type: integer
          description: VAT reporting period length in months.
        vat_period_source:
          type: string
          enum:
            - dated
            - column
            - default
          description: Where the VAT period setting comes from.
        vat_period_next:
          type: object
          additionalProperties: false
          description: First recorded VAT period change that takes effect after today.
          required:
            - months
            - valid_from
          properties:
            months:
              type: integer
            valid_from:
              type: string
              format: date
        company_form:
          type: string
        statement_format:
          type: string
        invoice_approval_policy:
          type: string
          enum:
            - 'off'
            - required
          description: Whether a draft sales invoice needs an approver before it is issued.
        invoice_approval_editable:
          type: boolean
          description: >-
            Whether this caller may change the invoice approval policy. Admin
            only, and never an API key: an approver must not be able to switch
            off the gate they exist to hold.
        purchase_invoice_approval_policy:
          type: string
          enum:
            - 'off'
            - approval
            - verify_and_approve
          description: >-
            Direct handling, approval, or delivery verification followed by
            approval.
        purchase_invoice_approval_editable:
          type: boolean
          description: Whether this interactive admin may change purchase approval.
        editable:
          type: boolean
          description: Whether the caller may change settings (false for API keys).
        display_name_editable:
          type: boolean
          description: >-
            Whether this interactive caller may change the customer-facing name;
            false for API keys and connectors.
    Error:
      type: object
      description: Standard error envelope.
      properties:
        error:
          type: string
          description: Machine-readable error message.
        detail:
          type: string
          description: Human-readable detail.
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Insufficient scope or role — e.g. a read-scoped key on a mutating
        method, or an API key on an interactive-session-only endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: lac_sk_...
      description: >-
        Portal API key minted in portal Settings → API access. Scope `read` or
        `write`; pinned to one company. Send as `Authorization: Bearer
        lac_sk_...`.
    firebaseToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Firebase ID token from an interactive portal session. Required for
        interactive operations (payroll, company settings, API-key management)
        and invoice decisions allowed by the member's review permissions.

````