BizKitHub
DocsAPI ReferenceInvoice/bff/document/lock-snapshot
postInvoiceAdmin BFF

/bff/document/lock-snapshot

Freezes the supplier, customer and bank account details into JSONB columns on the invoice. Once locked, downstream renderers (PDF, detail, exports) prefer the snapshot over live data, so the invoice stays unchanged even if the contact or bank account is later edited. Idempotent unless force: true is passed.

InvoicepostBffDocumentLock-snapshot

Parameters

JSON body

Request body

application/json
idstringRequired

External invoice ID.

ExampleaB3xKm9pQ2wLn4Yz
forcebooleanOptional

Re-snapshot even if the invoice is already locked. Use only when an admin explicitly accepts overwriting historical data — guard the UI with a confirm dialog.

Default: false

Response schema

1 status code documented

200Success
alreadySnapshottedbooleanRequired

True when the invoice was already locked and force was not set — no change occurred.

snapshottedAtstringRequired

ISO timestamp of the (existing or new) snapshot.

Response example

application/json
{
  "alreadySnapshotted": false,
  "snapshottedAt": "example_snapshottedAt"
}

Request example

POST /bff/document/lock-snapshot

post
curl -X POST "https://api.bizkithub.com/bff/document/lock-snapshot" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "id": "aB3xKm9pQ2wLn4Yz",
  "force": false
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key