Update a supplier
Update an existing supplier in the accounting package from an invoice: correct its name (e.g. a typo or a new legal name), or fill in an IBAN, KvK number or VAT number that is still empty. This is a permanent change. IBAN, KvK and VAT number can never be replaced: when the supplier already has another value the call fails with field_already_set and nothing changes. Never retry with other values; tell the user that a different bank account or registration on an invoice can be a sign of invoice fraud, and that they change such fields in the accounting package itself. Find the supplier with search-contacts first (by kvk or iban, then by name). Values equal to the current ones change nothing. The IBAN must have valid check digits (invalid_iban), the VAT number a valid format and checksum (invalid_vat_number), and a KvK number must be in the KvK register under a name that fits the (new) name (kvk_name_mismatch). The user must confirm a summary with old → new per field before anything changes. If the result has created=false and a confirmation object, nothing was changed yet: show confirmation.summary to the user verbatim and ask whether to make these changes. Only after the user explicitly says yes in the chat, call update-supplier again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.
A write: over REST only LedgerSuite products with askledger:purchase-write can call it, after their user approved the write in the product (no confirmation is asked). Other callers get 403 confirmation_required and use the MCP tool, which asks the user to confirm. Purchase entries: 409 duplicate when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an Idempotency-Key to make retries safe.
Requires the ledger:write scope (Wijzigen in Exact). Same operation as the MCP tool update-supplier.
bearerAuthorizationBearer <token>A company group API key (al_live_…, created at /dashboard/api), an OAuth access token from the same authorization flow MCP clients use, or (other LedgerSuite products, /administrations routes only) a LedgerSuite client_credentials token.
ledgerId*stringLedger (administration) id, from list-ledgers
1 <= lengthsupplierId*stringContact id (con_…) from search-contacts, or its remoteId
1 <= lengthIdempotency-Key?stringUnique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header Idempotent-Replayed: true) instead of a second write; the same key with another body answers 422 idempotency_key_reused, and a retry while the first request still runs 409 idempotency_in_progress. Kept for 7 days.
length <= 255application/json- body
name?stringNew name, e.g. the legal name on the invoice
1 <= length <= 50iban?stringIBAN to add; only when the supplier has no bank account yet
1 <= length <= 34kvk?stringKvK number to add, 8 digits; only when empty
^\d{8}$vatNumber?stringVAT number to add, with country prefix; only when empty
4 <= length <= 20source?Where the new values come from, kept in the audit trail
OK
application/json- response
created*booleanTrue when the changes were written to the package
message*stringconfirmation*|nullcontact*Customer and/or supplier
changes*array<>Changed fields (or, before confirmation, the fields that will change)
curl -X PATCH "https://example.com/ledgers/string/contacts/string" \ -H "Content-Type: application/json" \ -d '{}'{ "created": true, "message": "string", "confirmation": { "token": "string", "summary": "string", "expiresInSeconds": 0 }, "contact": { "id": "string", "remoteId": "string", "code": "string", "name": "string", "email": "string", "kvk": "string", "vatNumber": "string", "isCustomer": true, "isSupplier": true, "blocked": true, "ibans": [ "string" ], "remoteStatus": "string", "remoteUpdatedAt": "string", "updatedAt": "string", "deletedAt": "string" }, "changes": [ { "field": "name", "from": "string", "to": "string" } ]}