Parties and Supplier Master Data
Every Kaunt product has to answer the same question about a document: which company is this counterparty? The Parties API is where that question is answered once, from the supplier master data you already keep, so Document AI, invoice coding, Contract Intelligence and payments all reach the same answer.
You upload the suppliers your systems hold, and Kaunt works out which of them are the same company. You keep working in your own supplier numbers. Kaunt also gives each record an id of its own, which you can use instead but never need to store.
The two ideas
A party is a company. It belongs to your tenant, and it is the same party whether you buy from it or sell to it.
A register is one of your systems' lists of suppliers — your ERP supplier master, a contract archive, a procurement tool. A register holds records: your supplier number, your spelling of the name, whatever else you keep.
The distinction matters because the same company is often several records. Supplier VEND-0042 in your ERP and SUP-991 in your procurement tool can be one party, and Kaunt recognises that, so a document naming either is understood as the same supplier.
tenant
└── company your legal entity
└── register "erp", "p2p", "contracts" — you name these
└── record your supplier number, matched by Kaunt to a party
Companies inside a tenant number their suppliers independently. Supplier 1001 in one company and supplier 1001 in another are two different suppliers, so every call names the company.
Authentication
As everywhere else in the Kaunt API — a bearer token from the OAuth2 client-credentials flow. See Authentication.
curl -X POST https://api.kaunt.com/v1/oauth2/token \
-H "Authorization: Basic $(echo -n 'CLIENT_ID:CLIENT_SECRET' | base64)" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials"
Uploading suppliers
Three ways to write, and the verb decides which. There is no mode field, so you cannot typo your way into the destructive one.
| Call | What it does |
|---|---|
PUT .../registers/{register}/suppliers | Replaces the register. Anything not in the body leaves it, as if deleted. |
POST .../registers/{register}/suppliers | Adds or updates one record. Touches nothing else. |
POST .../registers/{register}/suppliers/upsertmany | Adds or updates many. Touches nothing else. |
The register is created by its first write, so no setup call is required — though you can name one up front. There is no default register either: an unnamed one would mix two systems' numbering and collide supplier 1001 from each into one party.
One supplier
curl -X POST "https://api.kaunt.com/v1/tenants/$TENANT/companies/northwind-dk/parties/registers/erp/suppliers" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"externalId": "VEND-0042",
"name": "Nordisk Kontorforsyning A/S",
"countryCode": "DK",
"vatNumber": "DK12345678",
"homepage": "https://nordisk-kontor.dk/om-os",
"links": [ { "register": "p2p", "externalId": "SUP-991" } ],
"additionalFields": { "annualTurnover": 4200000 }
}'
201 Created
Location: …/parties/registers/erp/suppliers/6f1c2e0a-…
{ "id": "6f1c2e0a-…", "externalId": "VEND-0042", "outcome": "Created" }
201 when the register had not carried that supplier number before, 200 when it had. The outcome says which either way, and says more than a status code can: a record identical to the one already stored reads as Unchanged rather than Updated.
A record is known by two ids. externalId is yours; id is Kaunt's id for the record, and either one addresses it. id is written once, when the register first carries the number, and stays the same through every later upload and a delete followed by sending it again. It is the id Contract Intelligence returns in a contract's supplier.links, and the one a party correction sends back as registerRecordId. Store id or your supplier number to refer to a record.
Only externalId is required.
| Field | |
|---|---|
externalId | Your supplier number. Any length, compared exactly. |
name | Your spelling. Recorded as an alias, never as the party's legal name. |
countryCode | ISO 3166-1 alpha-2. Also decides how an unprefixed tax number is read. |
vatNumber | However your system spells it — with or without the country prefix or separators. |
registrationNumber | The company register number (UK Companies House number, Danish CVR, …), read in the record's countryCode. Matched on where the country's register issues one number per company; elsewhere it supports a match the name agrees with. Without a countryCode it is kept but not matched on. |
homepage | A URL or a bare host. Reduced to the host. |
address | line, city, postalCode. |
isDeleted | Your system deleted it. It leaves the register, the same as deleting it. |
links | The same supplier's numbers in your other registers. Seeds them in one call. |
additionalFields | Anything else, as free-form JSON. Stored exactly as sent, never interpreted. |
A whole register
PUT is the nightly-sync shape. Send the register as it stands; anything missing leaves the register, as if you had deleted it.
{ "records": [ { "externalId": "VEND-0042", "name": "…" }, … ] }
{ "accepted": 2, "created": 0, "updated": 1,
"unchanged": 1, "deactivated": 3, "conflicts": [] }
Up to 10,000 records per call. The wrapper object is deliberate: "replace everything with nothing" has to be written out as an empty list rather than arrive as an absent one.
upsertmany takes a plain array — the same shape as every other bulk endpoint in the Kaunt API — and answers per row, so a batch of changes tells you which ones failed:
[ { "externalId": "VEND-0100", "name": "Jysk Maskinteknik ApS" },
{ "externalId": "VEND-0101", "name": "Nordic Frakt AB" } ]
{ "succeeded": [ { "inputIndex": 0, "statusCode": 200, "id": "9b07d5c4-…", "externalId": "VEND-0100", "outcome": "Created" } ],
"failed": [ { "inputIndex": 1, "externalId": "VEND-0100",
"reason": "duplicate_external_id",
"error": "An earlier record in the same request already used this supplier number." } ] }
What Kaunt works out, and what you must not send
This is where most integrations go wrong, so it is worth being blunt.
You never name an identifier scheme. There is no identifiers array, no DkCvr, no SeOrgNr, no DeHrb. You send vatNumber and countryCode; Kaunt reads them.
// ✗ This is refused with 400. The field does not exist.
{ "externalId": "VEND-0044",
"identifiers": [ { "scheme": "SeOrgNr", "value": "556789-1234" } ] }
The reason is matching quality. A caller labelling a Swedish organisation number as a Danish one would link at full confidence against an unrelated Danish company sharing those digits — and nothing checks a label. By reading the number under its country's own rule, Kaunt reaches certainty only where the rule says it may.
Kaunt does the classifying. One DK12345678 gives Kaunt both the VAT number and the CVR number inside it. Denmark, Sweden, Norway and Finland build their VAT number from the company number, so Kaunt reads the company number out and that is what lets a record match with certainty. Germany and the UK issue the two independently, so a record from there carries its VAT number alone and matches on corroborating evidence instead. That is the correct answer for such a record, not a shortfall.
Nothing is rejected for looking wrong. A malformed VAT number is stored exactly as you sent it. What a value looks like decides only whether Kaunt is willing to match on it — the record itself is always kept, because the registry records what your system said, not what is true.
Put it in vatNumber with the countryCode. For Denmark, Sweden, Norway and Finland, Kaunt recognises a bare company number. For other countries, put it in additionalFields — it will be stored, but it cannot be matched on.
Reading
The reads return what your registers hold, as you sent it.
One register's records
GET .../parties/registers/{register}/suppliers
GET .../parties/registers/{register}/suppliers?externalId=VEND-0042
GET .../parties/registers/{register}/suppliers/{id}
One row per record the register carries:
{ "id": "6f1c2e0a-…", "externalId": "VEND-0042",
"name": "Nordisk Kontorforsyning A/S",
"lastSeenAt": "2026-10-25T11:20:21Z",
"additionalFields": { "annualTurnover": 4200000 } }
name is the name your register last sent for that number. A record you deleted, or that a PUT left out, is not listed, and reading it by id answers 404.
Your registers
GET .../parties/registers
One row per register in use, with what it is called and when it was last written to:
{ "register": "erp", "displayName": "Northwind ERP supplier master",
"description": "Nightly sync from Dynamics",
"lastWrittenAt": "2026-10-25T02:14:07Z", "createdAt": "2026-03-02T09:41:55Z" }
A retired register is not listed.
How documents are matched to your records
A document's party is matched against your register records directly, every time a document is read, by one rule: the same VAT number or company number where the names agree, or the same name once case, punctuation, legal form and any description after the name are set aside — and never when a VAT number, a company number in the same country or a legal form contradicts it. A near name is never matched; it is offered as a candidate for a person to choose. Only records your registers still carry are matched or offered: a record you deleted, or that a PUT left out, is not.
So what you send is what is matched against. A record you correct — a name, a VAT number, a company number — is used as corrected by the next document read. Send vatNumber, countryCode and, where you have it, registrationNumber: an identifier is the most reliable thing to match on.
When a document is matched to the wrong supplier, or to none, correct the party on that document and name the record it is (Contract Intelligence: registerRecordId in a party correction). Kaunt keeps that answer against your record, so the next document naming the supplier the same way is matched to it without asking again. No call in this API is needed.
Document AI
A Document AI result (GET .../documentai/documents/{documentId}) says which of your records the document's vendor is, in registerMatch beside documentAIResult. It has the same shape and meaning as a Contract Intelligence party's supplier.
{
"id": "227aebd0-…",
"processingState": "Processed",
"documentAIResult": { … },
"registerMatch": {
"vendor": {
"links": [
{ "id": "6f1c2a9e-…", "register": "erp", "externalId": "40012",
"name": "Acme ApS" }
]
}
}
}
Read it in one step:
registerMatch.vendor | Means |
|---|---|
links has entries | This is the supplier, one entry per register line that carries it. |
links empty, candidates present | Not matched. The candidates are for information only, most likely first. |
links empty, no candidates | Not in your registers. |
registerMatch absent | Not matched against a register: the company keeps no register, the document was uploaded without a company, or the match was unavailable. |
A link's id is Kaunt's id for the record, the same one the register reads return, and externalId is your supplier number. Only suppliers your registers still use are returned, in links and in candidates: a supplier whose records have all been deleted or left out of a PUT reads as not in your registers.
Each candidate is a supplier in your registers that the vendor could be, given by its links alone. Candidates are listed most likely first.
"vendor": {
"links": [],
"candidates": [
{ "links": [ { "id": "9b07d5c4-…", "register": "erp", "externalId": "40087",
"name": "Acme Holding ApS" } ] }
]
}
Only the vendor is matched today. registerMatch is output only: it is not part of the feedback request's correctedDocument.
Naming a register
A register is created by its first supplier write, under the name in the path. That name is an identifier rather than a label — erp, p2p, contracts — so there is a separate call for what it should be called:
curl -X PUT ".../parties/registers/erp" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "displayName": "Northwind ERP supplier master",
"description": "Nightly sync from Dynamics" }'
Both fields are optional, and the call touches no supplier records. It creates the register if nothing has written to it yet, which is the one way to have a register before it has suppliers.
Deleting a supplier
DELETE .../parties/registers/{register}/suppliers/{id}
DELETE .../parties/registers/{register}/suppliers/byexternalid/{externalId}
Takes one supplier record out of one register, by Kaunt's id for it or by your own supplier number. URL-encode the supplier number; PO-2026/0042 is sent as PO-2026%2F0042. An id is only looked for in the register you address, so one from another register answers 404.
204 when the register held it, including when it was already deleted, so a retry is safe. 404 when it never did.
Only the register changes. The supplier stops being listed in it, and nothing else is removed:
- The supplier's numbers in your other registers stay. Kaunt's other products still recognise the supplier.
- The number still means what it did. A document filed under it still resolves to the same supplier.
- Sending the number to that register again brings it back as it was. Another register naming it under
linksdoes not.
Retiring a register
DELETE .../parties/registers/{register}
Refused with 409 while the register still holds records, naming how many. To empty it, PUT an empty register first — that takes the records out and reports the count — or delete them, then retire it. A retired register is no longer listed; writing to it again brings it back.
Retiring a register does not make Kaunt forget the suppliers in it: your other registers and Kaunt's products may still refer to them.
Paging
Every list is paged: ?pageNo=1&pageSize=50. A larger pageSize is capped at 200 rather than refused. See Pagination.
A worked sequence
BASE="https://api.kaunt.com/v1/tenants/$TENANT/companies/northwind-dk/parties"
# 1. upload your ERP supplier master
curl -X PUT "$BASE/registers/erp/suppliers" -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -d @suppliers.json
# 2. read back what the register holds, to reconcile against your ERP
curl "$BASE/registers/erp/suppliers?pageSize=200" -H "Authorization: Bearer $TOKEN"
Step 1 is the whole integration: run it whenever your supplier master changes, or nightly. Step 2 is for reconciliation and is never required.