Vendors API - contact persons
Besides the data of a vendor, the Vendors API can also be used to deliver and retrieve the contact persons of that vendor. This article describes the available fields, the processing rules and an example message.
1. Purpose of the contact persons in the Vendors API
Information about linked categories and companies could already be delivered in the Vendors API. Contact persons have been added to this as an extra, optional list (contactPersons). The list works in the same way as the elements for companies and categories.
Delivering contact persons is optional. The element may be omitted or empty, so that the existing P2P connection with the Vendors API is not affected.
2. Access and rights
Anyone who can view the data of a vendor in the application can also request it through the API. The Vendor Management viewer role is required for reading. The Vendor Management moderator role is required for delivering, updating and deleting.
3. Delivering contact persons
Contact persons are delivered within the message of a vendor, through a POST to the existing endpoint {base-URL}/api/vendors/vendors, for the operations insert, update and upsert. The following principles apply:
- Multiple contact persons can be delivered per vendor in a single message.
- The e-mail address (
email) and the display name (displayName) are required for every contact person that is delivered. All other fields are optional. - A contact person is skipped if it has no e-mail address or display name, has an invalid e-mail address, has an e-mail address that occurs more than once in the same message (only the first is processed), or has a text field that is longer than the maximum length (texts are not truncated). A warning is returned for this. An existing contact person that is skipped remains unchanged.
- For the fields contact type, title and language, values are used that exist in the application. An unknown value is not added automatically. A message is returned and the contact person is processed without that value.
- If an error occurs while processing a contact person, that contact person is skipped and a warning is returned. A required field that is missing at contact person level does not block the processing of the rest of the message.
- As soon as the response contains a message about a contact person,
hasErrorsis set to true, even if the vendor was processed. The text of the messages must therefore be checked.
Updating contact persons
When a vendor is updated, the delivered list of contact persons is leading:
- An existing contact person is recognised by e-mail address and updated.
- A new e-mail address leads to a new contact person.
- A contact person that is not in the list is deleted. No message is returned for this. A contact person that is linked to a user remains and a message is returned.
- An empty list (
[]) deletes all contact persons that are not linked to a user. - If
contactPersonsis omitted or has the valuenull, the contact persons remain unchanged. - An optional field that is omitted for an existing contact person is cleared. The complete data of every contact person must therefore always be delivered.
- For
contactTypes, the existing types are retained if the field is omitted ornull. With a list, the types become exactly equal to that list, and an empty list deletes all types.
4. Overview of the fields
The fields below are available for a contact person. The column "Name in message" shows the field name as it is used in the API.
The application also contains the fields Order (the sequence of the contact persons) and Dynamic Discount contact. These fields are not available through the API.
| Field | Name in message | Description | Required | Max. length | Example |
|---|---|---|---|---|---|
| Sex | sex |
Gender of the contact person. The field is free text. | No | 50 | F |
| First name | firstName |
First name of the contact person | No | 100 | Jane |
| Middle Initials | middleInitials |
Name prefix of the contact person | No | 50 | van |
| Last Name | lastName |
Last name of the contact person | No | 100 | Doe |
| Display name | displayName |
Display name of the contact person | Yes | 100 | Jane Doe |
| E-mail address | email |
E-mail address of the contact person. On an update, this is used to recognise the existing contact person. | Yes | 100 | jane.doe@example.com |
| Mobile | mobile |
Mobile phone number of the contact person | No | 20 | +31 6 12345678 |
| Phone Number | phone |
Phone number of the contact person | No | 50 | +31 20 123 4567 |
| Fax | fax |
Fax number of the contact person | No | 20 | +31 20 123 4568 |
| Date of birth | birthday |
Date of birth of the contact person, delivered as a date (for example 2020-05-17) or in ISO 8601 notation with time | No | n/a | 1985-04-12T00:00:00 |
| Address | address |
Address of the contact person | No | 100 | Keizersgracht 100A |
| Zip code | zipcode |
Postal code of the contact person | No | 10 | 1015 AA |
| City | town |
City of the contact person | No | 100 | Amsterdam |
| Country | country |
Country of the contact person. The field is free text. | No | 100 | Netherlands |
| Remark | remarks |
Remark about the contact person | No | Unlimited | Main contact for contracts |
| Function | function |
Function of the contact person | No | 100 | Account manager |
| Department | department |
Department of the contact person | No | 50 | Sales |
| Language | language |
Language of the contact person, delivered as a code. Available languages and codes: Nederlands (NL-NL), English (EN-GB), Deutsch (DE-DE), Svenska (SV-SE), French (FR-FR), Italian (IT-IT), Polish (PL-PL), Czech (CS-CZ) and Spanish (ES-ES). An unknown language is reported and the contact person is processed without a language. | No | n/a | NL-NL |
| Contact Type | contactTypes |
Type(s) of the contact person, delivered as the name of a contact type that exists in the application. The field is a list, so multiple types are possible. An unknown type is reported and the contact person is processed without that type. | No | n/a | ["Legal representative"] |
| Initials | initials |
Initials of the contact person | No | 50 | J. |
| Title | title |
Title of the contact person, delivered as the name of a title that exists in the application. An unknown title is reported and the contact person is processed without a title. | No | n/a | Mevr. |
5. Example message
The example message below shows a vendor with two contact persons. The first contact person contains all available fields. The second contains only the required fields e-mail address and display name.
{
"version": 1,
"operation": "upsert",
"data": [
{
"externalId": "TEST-001",
"name": "Testleverancier B.V.",
"archived": false,
"mainAddress": "Keizersgracht",
"mainAddressNum": "100",
"mainAddressNumAdd": "A",
"mainZipcode": "1015 AA",
"mainState": "Noord-Holland",
"mainTown": "Amsterdam",
"mainCountryCode": "NL",
"postalAddress": "Postbus",
"postalAddressNum": "1234",
"postalAddressNumAdd": "",
"postalZipcode": "1000 AB",
"postalState": "Noord-Holland",
"postalTown": "Amsterdam",
"postalCountryCode": "NL",
"vatCode": "NL123456789B01",
"kvkNumber": "12345678",
"kvkLocationCode": "000012345678",
"tel": "+31 20 123 4500",
"orderEmail": "orders@example.com",
"generalEmail": "info@example.com",
"websiteUrl": "https://www.example.com",
"supplyingCountry": "NL",
"businessArea": "IT services",
"vat": { "ref": "21", "description": "Hoog" },
"vatGroup": { "ref": "VG01", "description": "Vat group" },
"payTerm": { "ref": "30", "description": "30 days" },
"discount": { "ref": "D01", "description": "Discount" },
"currency": "EUR",
"gln": "8712345678906",
"companyList": {
"companyCodes": [
{ "code": "COMP01" }
]
},
"bankAccountList": {
"bankAccounts": [
{
"key": "BANK01",
"name": "ING",
"iban": "NL91ABNA0417164300",
"country": "NL",
"isDefault": true
}
]
},
"categories": [
{ "categoryId": 0, "code": "CAT01" }
],
"contactPersons": [
{
"email": "jane.doe@example.com",
"displayName": "Jane Doe",
"sex": "F",
"title": "Mevr.",
"firstName": "Jane",
"initials": "J.",
"middleInitials": "van",
"lastName": "Doe",
"function": "Account manager",
"department": "Sales",
"contactTypes": ["Legal representative"],
"phone": "+31 20 123 4567",
"mobile": "+31 6 12345678",
"fax": "+31 20 123 4568",
"language": "NL-NL",
"birthday": "1985-04-12T00:00:00",
"address": "Keizersgracht 100A",
"zipcode": "1015 AA",
"town": "Amsterdam",
"country": "Netherlands",
"remarks": "Main contact for contracts"
},
{
"email": "john.doe@example.com",
"displayName": "John Doe"
}
]
}
]
}6. Retrieving contact persons
Contact persons are included when vendors are retrieved. This is done with a POST to the same endpoint, with "operation": "read" and the references of the vendors in data.SupplierPortalExternalIds. For each contact person, the same fields are returned as when delivering. Fields without a value are returned as an empty text or as null, and contactTypes as an empty list. For a contact person that was delivered through the API without these fields, they are empty texts, except Title, Language, Birthday and Remarks, which are null. The response has the same structure as when delivering (hasErrors and messages), with the vendors in Data of the first message. The field names in the response start with a capital letter, for example ContactPersons and Email.
Example of a request:
{
"version": 1,
"operation": "read",
"data": {
"SupplierPortalExternalIds": ["TEST-001"]
}
}Example of a response. The other vendor fields are shortened and shown as "...":
{
"hasErrors": false,
"messages": [
{
"Data": [
{
"ExternalId": "TEST-001",
"Name": "Testleverancier B.V.",
...
"ContactPersons": [
{
"Email": "test.nieuw@example.com",
"DisplayName": "Test Nieuw",
"Sex": "M",
"Title": "Dhr.",
"FirstName": "Test",
"Initials": "T.",
"MiddleInitials": "",
"LastName": "Nieuw",
"Function": "Tester",
"Department": "",
"ContactTypes": [
"Administration"
],
"Phone": "",
"Mobile": "",
"Fax": "",
"Language": "NL-NL",
"Birthday": "1990-05-17T00:00:00",
"Address": "",
"Zipcode": "",
"Town": "",
"Country": "Nederland",
"Remarks": "Nieuwe testcontactpersoon"
}
]
}
],
"severity": null,
"result": "ok",
"message": null,
"messageCode": null
}
]
}7. Availability
The contact persons in the Vendors API became available in release NEXT 202645 (release date 3 November 2026). See the release notes for more information.