SparkLoop
  • API v2
    • Endpoints
      • Subscribers
        • Events
      • Referral Campaigns
        • Campaign Memberships
        • Subscribers
      • Partner Profile
        • Recommendations
        • Payouts
      • Publications
      • Upscribe
        • Recommendations
      • Partner Programs
      • Partner Network
        • Publications
        • Partner Programs
      • Webhooks
    • Schemas
      • Partner Profile Object
      • Partner Program Object
      • Publication Object
      • Subscriber Object
      • Campaign Object
      • Upscribe Object
      • Recommendation Object
    • Guides
      • How to use Upscribe via API
  • API v1
    • Campaigns
    • Subscribers
    • Events
    • Webhooks
  • Webhooks
  • Changelog
Powered by GitBook
On this page
  • Get subscribers
  • Get a subscriber
  • Get referrals for a subscriber

Was this helpful?

  1. API v2
  2. Endpoints
  3. Referral Campaigns

Subscribers

Get subscribers

GET https://api.sparkloop.app/v2/campaigns/:identifier/subscribers

Subscribers are ordered in descending order by created_at, meaning the first page shows the latest subscribers.

Path Parameters

Name
Type
Description

identifier*

String

Referral campaign UUID, e.g. MF9a78983d1c.

Query Parameters

Name
Type
Description

type

string

Type of subscribers you want to get. Default is all, allowed values are all, referrals, advocates.

expand

String

If you pass "campaigns" the response will include referral_programs data

{
  "subscribers": [
    {
      "uuid": "sub_4bc1056297",
      "email": "drago@sparkloop.app",
      "name": null,
      "ref_code": "c784ef4f",
      "referrer_code": null,
      "referred": true,
      "referral_status": "verified",
      "ip_address": null,
      "user_agent": null,
      "origin": "signup",
      "utm_source": null,
      "utm_campaign": null,
      "created_at": "2021-03-24T11:55:02.113Z"
    },
    {
      "uuid": "sub_869976268c",
      "email": "manuel@sparkloop.com",
      "name": null,
      "ref_code": "d163ac6e",
      "referrer_code": null,
      "referred": false,
      "referral_status": "verified",
      "ip_address": null,
      "user_agent": null,
      "origin": "signup",
      "utm_source": null,
      "utm_campaign": null,
      "created_at": "2021-03-24T11:55:02.096Z"
    }
  ],
  "meta": {
    "per_page": 2,
    "page": 2,
    "total_pages": 3,
    "total_subscribers": 6
  }
}

Get a subscriber

GET https://api.sparkloop.app/v2/campaigns/:identifier/subscribers/:subscriber_identifier

Returns a single subscriber by email address or UUID

Path Parameters

Name
Type
Description

subscriber_identifier*

string

Subscriber's UUID or email address

identifier*

string

Referral campaign UUID, e.g. MF9a78983d1c.

Query Parameters

Name
Type
Description

expand

String

If you pass "campaigns" the response will include referral_programs data

{
  "subscriber": {
    "uuid": "sub_4bc1056297",
    "email": "test36@drago.com",
    "name": null,
    "ref_code": "c784ef4f",
    "referrer_code": null,
    "referred": true,
    "referral_status": "verified",
    "ip_address": null,
    "user_agent": null,
    "origin": "signup",
    "utm_source": null,
    "utm_campaign": null,
    "created_at": "2021-03-24T11:55:02.113Z"
  }
}
{
    "error": "Subscriber sub_4bc10562d97 not found!"
}

Get referrals for a subscriber

GET https://api.sparkloop.app/v2/campaigns/:identifier/subscribers/:subscriber_identifier/referrals

Get the referrals of a specific subscriber.

Subscribers are ordered descendingly by created_at, meaning the first page shows the latest subscribers.

Path Parameters

Name
Type
Description

subscriber_identifier*

String

Subscriber's UUID or email address

identifier*

String

Referral campaign UUID, e.g. MF9a78983d1c.

Query Parameters

Name
Type
Description

per_page

integer

Number of subscribers returned in a single request. Default is 50, max is 200

page

integer

The page you want to get. Default is 1

expand

String

If you pass "campaigns" the response will include referral_programs data

{
    "subscribers": [
        {
            "uuid": "sub_4bc1056297",
            "email": "test36@drago.com",
            "name": null,
            "ref_code": "c784ef4f",
            "referrer_code": null,
            "referrals_count": 0,
            "referred": true,
            "referral_status": "verified",
            "ip_address": null,
            "user_agent": null,
            "origin": "signup",
            "utm_source": null,
            "utm_campaign": null,
            "created_at": "2021-03-24T11:55:02.113Z"
        },
        {
            "uuid": "sub_869976268c",
            "email": "test35@drago.com",
            "name": null,
            "ref_code": "d163ac6e",
            "referrer_code": null,
            "referrals_count": 0,
            "referred": true,
            "referral_status": "pending",
            "ip_address": null,
            "user_agent": null,
            "origin": "signup",
            "utm_source": null,
            "utm_campaign": null,
            "created_at": "2021-03-24T11:55:02.096Z"
        },
        {
            "uuid": "sub_d4795d06e6",
            "email": "test34@drago.com",
            "name": null,
            "ref_code": "57b1fae2",
            "referrer_code": null,
            "referrals_count": 0,
            "referred": true,
            "referral_status": "rejected",
            "ip_address": null,
            "user_agent": null,
            "origin": "api",
            "utm_source": null,
            "utm_campaign": null,
            "created_at": "2021-03-24T11:55:02.066Z"
        }
    ],
    "meta": {
        "per_page": 3,
        "page": 2,
        "total_pages": 12,
        "total_subscribers": 36
    }
}
PreviousCampaign MembershipsNextPartner Profile

Last updated 7 months ago

Was this helpful?