Contact
A contact person: either a customer's contact (the CRM address book) or an employee's emergency contact, distinguished by contactable_type.
- Summary view
- ContactList, 18 fields. What a list returns by default.
- Detail view
- Contact, 18 fields. The default for a single read and for every write.
- Read with
- api:
read: andcustomers::customers read - Write with
- api:
write: andcustomers::customers create
Emergency contacts are personal data: they are visible and writable only to the employee they belong to, whatever the customers permission. Contacts are not soft-deleted, so deleting one is permanent.
Used by
Fields
- Detail only
- Only in the detail view.
- Only with include
- Only when you ask for it with include.
- Server-assigned
- Set by plnnrly, never by a request.
The kind of record contactable points at; it says which branch of contactable applies.
customeruser
New values may be added.
The record this contact belongs to: a customer for a CRM contact, a user for an employee's emergency contact. Rendered as {"id": N} until named in ?include=contactable, and still as {"id": N} where the caller may not read the parent's prefix. contactable_type and contactable_id are always present, so the parent can be found without the include, and the reference form shows nothing contactable_id does not.
Which form you get depends on contactable_type.
customerCustomerSummaryuserUserSummary
Assigned contact role, or null. Deleting a role unassigns it rather than refusing.
The contact's role. Rendered as {"id": N} until named in ?include=role, and null where no role is assigned.
Street address. plnnrly pre-fills this from the customer when adding a contact, but the API fills in no default for it.
Country as an ISO 3166-1 alpha-2 code, e.g. NL, as plnnrly writes it. Older records may hold any string.
Free-form note, sanitised HTML. The emergency-contact form uses it for the relationship to the employee, e.g. Partner.
Variants
ContactList 18 fields
What a collection returns, and what ?view=summary returns on a single record.
The same fields as the detail object.
ContactLinks 1 field
The links object on this resource.
Keys: self
Polymorphic fields
contactableWhich form you get depends on contactable_type.Something wrong or missing on this page? Tell us