Referral Information API Object

Referral information is represented as the following JSON object.

{
  "campaign": {
    "id": "cmp_123456a2a23453754201daad7f0ab125",
    "object_id": "cmp_123456a2a23453754201daad7f0ab125",
    "object": "campaign",
    "name": "Dummy campaign",
    "type": "conversion-machine",
    "created": 1556013468,
    "created_at": 1556013468
  },
  "person": {
    "id": "per_12345696e050d89c119221d3f7986e92",
    "object_id": "per_12345696e050d89c119221d3f7986e92",
    "object": "person",
    "name": "Georgette Braun",
    "email": "abernathy.shakira@example.com",
    "created": 1556023468,
    "created_at": 1556023468
  },
  "referral_stats": {
    "visits": 3,
    "sign_ups": 1,
    "conversions": 1
  },
  "referrals": [...PersonAPIObject],
  "referral_code": "123456bfIYk"
}

Referral Information Retrieval API

Referral information can be retrieved in two ways.

Don't forget to replace the following placeholders with your own values when running the commands:

curl -X GET \\
    -H "Accept: application/json" \\
    -H "Content-Type: application/json" \\
    -H "Authorization: Bearer __API_KEY__" \\
    "<https://api.referralmagic.co/referrals/__REFERRAL_CODE__>"
curl -X GET \\
    -H "Accept: application/json" \\
    -H "Content-Type: application/json" \\
    -H "Authorization: Bearer __API_KEY__" \\
    "<https://api.referralmagic.co/campaigns/__CAMPAIGN_ID__/referrals?email=__EMAIL_ADDRESS__>"