Skip to main content

Own contacts and invitations

A resident keeps a list of people and organisations they work with, invites someone by e-mail, and answers requests from others. A contact sees a name and, later, messages. A contact never sees a case.

Switch it on​

The page is off by default. Set contactsEnabled to true on the portal record. Signed-in residents of that portal then get Mijn contacten in their menu.

A link is two rows of the portalContact schema, one per side, so each side reads only its own rows. Approval sets both rows to approved.

SituationWhat happens
The address has no accountThe resident gets a mailed link, valid for 14 days. Only a hash of its secret is stored.
The address has an accountNo link is mailed. That account sees a request under Wacht op goedkeuring and accepts or declines.
The invited person follows the link and signs inThe secret is handed back once. Both rows become approved, without a second approval.
The request is declinedThe requester reads only "Niet geaccepteerd".

The answer to an invitation never says whether the address has an account.

Limits​

  • 10 invitations per resident per day.
  • One open invitation per address, and none to an address that is already a contact.
  • A message of at most 500 characters.
  • A link that is expired, used or not the invited person's own gives the same answer as a link that never existed.

Routes​

All routes need a portal session and read only the bearer's own rows.

RouteWhat it does
GET /portal/api/contactsThe contacts, what waits and the counts per role.
POST /portal/api/contacts/inviteInvite by e-mail address, with an optional message.
POST /portal/api/contacts/{id}/respondAccept or decline a request.
POST /portal/api/contacts/{id}/resendSend an invitation again with a new link.
POST /portal/api/contacts/{id}/withdrawTake an invitation back.
DELETE /portal/api/contacts/{id}Remove an approved contact on both sides.
POST /portal/api/contacts/accept-invitationHand back the secret of an invitation link.

Not built yet​

  • Sending a message to a contact (task T07).
  • Filling in the e-mail address on the registration form from the link (the secret is kept and handed back after sign-in instead).
  • A contacts collection in Portaliq's own contribution (T02): the page uses its own routes, which keep the owner scope on the server.