Partnership Referrals
Partnership referrals track the leads partners send and receive. Log referral direction and status, link referrals to deals, and attribute revenue back to the partners that sourced it.
The Partnership Referral Object
Section titled “The Partnership Referral Object”| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier of the referral. |
account_id | uuid | ID of the account that owns this referral. |
partnership_id | uuid | ID of the partnership this referral belongs to. |
direction | string | Whether the referral was received from (inbound) or sent to (outbound) the partner. One of: inbound, outbound |
description | string | Free-text description of the referral. |
status | string | Lifecycle status of the referral. One of: new, qualified, converted, lost |
value | int? | Estimated value of the referral in integer cents. |
deal_id | uuid? | ID of the deal this referral is linked to, if any. |
referred_contact_id | uuid? | ID of the referred contact, if any. |
referred_company_id | uuid? | ID of the referred company, if any. |
converted_at | datetime? | Timestamp when the referral was marked converted (ISO 8601); null otherwise. |
created_at | datetime | Timestamp when the referral was logged (ISO 8601). |
deal_name | string | Name of the linked deal (read-only, joined). |
deal_value | int? | Value of the linked deal in integer cents (read-only, joined). |
deal_won | bool | Whether the linked deal is in a won state (read-only, joined). |
referred_contact_name | string | Name of the referred contact (read-only, joined). |
referred_company_name | string | Name of the referred company (read-only, joined). |
attributed_value | int | Revenue attributed to this referral in integer cents: the linked won-deal value if present, otherwise the referral value (read-only, computed). |
Log a partnership referral
Section titled “Log a partnership referral”Endpoint: partnership-referrals-create
| Field | Type | Required | Description |
|---|---|---|---|
partnership_id | string | No | ID of the partnership to log the referral under. |
direction | string | No | Direction of the referral; defaults to inbound when omitted. One of: inbound, outbound |
description | string | No | Free-text description of the referral. |
status | string | No | Lifecycle status; defaults to new when omitted. One of: new, qualified, converted, lost |
value | int? | No | Estimated value of the referral in integer cents. |
deal_id | string? | No | ID of the deal to link to the referral. |
referred_contact_id | string? | No | ID of the referred contact. |
referred_company_id | string? | No | ID of the referred company. |
curl -X POST https://api.driftwoodapp.com/api/partnership-referrals-create \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'Delete a partnership referral
Section titled “Delete a partnership referral”Endpoint: partnership-referrals-delete
List referrals for a partnership
Section titled “List referrals for a partnership”Endpoint: partnership-referrals-list
Update a partnership referral
Section titled “Update a partnership referral”Endpoint: partnership-referrals-update
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | ID of the referral to update. |
direction | string? | No | New direction of the referral. One of: inbound, outbound |
description | string? | No | New description. |
status | string? | No | New lifecycle status; transitioning to converted stamps converted_at. One of: new, qualified, converted, lost |
value | int? | No | New estimated value in integer cents. |
deal_id | string? | No | New linked deal ID; empty string clears the link. |
referred_contact_id | string? | No | New referred contact ID; empty string clears it. |
referred_company_id | string? | No | New referred company ID; empty string clears it. |
curl -X POST https://api.driftwoodapp.com/api/partnership-referrals-update \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
referrals.invalid_partnership_id | Invalid partnership id |
referrals.invalid_direction | Invalid direction |
referrals.invalid_deal_id | Invalid deal id |
referrals.invalid_contact_id | Invalid contact id |
referrals.invalid_company_id | Invalid company id |
partnerships.not_found | Not found |
referrals.invalid_id | Invalid id |
referrals.not_found | Not found |