SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester
Affiliates

Record which partner referred a contact, so their sales earn commission

Link a CRM contact to the partner who referred them. From then on, invoices that contact pays, quotes they accept and payment links they pay earn the partner commission automatically. The first partner recorded is kept: a contact that already has one answers already_attributed true with that partner and is not changed. The CRM contact id (a UUID). It is the contact_id returned when you convert a lead with the My Leads API, the contact_id on a quote, or the id of the contact on the Contacts page of the dashboard. Answers 400 affiliate_not_found when the code is not an active partner.

POSThttps://app.softsolz.uk/api/v1/services/affiliates/affiliates/contacts/{contactId}/referred-by

Recent Requests

Kept only in this browser
TimeStatusTook
Send a request with Try it to see it here.

Path Params

contactIdstringrequired

Headers

Authorizationstringrequired

Bearer token: Bearer sk_live_... (or sk_test_... for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

codestringrequired

Referral code of the partner who referred the contact.

Response

Response Body

affiliate_idstringPartner id.
codestringPartner referral code.
namestringPartner name.
already_attributedbooleanTrue when the contact was already credited to a partner before this call.

Request

curl --request POST \
--url https://app.softsolz.uk/api/v1/services/affiliates/affiliates/contacts/{contactId}/referred-by \
--header 'Authorization: Bearer sk_live_your_key' \
--header 'Content-Type: application/json' \
--data '{
"code": "ACMEMEDIA"
}'

Credentials

Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.

Response · 200

{
"data": {
"affiliate_id": "12",
"code": "ACMEMEDIA",
"name": "Acme Media",
"already_attributed": true
}
}