API reference
Links
/links
A link says which customers hear about a subscription. In the Subscription business pack the label reads “subscribed to” and the contact a primary-only rule writes to is called the “Billing contact”. Links upsert on the pair; there is no unlink through the API.
POSTLink a customer to a subscription
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 Owner, Billing, Admin, Member.
is_primaryboolean · default false
The billing contact. Exactly one per subscription; 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 Subscription business pack's relationship_options; filled in by Raven when the pack has only one.Varies by pack
is_primarybooleanExactly one per subscription.
created_atdatetime
On failure the body is { error, code } instead.