Skip to main content

Replace a company's contact cards

PUT 

/v1/organizations/:organizationCode/stakeholders/:companyUid/contacts

Makes the persons attached to the company match the list, in one transaction: a card without uid creates a person, a card with uid updates it (a changed name becomes its lastName and clears its firstName; the card's phone number and email replace the ones it showed and become primary, the person's other ones are kept), and an attached person absent from the list is deleted, like DELETE /stakeholders/{uid}, unless it is linked to a contract (409, nothing changed). Each card needs a name and a phone number or an email; at most one card is the primary contact (an omitted isPrimaryContact means false), and no two cards nor another person share an email. Clearing or replacing a card's phone number or email also removes every copy of it from the person's legacy contactsDetails, keeping the entries' other values. Any invalid card rejects the whole list, with every error in one response (errors on contacts[<index>].<field>). The list order is stored and returned by the next reads. Returns the saved list. Requires stonal.contact.write permission, and also stonal.contact.delete when the list leaves out an attached person (403 otherwise, nothing changed)

Request​

Responses​

The saved contact cards