PUT
/
referrals
/
{id}
curl --request PUT \
  --url https://v2.firstpromoter.com/api/v2/company/referrals/{id} \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "[email protected]",
  "uid": "<string>",
  "username": "<string>",
  "promoter_campaign_id": 123,
  "find_by": "email",
  "split_details[percentage]": 0,
  "split_details[promoter_campaign_id]": 0
}'
{
  "id": 123,
  "email": "[email protected]",
  "uid": "<string>",
  "state": "subscribed",
  "metadata": {},
  "entry_source": "api",
  "created_at": "2023-11-07T05:31:56Z",
  "customer_since": "2023-11-07T05:31:56Z",
  "promoter_campaign": {
    "id": 123,
    "campaign_id": 123,
    "promoter_id": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "promoter": {
      "id": 123,
      "email": "[email protected]",
      "name": "<string>"
    },
    "campaign": {
      "id": 123,
      "name": "<string>",
      "color": "<string>"
    }
  },
  "fraud_check": "no_suspicion",
  "created_by_user_email": "[email protected]"
}

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Path Parameters

id
string
required

ID of the referral

Body

application/json

Response

200
application/json
Referral updated successfully

The response is of type object.