Contact Persons Realtime-enabled
GETPOSTPATCHDELETETable: Contact
eOne/core/v1.0/contactPersons
Writable API for person contacts (not company contacts). The company a person belongs to can be set directly or resolved from the related customer/vendor.
Link to a company
Set companyNumber directly, or resolve the parent company from a customer/vendor with customerIntegrationId or vendorIntegrationId. See Resolver fields.
If that customer/vendor has no company contact yet, the API creates one for you, the company contact plus its business relation, then attaches the person to it. This requires the business relation code to be set in Marketing Setup ("Bus. Rel. Code for Customers/Vendors"); without it the create is rejected with a clear error.
PATCHing
number renames the contact rather than creating a new one.Bound actions
Invoke with POST /contactPersons(<id>)/Microsoft.NAV.<action>:
setAsPrimaryContact: marks this person as the primary contact on its company's customer and/or vendor. Optional body{ "linkToTable": "Customer" }(or"Vendor") narrows the target; omit it (or send blank) to apply to every business relation the company contact carries. The response redirects back to the contact.
"Primary contact" is a single-valued pointer on the parent record (
Customer/Vendor "Primary Contact No."), not a flag on the contact. So the action has the same effect as PATCHing primaryContactNo on the customers / vendors endpoint, in one hop from the contact. The person must already be linked to a company (companyNumber), and that company must have a customer or vendor business relation.