Skip to navigation

Update the workspace's document settings

View as Markdown

Partial, per-section update. Send only the sections and keys you want to change under a top-level document_settings object; every omitted section and key is left untouched. Setting a key to null clears it, so the document falls back to the inherited default. (Blank strings are also tolerated and normalized to null server-side, but null is the canonical clear value.)

The update is all-or-nothing across sections: if any submitted section fails validation, the whole request is rolled back and none of the sections are persisted (the response is a 422 listing the offending sections). On success the full, updated blob is returned in the same shape as getDocumentSettings.

Required scope: write:document_settings (or the broader manage:document_settings). A read:document_settings token can call getDocumentSettings but not this endpoint.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer

Lucanto API key. Two prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data

Issue keys at /settings/api_keys (personal) or /:workspace_id/settings/api_keys (workspace). Plaintext token is shown once and never again.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.

Request

This endpoint expects an object.
document_settingsobjectOptional

Response

OK. The full, updated document-settings blob.

sharedobject
Settings that apply to every document type.
invoiceobject

Invoice-specific defaults (extends the shared settings).

proformaobject

Proforma defaults: the invoice settings plus what happens when the customer pays.

quoteobject

Quote-specific defaults (extends the shared settings).

expenseobject

Expense defaults. Expenses carry only the shared settings — they have no payment-request or validity fields of their own.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error