API reference
Links
/links
A link says which parents hear about a student. In the High school pack the label reads “linked to” and the contact a primary-only rule writes to is called the “Primary contact”. Links upsert on the pair; there is no unlink through the API.
POSTLink a parent to a student
Requires contacts:write. Upserts on (contact_id, subject_id): posting the same pair again updates relationship and is_primary instead of making a second link.
Body parameters
contact_iduuid · required
subject_iduuid · required
relationshipstring · required
One of Mother, Father, Guardian, Parent, Brother, Sister, Aunty, Uncle, Grand Father, Grand Mother.
is_primaryboolean · default false
The primary contact. Exactly one per student; it is who a primary-only rule writes to.
Returns
201 with the link, the first time and every time after.
Response body
One link: the same fields in every pack. Press Response on the sample to see one whole.
FieldTypeDescription
tenant_iduuidThe instance.
contact_iduuid
subject_iduuid
relationshipstringA value from the High school pack's relationship_options; filled in by Raven when the pack has only one.Varies by pack
is_primarybooleanExactly one per student.
created_atdatetime
On failure the body is { error, code } instead.