SaaSquatch Help Center

The Referral SaaSquatch API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. JSON will be returned in all responses from the API, including errors.

To make the Referral SaaSquatch API as explorable as possible, accounts have test-mode API keys as well as live-mode API keys. These keys are both active at the same time. Data created with test-mode credentials will use your payment system's respective test mode.

Tag Summary

API methods are organized by tags of similar functionality. If you're in a hurry to understand how the SaaSquatch REST API works, then understanding the tags is a great place to start.

Account

Accounts can be shared between users and accumulate credit.

User

Users are the people in your program. In other places a User might also be called a Contact, Lead or Participant.

Referral Code

Referral Codes are unique ids used to track referrals.

Referral

A Referral tracks who has referred whom.

Reward Balance

Reward Balances summarizes the Rewards in someone's account.

Reward

A Reward keeps track of a prize, discount or credit that someone has received.

Open Endpoint

Open Endpoints are special methods designed specifically for Client-facing applications like the Mobile SDK and Javascript SDK.

Webhook

Webhooks can be used to do real time actions and data synchronization from SaaSquatch.

Theme

Themes control the look and feel of your program's widgets.

Discount

Endpoints for working with discounts. Most of these are deprecated in favor of using Reward endpoints.

Deprecated

Endpoints that have been deprecated.

Authentication Summary

API methods may be used with one or several authentication schemes as defined in this table:

APIKey

Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions.

UserJWT

Authorize your requests using a JWT (JSON Web Token) for a given user. Useful for client-server authorization, such as the Mobile and Web SDKs. Used in Open Endpoints.

Unauthenticated
Does not require any type of authentication to make this API call.

Methods Summary

Method Route Description Auth Tags
POST /api/v1/{tenant_alias}/accountsync Create or Update an account APIKey Account
GET /api/v1/{tenant_alias}/account/{accountId} Lookup an account APIKey Account
POST /api/v1/{tenant_alias}/user Create or Update a User APIKey User
GET /api/v1/{tenant_alias}/user Lookup a user by Referral Code APIKey User
GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId} Lookup a user APIKey User
GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/pii Lookup a user PII APIKey User
GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/sharelinks Lookup a user's share links APIKey User
GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/shareurls Lookup a user's share URLs APIKey User
POST /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/block Block user APIKey User
POST /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/unblock Unblock user APIKey User
GET /api/v1/{tenant_alias}/users List users APIKey User
GET /api/v1/{tenant_alias}/code/{code} Lookup a referral code APIKey Referral Code
GET /api/v1/{tenant_alias}/referrals List referrals APIKey Referral
GET /api/v1/{tenant_alias}/referrals/{referralId} Lookup a Referral APIKey Referral
POST /api/v1/{tenant_alias}/referrals/moderate Moderate referrals APIKey Referral
GET /api/v1/{tenant_alias}/reward/balance List reward balances APIKey Reward Balance
POST /api/v1/{tenant_alias}/credit/bulkredeem Debit a reward balance APIKey Reward Balance
GET /api/v1/{tenant_alias}/reward List an account's rewards APIKey Reward
GET /api/v1/{tenant_alias}/reward/{id}/ Lookup a single reward APIKey Reward
POST /api/v1/{tenant_alias}/credit/{id}/redeem Redeem a single reward APIKey Reward
POST /api/v1/{tenant_alias}/reward/{id}/cancel Cancel a single reward APIKey Reward
POST /api/v1/{tenant_alias}/rewards/account/{accountId}/user/{userId} Create a single reward APIKey Reward
PUT /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} User Upsert APIKey UserJWT User Open Endpoint
POST /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} Create a user and account APIKey UserJWT User Open Endpoint
GET /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} Lookup a user APIKey UserJWT User Open Endpoint
DELETE /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} Delete a user APIKey User Open Endpoint
GET /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}/shareurls Lookup a user's share URLs APIKey UserJWT User Open Endpoint
PUT /api/v1/{tenant_alias}/open/user/cookie_user Create Cookie User APIKey UserJWT User Open Endpoint
GET /api/v1/{tenant_alias}/open/user Get a user by a referral code Unauthenticated User Open Endpoint
GET /api/v1/{tenant_alias}/open/code/{referral_code} Lookup a referral code Unauthenticated Referral Code Open Endpoint
POST /api/v1/{tenant_alias}/open/code/{referral_code}/account/{account_id}/user/{user_id} Apply a referral code APIKey UserJWT Referral Code Open Endpoint
GET /api/v1/{tenant_alias}/open/referrals List referrals APIKey UserJWT Referral Open Endpoint
DELETE /api/v1/{tenant_alias}/open/account/{accountId} Delete an account APIKey Account Open Endpoint
POST /api/v1/{tenant_alias}/subscription Create a webhook subscription APIKey Webhook
GET /api/v1/{tenant_alias}/subscription List webhook subscriptions APIKey Webhook
DELETE /api/v1/{tenant_alias}/subscription/{url} Delete a webhook subscription APIKey Webhook
POST /api/v1/{tenant_alias}/subscription/{url}/test Test a webhook subscription APIKey UserJWT Webhook
POST /api/v1/{tenant_alias}/export Create a CSV Export APIKey Export
GET /api/v1/{tenant_alias}/export/{exportId} Lookup a CSV Export APIKey Export
GET /api/v1/{tenant_alias}/export/{exportId}/download Download a CSV Export APIKey Export
GET /api/v1/{tenant_alias}/export/history/list List CSV Exports APIKey Export
GET /api/v1/{tenant_alias}/theme/variables/schema Lookup variables schema APIKey Theme
GET /api/v1/{tenant_alias}/theme/variables/instance Lookup Default Variables Values APIKey Theme
PUT /api/v1/{tenant_alias}/theme/variables/instance Replace Default Variable Values APIKey Theme
PATCH /api/v1/{tenant_alias}/theme/variables/instance Update Default Variable Values APIKey UserJWT Theme
GET /api/v1/{tenant_alias}/theme/{locale}/variables/instance Lookup Localized Variables Values APIKey Theme
PUT /api/v1/{tenant_alias}/theme/{locale}/variables/instance Replace Localized Variable Values APIKey Theme
PATCH /api/v1/{tenant_alias}/theme/{locale}/variables/instance Update Localized Variable Values APIKey UserJWT Theme
DELETE /api/v1/{tenant_alias}/theme/{locale}/variables/instance Delete Localized Variable Values APIKey UserJWT Theme
POST /api/v1/{tenant_alias}/theme/email/{email_type}/preview Preview Theme Email APIKey Theme
GET /api/v1/{tenant_alias}/discount/{code} Lookup a discount code APIKey Discount
POST /api/v1/{tenant_alias}/discount Set discount code on an account APIKey Discount
GET /api/v1/{tenant_alias}/account/{accountId}/discount Lookup an account discount APIKey Discount

Create or Update an account

POST /api/v1/{tenant_alias}/accountsync

Use this method to update SaaSquatch when the status of an account changes or when a new account is created.

This call is only available on an API-only program. Making this call on a payment provider program will fail and return a 403 error indicating the call is incompatible with your type of program.

Tags: Account Authentication: APIKey

Arguments

Required account
JSON Body

Account details of the account to be created or updated

Required id
string

Unique identifier for the account

Required subscription
object

An object describing the current subscription for this account

Required status
string

The status of the subscription.

Possible values: PAID, TRIAL, FREE, or CANCELLED

billingIntervalType
string

Type of billing interval.
Required when status: PAID.
Use a placeholder value of DAY for Referral SaaSquatch programs with non-CPA billing

Possible values: DAY, WEEK, MONTH, QUARTER, SEMI_ANNUAL, or YEAR

billingIntervalValue
integer

The value of billing interval.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

value
number

Dollar value of the subscription per renewal.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

referral
object

Info about who referred this account. Use this on first signup.

code
string

The referral code of the person that referred this account. Use squatch.js autofill to retrieve this value from the tracking cookie on your checkout form.

currency
string

Default is "USD". Otherwise use an ISO 4217 Standard currency code in uppercase.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/accountsync \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "id": "abc123",
    "subscription": {
        "status": "PAID",
        "billingIntervalType": "DAY",
        "billingIntervalValue": 1,
        "value": 1
    },
    "referral": {
        "code": "BOBTESTERSON"
    },
    "currency": "USD"
}'
        

Returns

id
string

Unique identifier for the account

subscription
object

An object describing the current subscription for this account

status
string

The status of the subscription.

Possible values: PAID, TRIAL, FREE, or CANCELLED

billingIntervalType
string

Type of billing interval.
Required when status: PAID.
Use a placeholder value of DAY for Referral SaaSquatch programs with non-CPA billing

Possible values: DAY, WEEK, MONTH, QUARTER, SEMI_ANNUAL, or YEAR

billingIntervalValue
integer

The value of billing interval.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

value
number

Dollar value of the subscription per renewal.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

referral
object

Info about who referred this account. Use this on first signup.

code
string

The referral code of the person that referred this account. Use squatch.js autofill to retrieve this value from the tracking cookie on your checkout form.

currency
string

Default is "USD". Otherwise use an ISO 4217 Standard currency code in uppercase.

Example Response

HTTP 200
{
    "id": "a1234",
    "currency": "USD",
    "subscription": {
        "status": "PAID",
        "value": 1,
        "billingIntervalType": "DAY",
        "billingIntervalValue": 1
    },
    "referral": {
        "code": "3j033r"
    }
}

Example Response

HTTP 403
{
    "message": "Account sync failed. This push is not valid for your tenant type[STRIPE]",
    "statusCode": 403,
    "apiErrorCode": "API_REQUEST_NOT_SUPPORTED"
}

Lookup an account

GET /api/v1/{tenant_alias}/account/{accountId}

Looks up an Account based upon id and returns the stored account information. This method just returns the details of the account in question, and not all associated properties like Rewards, ShareLinks, Balances or Referrals.

This call is only available on an API-only program. Making this call on a payment provider program will fail and return a 403 error indicating the call is incompatible with your type of program.

Tags: Account Authentication: APIKey

Arguments

Required accountId
string

The id of the Account to look up.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId} \
        -u :API_KEY \
        
        

Returns

id
string

Unique identifier for the account

subscription
object

An object describing the current subscription for this account

status
string

The status of the subscription.

Possible values: PAID, TRIAL, FREE, or CANCELLED

billingIntervalType
string

Type of billing interval.
Required when status: PAID.
Use a placeholder value of DAY for Referral SaaSquatch programs with non-CPA billing

Possible values: DAY, WEEK, MONTH, QUARTER, SEMI_ANNUAL, or YEAR

billingIntervalValue
integer

The value of billing interval.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

value
number

Dollar value of the subscription per renewal.
Required when status: PAID.
Use a placeholder value of 1 for Referral SaaSquatch programs with non-CPA billing

referral
object

Info about who referred this account. Use this on first signup.

code
string

The referral code of the person that referred this account. Use squatch.js autofill to retrieve this value from the tracking cookie on your checkout form.

currency
string

Default is "USD". Otherwise use an ISO 4217 Standard currency code in uppercase.

Example Response

HTTP 200
{
    "id": "89842",
    "currency": "USD",
    "subscription": {
        "status": "PAID",
        "value": 29.99,
        "billingIntervalType": "MONTH",
        "billingIntervalValue": 1
    },
    "referral": {
        "code": "WILLSANDERSON2"
    }
}

Example Response

HTTP 403
{
    "message": "Account sync failed. This push is not valid for your tenant type[STRIPE]",
    "statusCode": 403,
    "apiErrorCode": "API_REQUEST_NOT_SUPPORTED"
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Create or Update a User

POST /api/v1/{tenant_alias}/user

This method creates or updates a User object by performing an atomic upsert operation. Using this method will either replace the information stored about a given user, or create a new user if no User with a matching id is found. This method is helpful for synchronizing user information from your database into Referral SaaSquatch. This method will not create or update the Account linked by accountId. When creating users for the first time ensure that the Account already exists or create it before using this call. See the article on Shared vs Solo Accounts for more information on Users and Accounts and how they relate.

Tags: User Authentication: APIKey

Arguments

Required user
JSON Body

Details of the User to be created or updated

Required id
string

The unique identifier provided for this user.

Required accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/user \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "id": "219065",
    "accountId": "accc9065",
    "email": "bob@example.com",
    "firstName": "Bob",
    "lastName": "Testerson",
    "referralCode": "BOBTESTERSON",
    "imageUrl": "https://www.example.com/profiled/ab5111251125",
    "locale": "`en` or `en_US` or `zh_CN`"
}'
        

Returns

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}

Lookup a user by Referral Code

GET /api/v1/{tenant_alias}/user

Looks up a user based upon their ReferralCode and returns their personal information. This method is useful for retrieving the user when only the Referral Code is available. For example when a referred user enters a Referral Code during checkout and you want to find out who this Referral Code belongs to.

Tags: User Authentication: APIKey

Arguments

Required referralCode
string

The referralCode of the user you want to retrieve. For example BOBTESTERSON.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/user?referralCode=BOBTESTERSON \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Lookup a user

GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}

Looks up a user based upon their id and returns their personal information. This method just returns the details of the user in question, and not all associated properties like Rewards, Balances, or Referrals.

Tags: User Authentication: APIKey

Arguments

Required accountId
string

The id of the Account that this user is a member of. See Shared vs. Solo accounts for more info.

Required userId
string

The id of the User to find

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId} \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Lookup a user PII

GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/pii

Returns details of the Personally identifiable information stored in the SaaSquatch system for a specific SaaSquatch user.

Warning! This method should only be used in connection with data protection and privacy compliance.

For programatically looking up information about users within your SaaSquatch project, please use the Lookup User endpoint

Tags: User Authentication: APIKey

Arguments

Required accountId
string

The id of the Account to lookup

Required userId
string

The id of the User to lookup

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/pii \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

lastInitial
string

The user's last name initial

referralCode
string

The referral code used for sharing by this user

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

cookieId
string

A unique identifier for this participant.

paymentProviderId
string

The paymentProviderId is either the Stripe Customer ID, the Recurly Account ID, the Braintree Account ID or the Zuora Account ID. This field cannot be updated. Do not include this arguement on an API-only program, or unless looking to set it.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

firstSeenIPLocation
object
lat
float

The latitude of the user's first seen IP address

lon
float

The longitude of the user's first seen IP address

lastSeenIPLocation
object
lat
float

The latitude of the user's last known IP address

lon
float

The longitude of the user's last known IP address

firstSeenUserAgent
string
readonly

The user's browser user agent on indentification

lastSeenUserAgent
string
readonly

The latest user agent seen for the user

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredByReferral
object

A link between the user/account of the referrer and the new referred user/account. The authoritative source of who has referred whom. Not all referrals result in a Reward or a RewardBalance being created, such as in-progress referrals.

id
string

Unique identifier for the Referral object

referredUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referrerUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

referrerReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

moderationStatus
string

When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated.

Possible values: PENDING, or ACTIONED

referredModerationStatus
string

Used to identify the referred user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

referrerModerationStatus
string

Used to identify the referrer user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

fraudSignals
object

Information about signals of potential fraud on the referral

name
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

ip
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

email
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

rate
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

rewards
object
totalCount
integer

The number of rewards earned by the user

data
array
id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

rewardBalances
array
type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with types TIME_CREDIT, and CREDIT

count
integer

"The number of rewards earned. Usually is equal to the number of successful referrals made. E.g. An account has $80 of credit due to the referral program. $60 from making referrals, $20 from being referred. The count would be 4 rewards, each worth $20. Only works for TIME_CREDIT, and CREDIT"

totalAssignedCredit
integer

The total assignedCredit for all reward credits of the same unit type. Only works with types: TIME_CREDIT, CREDIT

totalRedeemedCredit
integer

The total redeemedCredit for all reward credits of the same unit type. Only works with types: TIME_CREDIT, CREDIT

totalDiscountPercent
integer

The total discountPercent from all rewards. Only works with types: PCT_DISCOUNT

referredDiscountPercent
integer

The total discountPercent from rewards with rewardSource = REFERRED Only works with types: PCT_DISCOUNT

referrerDiscountPercent
integer

The total discountPercent from rewards with rewardSource = FRIEND_SIGNUP Only works with types: PCT_DISCOUNT

totalFuelTankCodes
integer

The number of earned fueltank rewards. Only works with type: FUELTANK

referrals
object
totalCount
integer

A list of the referrals made by the user.

data
array
referrals
array

A list of Referral objects. This is the actual data in this list envelope.

id
string

Unique identifier for the Referral object

referredUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referrerUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

referrerReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

moderationStatus
string

When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated.

Possible values: PENDING, or ACTIONED

referredModerationStatus
string

Used to identify the referred user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

referrerModerationStatus
string

Used to identify the referrer user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

fraudSignals
object

Information about signals of potential fraud on the referral

name
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

ip
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

email
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

rate
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

count
integer

The number of results returned in this list, see totalCount for all rows.

totalCount
integer

The total number of results available overall, see count for the number of rows in this list.

segments
array

A list of segments that a user is a member of.

Example Response

HTTP 200
{
    "id": "abc_132",
    "accountId": "abc_132",
    "firstName": "John",
    "lastName": "Doe",
    "lastInitial": "D",
    "referralCode": "JOHNDOECODE",
    "imageUrl": "",
    "email": "john@example.com",
    "cookieId": null,
    "paymentProviderId": null,
    "locale": null,
    "referable": true,
    "customFields": {},
    "firstSeenIP": "207.194.49.162",
    "lastSeenIP": "207.194.49.162",
    "firstSeenIPLocation": {
        "lat": 48.4765,
        "lon": -123.3145
    },
    "lastSeenIPLocation": {
        "lat": 48.4765,
        "lon": -123.3145
    },
    "firstSeenUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36",
    "lastSeenUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36",
    "dateCreated": 1521477982534,
    "emailHash": "d4c74594d841139328695756648b6bd6",
    "referralSource": "UNKNOWN",
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    },
    "referredByReferral": {
        "id": "546270a6e4b0c1871186a920",
        "referredUser": {
            "id": "898746321",
            "accountId": "987321",
            "email": "hello@example.com",
            "firstName": "Henk",
            "lastName": "Thompson",
            "referralCode": "HENKTHOMPSON",
            "imageUrl": "",
            "firstSeenIP": "10.230.163.157",
            "lastSeenIP": "184.66.242.57",
            "dateCreated": 1467222395030,
            "emailHash": "180bc1412a038746af9b37fb782724a2",
            "referralSource": "http://unifiedtestapp.herokuapp.com/",
            "locale": null,
            "shareLinks": {
                "shareLink": "http://ssqt.co/mvbcF5",
                "facebookShareLink": "http://ssqt.co/mmbcF5",
                "twitterShareLink": "http://ssqt.co/mRbcF5",
                "emailShareLink": "http://ssqt.co/mLbcF5",
                "linkedinShareLink": "http://ssqt.co/mLbcF5",
                "mobileShareLink": "http://ssqt.co/mebcF5",
                "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                "EMBED": {
                    "shareLink": "http://ssqt.co/mQbcF5",
                    "facebookShareLink": "http://ssqt.co/mwbcF5",
                    "twitterShareLink": "http://ssqt.co/mcbcF5",
                    "emailShareLink": "http://ssqt.co/mJbcF5",
                    "linkedinShareLink": "http://ssqt.co/mHbcF5"
                },
                "POPUP": {
                    "shareLink": "http://ssqt.co/m5bcF5",
                    "facebookShareLink": "http://ssqt.co/m9bcF5",
                    "twitterShareLink": "http://ssqt.co/mMbcF5",
                    "emailShareLink": "http://ssqt.co/mobcF5",
                    "linkedinShareLink": "http://ssqt.co/m7bcF5"
                },
                "HOSTED": {
                    "shareLink": "http://ssqt.co/mtbcF5",
                    "facebookShareLink": "http://ssqt.co/mubcF5",
                    "twitterShareLink": "http://ssqt.co/mSbcF5",
                    "emailShareLink": "http://ssqt.co/mlbcF5",
                    "linkedinShareLink": "http://ssqt.co/mYbcF5"
                },
                "MOBILE": {
                    "shareLink": "http://ssqt.co/mebcF5",
                    "facebookShareLink": "http://ssqt.co/mnbcF5",
                    "twitterShareLink": "http://ssqt.co/mCbcF5",
                    "emailShareLink": "http://ssqt.co/mEbcF5",
                    "linkedinShareLink": "http://ssqt.co/m3bcF5"
                },
                "EMAIL": {
                    "shareLink": "http://ssqt.co/mPbcF5",
                    "facebookShareLink": "http://ssqt.co/mTbcF5",
                    "twitterShareLink": "http://ssqt.co/mGbcF5",
                    "emailShareLink": "http://ssqt.co/mbbcF5",
                    "linkedinShareLink": "http://ssqt.co/m1bcF5"
                }
            }
        },
        "referrerUser": {
            "id": "898746321",
            "accountId": "987321",
            "email": "hello@example.com",
            "firstName": "Henk",
            "lastName": "Thompson",
            "referralCode": "HENKTHOMPSON",
            "imageUrl": "",
            "firstSeenIP": "10.230.163.157",
            "lastSeenIP": "184.66.242.57",
            "dateCreated": 1467222395030,
            "emailHash": "180bc1412a038746af9b37fb782724a2",
            "referralSource": "http://unifiedtestapp.herokuapp.com/",
            "locale": null,
            "shareLinks": {
                "shareLink": "http://ssqt.co/mvbcF5",
                "facebookShareLink": "http://ssqt.co/mmbcF5",
                "twitterShareLink": "http://ssqt.co/mRbcF5",
                "emailShareLink": "http://ssqt.co/mLbcF5",
                "linkedinShareLink": "http://ssqt.co/mLbcF5",
                "mobileShareLink": "http://ssqt.co/mebcF5",
                "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                "EMBED": {
                    "shareLink": "http://ssqt.co/mQbcF5",
                    "facebookShareLink": "http://ssqt.co/mwbcF5",
                    "twitterShareLink": "http://ssqt.co/mcbcF5",
                    "emailShareLink": "http://ssqt.co/mJbcF5",
                    "linkedinShareLink": "http://ssqt.co/mHbcF5"
                },
                "POPUP": {
                    "shareLink": "http://ssqt.co/m5bcF5",
                    "facebookShareLink": "http://ssqt.co/m9bcF5",
                    "twitterShareLink": "http://ssqt.co/mMbcF5",
                    "emailShareLink": "http://ssqt.co/mobcF5",
                    "linkedinShareLink": "http://ssqt.co/m7bcF5"
                },
                "HOSTED": {
                    "shareLink": "http://ssqt.co/mtbcF5",
                    "facebookShareLink": "http://ssqt.co/mubcF5",
                    "twitterShareLink": "http://ssqt.co/mSbcF5",
                    "emailShareLink": "http://ssqt.co/mlbcF5",
                    "linkedinShareLink": "http://ssqt.co/mYbcF5"
                },
                "MOBILE": {
                    "shareLink": "http://ssqt.co/mebcF5",
                    "facebookShareLink": "http://ssqt.co/mnbcF5",
                    "twitterShareLink": "http://ssqt.co/mCbcF5",
                    "emailShareLink": "http://ssqt.co/mEbcF5",
                    "linkedinShareLink": "http://ssqt.co/m3bcF5"
                },
                "EMAIL": {
                    "shareLink": "http://ssqt.co/mPbcF5",
                    "facebookShareLink": "http://ssqt.co/mTbcF5",
                    "twitterShareLink": "http://ssqt.co/mGbcF5",
                    "emailShareLink": "http://ssqt.co/mbbcF5",
                    "linkedinShareLink": "http://ssqt.co/m1bcF5"
                }
            }
        },
        "referredReward": {
            "id": "5462600de4b09b1c41108f2e",
            "type": "PCT_DISCOUNT",
            "dateGiven": 1415733261275,
            "dateExpires": null,
            "dateCancelled": null,
            "accountId": "613611",
            "userId": "876343",
            "cancellable": true,
            "rewardSource": "REFERRED",
            "discountPercent": 20,
            "unit": "%"
        },
        "referrerReward": {
            "id": "5462600de4b09b1c41108f2e",
            "type": "PCT_DISCOUNT",
            "dateGiven": 1415733261275,
            "dateExpires": null,
            "dateCancelled": null,
            "accountId": "613611",
            "userId": "876343",
            "cancellable": true,
            "rewardSource": "REFERRED",
            "discountPercent": 20,
            "unit": "%"
        },
        "moderationStatus": "ACTIONED",
        "dateReferralStarted": 1415737510411,
        "dateReferralPaid": 1415737557217,
        "dateReferralEnded": null,
        "dateModerated": 1427410131029,
        "referredModerationStatus": "APPROVED",
        "referrerModerationStatus": "APPROVED",
        "fraudSignals": {
            "ip": {
                "message": "Referrer and referred came from the same IP",
                "score": 50
            }
        }
    },
    "rewards": {
        "totalCount": 1,
        "data": [
            {
                "id": "582142aae4b05442a5fa01a5",
                "type": "CREDIT",
                "dateGiven": 1478574762838,
                "dateExpires": null,
                "dateCancelled": null,
                "accountId": "613611",
                "userId": "876343",
                "cancellable": true,
                "rewardSource": "REFERRED",
                "unit": "CENTS",
                "assignedCredit": 2500,
                "redeemedCredit": 0,
                "redemptions": [
                    {
                        "id": "5462600de4b09b1c41238f2f",
                        "dateRedeemed": 1415733261275,
                        "quantityRedeemed": 2000
                    }
                ],
                "name": "Dollar Credit",
                "currency": null
            }
        ]
    },
    "rewardBalances": [
        {
            "type": "CREDIT",
            "count": "4",
            "totalAssignedCredit": "10000",
            "totalRedeemedCredit": "0",
            "unit": "cents"
        }
    ],
    "referrals": {
        "totalCount": 1,
        "data": [
            {
                "id": "546270a6e4b0c1871186a920",
                "referredUser": {
                    "id": "898746321",
                    "accountId": "987321",
                    "email": "hello@example.com",
                    "firstName": "Henk",
                    "lastName": "Thompson",
                    "referralCode": "HENKTHOMPSON",
                    "imageUrl": "",
                    "firstSeenIP": "10.230.163.157",
                    "lastSeenIP": "184.66.242.57",
                    "dateCreated": 1467222395030,
                    "emailHash": "180bc1412a038746af9b37fb782724a2",
                    "referralSource": "http://unifiedtestapp.herokuapp.com/",
                    "locale": null,
                    "shareLinks": {
                        "shareLink": "http://ssqt.co/mvbcF5",
                        "facebookShareLink": "http://ssqt.co/mmbcF5",
                        "twitterShareLink": "http://ssqt.co/mRbcF5",
                        "emailShareLink": "http://ssqt.co/mLbcF5",
                        "linkedinShareLink": "http://ssqt.co/mLbcF5",
                        "mobileShareLink": "http://ssqt.co/mebcF5",
                        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                        "EMBED": {
                            "shareLink": "http://ssqt.co/mQbcF5",
                            "facebookShareLink": "http://ssqt.co/mwbcF5",
                            "twitterShareLink": "http://ssqt.co/mcbcF5",
                            "emailShareLink": "http://ssqt.co/mJbcF5",
                            "linkedinShareLink": "http://ssqt.co/mHbcF5"
                        },
                        "POPUP": {
                            "shareLink": "http://ssqt.co/m5bcF5",
                            "facebookShareLink": "http://ssqt.co/m9bcF5",
                            "twitterShareLink": "http://ssqt.co/mMbcF5",
                            "emailShareLink": "http://ssqt.co/mobcF5",
                            "linkedinShareLink": "http://ssqt.co/m7bcF5"
                        },
                        "HOSTED": {
                            "shareLink": "http://ssqt.co/mtbcF5",
                            "facebookShareLink": "http://ssqt.co/mubcF5",
                            "twitterShareLink": "http://ssqt.co/mSbcF5",
                            "emailShareLink": "http://ssqt.co/mlbcF5",
                            "linkedinShareLink": "http://ssqt.co/mYbcF5"
                        },
                        "MOBILE": {
                            "shareLink": "http://ssqt.co/mebcF5",
                            "facebookShareLink": "http://ssqt.co/mnbcF5",
                            "twitterShareLink": "http://ssqt.co/mCbcF5",
                            "emailShareLink": "http://ssqt.co/mEbcF5",
                            "linkedinShareLink": "http://ssqt.co/m3bcF5"
                        },
                        "EMAIL": {
                            "shareLink": "http://ssqt.co/mPbcF5",
                            "facebookShareLink": "http://ssqt.co/mTbcF5",
                            "twitterShareLink": "http://ssqt.co/mGbcF5",
                            "emailShareLink": "http://ssqt.co/mbbcF5",
                            "linkedinShareLink": "http://ssqt.co/m1bcF5"
                        }
                    }
                },
                "referrerUser": {
                    "id": "898746321",
                    "accountId": "987321",
                    "email": "hello@example.com",
                    "firstName": "Henk",
                    "lastName": "Thompson",
                    "referralCode": "HENKTHOMPSON",
                    "imageUrl": "",
                    "firstSeenIP": "10.230.163.157",
                    "lastSeenIP": "184.66.242.57",
                    "dateCreated": 1467222395030,
                    "emailHash": "180bc1412a038746af9b37fb782724a2",
                    "referralSource": "http://unifiedtestapp.herokuapp.com/",
                    "locale": null,
                    "shareLinks": {
                        "shareLink": "http://ssqt.co/mvbcF5",
                        "facebookShareLink": "http://ssqt.co/mmbcF5",
                        "twitterShareLink": "http://ssqt.co/mRbcF5",
                        "emailShareLink": "http://ssqt.co/mLbcF5",
                        "linkedinShareLink": "http://ssqt.co/mLbcF5",
                        "mobileShareLink": "http://ssqt.co/mebcF5",
                        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                        "EMBED": {
                            "shareLink": "http://ssqt.co/mQbcF5",
                            "facebookShareLink": "http://ssqt.co/mwbcF5",
                            "twitterShareLink": "http://ssqt.co/mcbcF5",
                            "emailShareLink": "http://ssqt.co/mJbcF5",
                            "linkedinShareLink": "http://ssqt.co/mHbcF5"
                        },
                        "POPUP": {
                            "shareLink": "http://ssqt.co/m5bcF5",
                            "facebookShareLink": "http://ssqt.co/m9bcF5",
                            "twitterShareLink": "http://ssqt.co/mMbcF5",
                            "emailShareLink": "http://ssqt.co/mobcF5",
                            "linkedinShareLink": "http://ssqt.co/m7bcF5"
                        },
                        "HOSTED": {
                            "shareLink": "http://ssqt.co/mtbcF5",
                            "facebookShareLink": "http://ssqt.co/mubcF5",
                            "twitterShareLink": "http://ssqt.co/mSbcF5",
                            "emailShareLink": "http://ssqt.co/mlbcF5",
                            "linkedinShareLink": "http://ssqt.co/mYbcF5"
                        },
                        "MOBILE": {
                            "shareLink": "http://ssqt.co/mebcF5",
                            "facebookShareLink": "http://ssqt.co/mnbcF5",
                            "twitterShareLink": "http://ssqt.co/mCbcF5",
                            "emailShareLink": "http://ssqt.co/mEbcF5",
                            "linkedinShareLink": "http://ssqt.co/m3bcF5"
                        },
                        "EMAIL": {
                            "shareLink": "http://ssqt.co/mPbcF5",
                            "facebookShareLink": "http://ssqt.co/mTbcF5",
                            "twitterShareLink": "http://ssqt.co/mGbcF5",
                            "emailShareLink": "http://ssqt.co/mbbcF5",
                            "linkedinShareLink": "http://ssqt.co/m1bcF5"
                        }
                    }
                },
                "referredReward": {
                    "id": "5462600de4b09b1c41108f2e",
                    "type": "PCT_DISCOUNT",
                    "dateGiven": 1415733261275,
                    "dateExpires": null,
                    "dateCancelled": null,
                    "accountId": "613611",
                    "userId": "876343",
                    "cancellable": true,
                    "rewardSource": "REFERRED",
                    "discountPercent": 20,
                    "unit": "%"
                },
                "referrerReward": {
                    "id": "5462600de4b09b1c41108f2e",
                    "type": "PCT_DISCOUNT",
                    "dateGiven": 1415733261275,
                    "dateExpires": null,
                    "dateCancelled": null,
                    "accountId": "613611",
                    "userId": "876343",
                    "cancellable": true,
                    "rewardSource": "REFERRED",
                    "discountPercent": 20,
                    "unit": "%"
                },
                "moderationStatus": "ACTIONED",
                "dateReferralStarted": 1415737510411,
                "dateReferralPaid": 1415737557217,
                "dateReferralEnded": null,
                "dateModerated": 1427410131029,
                "referredModerationStatus": "APPROVED",
                "referrerModerationStatus": "APPROVED",
                "fraudSignals": {
                    "ip": {
                        "message": "Referrer and referred came from the same IP",
                        "score": 50
                    }
                }
            }
        ],
        "segments": []
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Lookup a user's share URLs

GET /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/shareurls

This API method returns the full list of referral share links for a user. Optional filter parameters are available to return only links of a specific share or engagement medium.

Share links are made available to a Referrer to provide to their friends and family to click and be directed to your referral program landing page.

The sharelinks are segmented by Engagement Medium, which is the channel the Referrer accessed the program to be able to share out their referral through. For each Engagment Medium, like EMBED, a link is provided for each available Share Medium. This segmentation is used to power the SaaSquatch analytics platform to provide information about how, and where, your users are interacting with your referral program. For example, The WHATSAPP link from the MOBILE section is intended to be used to indicated to our system that the Referrer accessed the referral program from a mobile device and shared their referral with their friend using Whatsapp. More information about available Engagement Mediums and Share Mediums can be found in our success center.

Share links work by dropping a tracking cookie in the user's browser when the user clicks the link and is directed to your referral program's landing page. This cookie includes the referral code of the Referrer that shared it. Once on your website this cookie can be read using the squatch.js autofill method and is also automatically picked up by our squatch.js library to connect referrals.

The referral code is also passed along to your referral program landing page as the URL parameter rsCode. For example http://ssqt.co/pZVp redirects to https://www.google.ca/?rsCode=JOHNDOE.

Tags: User Authentication: APIKey

Arguments

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Required accountId
string

The ID of the account to look up

Required userId
string

Filters share urls by user.id.

engagementMedium
string

Filters share urls by engagementMedium.

shareMedium
string

Filters share urls by shareMedium.

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/shareurls \
        -u :API_KEY \
        
        

Returns

shareLinks
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

EMAIL
object

An individual user's Share links for use in the EMAIL engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

MOBILE
object

An individual user's Share links for use in the MOBILE engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

EMBED
object

An individual user's Share links for use in the EMBED engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

POPUP
object

An individual user's Share links for use in the POPUP engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

UNKNOWN
object

An individual user's Share links for use in an UNKNOWN engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

HOSTED
object

An individual user's Share links for use in the HOSTED engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

Example Response

HTTP 200
{
    "shareLinks": {
        "EMAIL": {
            "TWITTER": "http://ssqt.co/mGbZbgC",
            "UNKNOWN": "http://ssqt.co/mVbZbgC",
            "PINTEREST": "http://ssqt.co/RLbZbgC",
            "WHATSAPP": "http://ssqt.co/mibZbgC",
            "FACEBOOK": "http://ssqt.co/mTbZbgC",
            "LINKEDIN": "http://ssqt.co/m1bZbgC",
            "DIRECT": "http://ssqt.co/mPbZbgC",
            "LINEMESSENGER": "http://ssqt.co/mybZbgC",
            "FBMESSENGER": "http://ssqt.co/m4bZbgC",
            "SMS": "http://ssqt.co/mObZbgC",
            "EMAIL": "http://ssqt.co/mbbZbgC"
        },
        "POPUP": {
            "WHATSAPP": "http://ssqt.co/mFbZbgC",
            "TWITTER": "http://ssqt.co/mMbZbgC",
            "UNKNOWN": "http://ssqt.co/mBbZbgC",
            "PINTEREST": "http://ssqt.co/RzbZbgC",
            "FACEBOOK": "http://ssqt.co/m9bZbgC",
            "LINKEDIN": "http://ssqt.co/m7bZbgC",
            "DIRECT": "http://ssqt.co/m5bZbgC",
            "LINEMESSENGER": "http://ssqt.co/mDbZbgC",
            "SMS": "http://ssqt.co/mabZbgC",
            "FBMESSENGER": "http://ssqt.co/mhbZbgC",
            "EMAIL": "http://ssqt.co/mobZbgC"
        },
        "MOBILE": {
            "TWITTER": "http://ssqt.co/mCbZbgC",
            "UNKNOWN": "http://ssqt.co/mjbZbgC",
            "PINTEREST": "http://ssqt.co/RRbZbgC",
            "WHATSAPP": "http://ssqt.co/msbZbgC",
            "FACEBOOK": "http://ssqt.co/mnbZbgC",
            "LINKEDIN": "http://ssqt.co/m3bZbgC",
            "DIRECT": "http://ssqt.co/mebZbgC",
            "LINEMESSENGER": "http://ssqt.co/mdbZbgC",
            "FBMESSENGER": "http://ssqt.co/mUbZbgC",
            "SMS": "http://ssqt.co/mNbZbgC",
            "EMAIL": "http://ssqt.co/mEbZbgC"
        },
        "HOSTED": {
            "TWITTER": "http://ssqt.co/mSbZbgC",
            "WHATSAPP": "http://ssqt.co/mrbZbgC",
            "PINTEREST": "http://ssqt.co/RmbZbgC",
            "UNKNOWN": "http://ssqt.co/mAbZbgC",
            "FACEBOOK": "http://ssqt.co/mubZbgC",
            "LINKEDIN": "http://ssqt.co/mYbZbgC",
            "DIRECT": "http://ssqt.co/mtbZbgC",
            "LINEMESSENGER": "http://ssqt.co/mWbZbgC",
            "SMS": "http://ssqt.co/mqbZbgC",
            "FBMESSENGER": "http://ssqt.co/mKbZbgC",
            "EMAIL": "http://ssqt.co/mlbZbgC"
        },
        "UNKNOWN": {
            "UNKNOWN": "http://ssqt.co/mzbZbgC",
            "TWITTER": "http://ssqt.co/mRbZbgC",
            "WHATSAPP": "http://ssqt.co/mIbZbgC",
            "PINTEREST": "http://ssqt.co/mpbZbgC",
            "FACEBOOK": "http://ssqt.co/mmbZbgC",
            "LINKEDIN": "http://ssqt.co/m6bZbgC",
            "DIRECT": "http://ssqt.co/mvbZbgC",
            "LINEMESSENGER": "http://ssqt.co/m8bZbgC",
            "FBMESSENGER": "http://ssqt.co/m0bZbgC",
            "SMS": "http://ssqt.co/mkbZbgC",
            "EMAIL": "http://ssqt.co/mLbZbgC"
        },
        "EMBED": {
            "WHATSAPP": "http://ssqt.co/mZbZbgC",
            "UNKNOWN": "http://ssqt.co/mXbZbgC",
            "PINTEREST": "http://ssqt.co/mfbZbgC",
            "TWITTER": "http://ssqt.co/mcbZbgC",
            "FACEBOOK": "http://ssqt.co/mwbZbgC",
            "LINKEDIN": "http://ssqt.co/mHbZbgC",
            "DIRECT": "http://ssqt.co/mQbZbgC",
            "LINEMESSENGER": "http://ssqt.co/mxbZbgC",
            "SMS": "http://ssqt.co/m2bZbgC",
            "FBMESSENGER": "http://ssqt.co/mgbZbgC",
            "EMAIL": "http://ssqt.co/mJbZbgC"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Block user

POST /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/block

Block a user from making successful referrals based upon their user and account id. More information about blocking users from participating in your referral program can be found in the SaaSquatch docs.

Tags: User Authentication: APIKey

Arguments

Required accountId
string

The id of the Account associated with the User being blocked. See Shared vs. Solo accounts for more info.

Required userId
string

The id of the User to block

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/block \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d ''
        

Returns

Example Response

HTTP 200
{}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 403
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Unblock user

POST /api/v1/{tenant_alias}/account/{accountId}/user/{userId}/unblock

Unblock a user based upon their user and account id. More information about blocking users from participating in your referral program can be found in the SaaSquatch docs.

Tags: User Authentication: APIKey

Arguments

Required accountId
string

The id of the Account associated with the User being unblocked. See Shared vs. Solo accounts for more info.

Required userId
string

The id of the User to unblock

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/unblock \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d ''
        

Returns

Example Response

HTTP 200
{}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 403
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

List users

GET /api/v1/{tenant_alias}/users

List all of the Users in your Referral SaaSquatch tenant. This method is the primary way of getting a full list of everyone that has been identified through the API, Squatch.js or mobile widgets. This method supports pagination using the parameters for limit and offset to iterate through a very large list of records. You can also search for particular users using the query method. To find information about which users have completed referrals, use the List referrals method.

Tags: User Authentication: APIKey

Arguments

query
string

A search query that can be used to filter users by email, name or ID.

limit
integer

A limit on the number of results returned. Defaults to 10.

offset
integer

When included offsets the first result returns in the list. Use this to paginate through a long list of results. Defaults to 0

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/users \
        -u :API_KEY \
        
        

Returns

users
array

A list of User objects. This is the actual data in this list envelope.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

count
integer

The number of results returned in this list, see totalCount for all rows.

totalCount
integer

The total number of results available overall, see count for the number of rows in this list.

Example Response

HTTP 200
{
    "count": 1,
    "totalCount": 1,
    "users": [
        {
            "id": "14125",
            "accountId": "89842",
            "email": "mark@example.com",
            "firstName": "Mark",
            "lastName": "Testerson",
            "referralCode": "MARKTESTER",
            "imageUrl": "",
            "dateCreated": 1414452680584,
            "emailHash": "a65a76ba72e5a0b1e6253efce357abb6"
        }
    ]
}

Lookup a referral code

GET /api/v1/{tenant_alias}/code/{code}

Looks up a referral code and the attached details

Tags: Referral Code Authentication: APIKey

Arguments

Required code
string

The referral code to look up. E.g. "BOBTESTERSON"

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/code/{code} \
        -u :API_KEY \
        
        

Returns

code
string

The unique identifier for the code. E.g. "BOBTESTERSON"

dateCreated
integer

The date the code was created.

referrerName
string

The name of the owner of this code. E.g. "Bob Testerson"

reward
object

Details of the reward that could be earned -- but is not yet earned.

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, or CREDIT

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with types TIME_CREDIT or CREDIT

credit
integer

The amount of credit that this referral code is valid for. e.g. for $20 this object would have credit=2000, unit="cents". Only works for TIME_CREDIT, CREDIT

discountPercent
integer

The percent discount that the referral code is valid for. E.g. "10" for "10%". Only works with PCT_DISCOUNT

monthsDiscountIsValid
integer

When this reward is set to expire.

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

Example Response

HTTP 200
{
    "code": "BOBTESTERSON",
    "dateCreated": 1411600868797,
    "referrerName": "Bob Testerson",
    "reward": {
        "id": "5462600de4b09b1c41108f2e",
        "type": "PCT_DISCOUNT",
        "dateGiven": 1415733261275,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "discountPercent": 20,
        "unit": "%"
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

List referrals

GET /api/v1/{tenant_alias}/referrals

List all of the referrals in your Referral SaaSquatch tenant. This method is the primary way of getting a full list of everyone that has made a referral and everyone that has been referred, and supports pagination using the parameters for limit and offset to iterate through a very large list of records. You can also use the query parameters for referringAccountId and referringUserId to filters this list of referrals to only include those made by a given user.

Tags: Referral Authentication: APIKey

Arguments

referringAccountId
string

When included, filters the results to only referrals that were referred users with this AccountId

referringUserId
string

When included, filters the results to only referrals that were referred users with this UserId

dateReferralPaid
string

When included, filters the results either to the exact timestamp if only one value is given, or a range if devided by a comma. I.E. 0,123412451 gives all referrals that converted between 0 and 123412451.

dateReferralEnded
string

When included, filters the results either to the exact timestamp if only one value is given, or a range if devided by a comma. I.E. 0,123412451 gives all referrals that ended between 0 and 123412451.

referredModerationStatus
string

When included, filters the result to only include referred users with that status. Statuses that are accepted: PENDING, APPROVED or DENIED.

referrerModerationStatus
string

When included, filters the result to only include referrers with that status. Statuses that are accepted: PENDING, APPROVED or DENIED.

limit
integer

A limit on the number of results returned. Defaults to 10.

offset
integer

When included offsets the first result returns in the list. Use this to paginate through a long list of results. Defaults to 0

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/referrals \
        -u :API_KEY \
        
        

Returns

referrals
array

A list of Referral objects. This is the actual data in this list envelope.

id
string

Unique identifier for the Referral object

referredUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referrerUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

referrerReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

moderationStatus
string

When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated.

Possible values: PENDING, or ACTIONED

referredModerationStatus
string

Used to identify the referred user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

referrerModerationStatus
string

Used to identify the referrer user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

fraudSignals
object

Information about signals of potential fraud on the referral

name
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

ip
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

email
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

rate
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

count
integer

The number of results returned in this list, see totalCount for all rows.

totalCount
integer

The total number of results available overall, see count for the number of rows in this list.

Example Response

HTTP 200
{
    "count": 2,
    "totalCount": 4,
    "referrals": [
        {
            "id": "5462600de4b09b1c41108f28",
            "referredUser": {
                "id": "898746321",
                "accountId": "987321",
                "email": "hello@example.com",
                "firstName": "Henk",
                "lastName": "Thompson",
                "referralCode": "HENKTHOMPSON",
                "imageUrl": "",
                "firstSeenIP": "10.230.163.157",
                "lastSeenIP": "184.66.242.57",
                "dateCreated": 1467222395030,
                "emailHash": "180bc1412a038746af9b37fb782724a2",
                "referralSource": "http://unifiedtestapp.herokuapp.com/",
                "locale": null,
                "shareLinks": {
                    "shareLink": "http://ssqt.co/mvbcF5",
                    "facebookShareLink": "http://ssqt.co/mmbcF5",
                    "twitterShareLink": "http://ssqt.co/mRbcF5",
                    "emailShareLink": "http://ssqt.co/mLbcF5",
                    "linkedinShareLink": "http://ssqt.co/mLbcF5",
                    "mobileShareLink": "http://ssqt.co/mebcF5",
                    "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                    "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                    "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                    "EMBED": {
                        "shareLink": "http://ssqt.co/mQbcF5",
                        "facebookShareLink": "http://ssqt.co/mwbcF5",
                        "twitterShareLink": "http://ssqt.co/mcbcF5",
                        "emailShareLink": "http://ssqt.co/mJbcF5",
                        "linkedinShareLink": "http://ssqt.co/mHbcF5"
                    },
                    "POPUP": {
                        "shareLink": "http://ssqt.co/m5bcF5",
                        "facebookShareLink": "http://ssqt.co/m9bcF5",
                        "twitterShareLink": "http://ssqt.co/mMbcF5",
                        "emailShareLink": "http://ssqt.co/mobcF5",
                        "linkedinShareLink": "http://ssqt.co/m7bcF5"
                    },
                    "HOSTED": {
                        "shareLink": "http://ssqt.co/mtbcF5",
                        "facebookShareLink": "http://ssqt.co/mubcF5",
                        "twitterShareLink": "http://ssqt.co/mSbcF5",
                        "emailShareLink": "http://ssqt.co/mlbcF5",
                        "linkedinShareLink": "http://ssqt.co/mYbcF5"
                    },
                    "MOBILE": {
                        "shareLink": "http://ssqt.co/mebcF5",
                        "facebookShareLink": "http://ssqt.co/mnbcF5",
                        "twitterShareLink": "http://ssqt.co/mCbcF5",
                        "emailShareLink": "http://ssqt.co/mEbcF5",
                        "linkedinShareLink": "http://ssqt.co/m3bcF5"
                    },
                    "EMAIL": {
                        "shareLink": "http://ssqt.co/mPbcF5",
                        "facebookShareLink": "http://ssqt.co/mTbcF5",
                        "twitterShareLink": "http://ssqt.co/mGbcF5",
                        "emailShareLink": "http://ssqt.co/mbbcF5",
                        "linkedinShareLink": "http://ssqt.co/m1bcF5"
                    }
                }
            },
            "referrerUser": {
                "id": "898746321",
                "accountId": "987321",
                "email": "hello@example.com",
                "firstName": "Henk",
                "lastName": "Thompson",
                "referralCode": "HENKTHOMPSON",
                "imageUrl": "",
                "firstSeenIP": "10.230.163.157",
                "lastSeenIP": "184.66.242.57",
                "dateCreated": 1467222395030,
                "emailHash": "180bc1412a038746af9b37fb782724a2",
                "referralSource": "http://unifiedtestapp.herokuapp.com/",
                "locale": null,
                "shareLinks": {
                    "shareLink": "http://ssqt.co/mvbcF5",
                    "facebookShareLink": "http://ssqt.co/mmbcF5",
                    "twitterShareLink": "http://ssqt.co/mRbcF5",
                    "emailShareLink": "http://ssqt.co/mLbcF5",
                    "linkedinShareLink": "http://ssqt.co/mLbcF5",
                    "mobileShareLink": "http://ssqt.co/mebcF5",
                    "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                    "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                    "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                    "EMBED": {
                        "shareLink": "http://ssqt.co/mQbcF5",
                        "facebookShareLink": "http://ssqt.co/mwbcF5",
                        "twitterShareLink": "http://ssqt.co/mcbcF5",
                        "emailShareLink": "http://ssqt.co/mJbcF5",
                        "linkedinShareLink": "http://ssqt.co/mHbcF5"
                    },
                    "POPUP": {
                        "shareLink": "http://ssqt.co/m5bcF5",
                        "facebookShareLink": "http://ssqt.co/m9bcF5",
                        "twitterShareLink": "http://ssqt.co/mMbcF5",
                        "emailShareLink": "http://ssqt.co/mobcF5",
                        "linkedinShareLink": "http://ssqt.co/m7bcF5"
                    },
                    "HOSTED": {
                        "shareLink": "http://ssqt.co/mtbcF5",
                        "facebookShareLink": "http://ssqt.co/mubcF5",
                        "twitterShareLink": "http://ssqt.co/mSbcF5",
                        "emailShareLink": "http://ssqt.co/mlbcF5",
                        "linkedinShareLink": "http://ssqt.co/mYbcF5"
                    },
                    "MOBILE": {
                        "shareLink": "http://ssqt.co/mebcF5",
                        "facebookShareLink": "http://ssqt.co/mnbcF5",
                        "twitterShareLink": "http://ssqt.co/mCbcF5",
                        "emailShareLink": "http://ssqt.co/mEbcF5",
                        "linkedinShareLink": "http://ssqt.co/m3bcF5"
                    },
                    "EMAIL": {
                        "shareLink": "http://ssqt.co/mPbcF5",
                        "facebookShareLink": "http://ssqt.co/mTbcF5",
                        "twitterShareLink": "http://ssqt.co/mGbcF5",
                        "emailShareLink": "http://ssqt.co/mbbcF5",
                        "linkedinShareLink": "http://ssqt.co/m1bcF5"
                    }
                }
            },
            "referredReward": {
                "id": "5462600de4b09b1c41108f2e",
                "type": "PCT_DISCOUNT",
                "dateGiven": 1415733261275,
                "dateExpires": null,
                "dateCancelled": null,
                "accountId": "613611",
                "userId": "876343",
                "cancellable": true,
                "rewardSource": "REFERRED",
                "discountPercent": 20,
                "unit": "%"
            },
            "referrerReward": null,
            "moderationStatus": "ACTIONED",
            "dateReferralStarted": 1415733261238,
            "dateReferralPaid": null,
            "dateReferralEnded": null,
            "dateModerated": 1427410131006,
            "referredModerationStatus": "APPROVED",
            "referrerModerationStatus": "APPROVED"
        },
        {
            "id": "546270a6e4b0c1871186a920",
            "referredUser": {
                "id": "898746321",
                "accountId": "987321",
                "email": "hello@example.com",
                "firstName": "Henk",
                "lastName": "Thompson",
                "referralCode": "HENKTHOMPSON",
                "imageUrl": "",
                "firstSeenIP": "10.230.163.157",
                "lastSeenIP": "184.66.242.57",
                "dateCreated": 1467222395030,
                "emailHash": "180bc1412a038746af9b37fb782724a2",
                "referralSource": "http://unifiedtestapp.herokuapp.com/",
                "locale": null,
                "shareLinks": {
                    "shareLink": "http://ssqt.co/mvbcF5",
                    "facebookShareLink": "http://ssqt.co/mmbcF5",
                    "twitterShareLink": "http://ssqt.co/mRbcF5",
                    "emailShareLink": "http://ssqt.co/mLbcF5",
                    "linkedinShareLink": "http://ssqt.co/mLbcF5",
                    "mobileShareLink": "http://ssqt.co/mebcF5",
                    "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                    "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                    "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                    "EMBED": {
                        "shareLink": "http://ssqt.co/mQbcF5",
                        "facebookShareLink": "http://ssqt.co/mwbcF5",
                        "twitterShareLink": "http://ssqt.co/mcbcF5",
                        "emailShareLink": "http://ssqt.co/mJbcF5",
                        "linkedinShareLink": "http://ssqt.co/mHbcF5"
                    },
                    "POPUP": {
                        "shareLink": "http://ssqt.co/m5bcF5",
                        "facebookShareLink": "http://ssqt.co/m9bcF5",
                        "twitterShareLink": "http://ssqt.co/mMbcF5",
                        "emailShareLink": "http://ssqt.co/mobcF5",
                        "linkedinShareLink": "http://ssqt.co/m7bcF5"
                    },
                    "HOSTED": {
                        "shareLink": "http://ssqt.co/mtbcF5",
                        "facebookShareLink": "http://ssqt.co/mubcF5",
                        "twitterShareLink": "http://ssqt.co/mSbcF5",
                        "emailShareLink": "http://ssqt.co/mlbcF5",
                        "linkedinShareLink": "http://ssqt.co/mYbcF5"
                    },
                    "MOBILE": {
                        "shareLink": "http://ssqt.co/mebcF5",
                        "facebookShareLink": "http://ssqt.co/mnbcF5",
                        "twitterShareLink": "http://ssqt.co/mCbcF5",
                        "emailShareLink": "http://ssqt.co/mEbcF5",
                        "linkedinShareLink": "http://ssqt.co/m3bcF5"
                    },
                    "EMAIL": {
                        "shareLink": "http://ssqt.co/mPbcF5",
                        "facebookShareLink": "http://ssqt.co/mTbcF5",
                        "twitterShareLink": "http://ssqt.co/mGbcF5",
                        "emailShareLink": "http://ssqt.co/mbbcF5",
                        "linkedinShareLink": "http://ssqt.co/m1bcF5"
                    }
                }
            },
            "referrerUser": {
                "id": "898746321",
                "accountId": "987321",
                "email": "hello@example.com",
                "firstName": "Henk",
                "lastName": "Thompson",
                "referralCode": "HENKTHOMPSON",
                "imageUrl": "",
                "firstSeenIP": "10.230.163.157",
                "lastSeenIP": "184.66.242.57",
                "dateCreated": 1467222395030,
                "emailHash": "180bc1412a038746af9b37fb782724a2",
                "referralSource": "http://unifiedtestapp.herokuapp.com/",
                "locale": null,
                "shareLinks": {
                    "shareLink": "http://ssqt.co/mvbcF5",
                    "facebookShareLink": "http://ssqt.co/mmbcF5",
                    "twitterShareLink": "http://ssqt.co/mRbcF5",
                    "emailShareLink": "http://ssqt.co/mLbcF5",
                    "linkedinShareLink": "http://ssqt.co/mLbcF5",
                    "mobileShareLink": "http://ssqt.co/mebcF5",
                    "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
                    "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
                    "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
                    "EMBED": {
                        "shareLink": "http://ssqt.co/mQbcF5",
                        "facebookShareLink": "http://ssqt.co/mwbcF5",
                        "twitterShareLink": "http://ssqt.co/mcbcF5",
                        "emailShareLink": "http://ssqt.co/mJbcF5",
                        "linkedinShareLink": "http://ssqt.co/mHbcF5"
                    },
                    "POPUP": {
                        "shareLink": "http://ssqt.co/m5bcF5",
                        "facebookShareLink": "http://ssqt.co/m9bcF5",
                        "twitterShareLink": "http://ssqt.co/mMbcF5",
                        "emailShareLink": "http://ssqt.co/mobcF5",
                        "linkedinShareLink": "http://ssqt.co/m7bcF5"
                    },
                    "HOSTED": {
                        "shareLink": "http://ssqt.co/mtbcF5",
                        "facebookShareLink": "http://ssqt.co/mubcF5",
                        "twitterShareLink": "http://ssqt.co/mSbcF5",
                        "emailShareLink": "http://ssqt.co/mlbcF5",
                        "linkedinShareLink": "http://ssqt.co/mYbcF5"
                    },
                    "MOBILE": {
                        "shareLink": "http://ssqt.co/mebcF5",
                        "facebookShareLink": "http://ssqt.co/mnbcF5",
                        "twitterShareLink": "http://ssqt.co/mCbcF5",
                        "emailShareLink": "http://ssqt.co/mEbcF5",
                        "linkedinShareLink": "http://ssqt.co/m3bcF5"
                    },
                    "EMAIL": {
                        "shareLink": "http://ssqt.co/mPbcF5",
                        "facebookShareLink": "http://ssqt.co/mTbcF5",
                        "twitterShareLink": "http://ssqt.co/mGbcF5",
                        "emailShareLink": "http://ssqt.co/mbbcF5",
                        "linkedinShareLink": "http://ssqt.co/m1bcF5"
                    }
                }
            },
            "referredReward": {
                "id": "5462600de4b09b1c41108f2e",
                "type": "PCT_DISCOUNT",
                "dateGiven": 1415733261275,
                "dateExpires": null,
                "dateCancelled": null,
                "accountId": "613611",
                "userId": "876343",
                "cancellable": true,
                "rewardSource": "REFERRED",
                "discountPercent": 20,
                "unit": "%"
            },
            "referrerReward": {
                "id": "5462600de4b09b1c41108f2e",
                "type": "PCT_DISCOUNT",
                "dateGiven": 1415733261275,
                "dateExpires": null,
                "dateCancelled": null,
                "accountId": "613611",
                "userId": "876343",
                "cancellable": true,
                "rewardSource": "REFERRED",
                "discountPercent": 20,
                "unit": "%"
            },
            "moderationStatus": "ACTIONED",
            "dateReferralStarted": 1415737510411,
            "dateReferralPaid": 1415737557217,
            "dateReferralEnded": null,
            "dateModerated": 1427410131029,
            "referredModerationStatus": "APPROVED",
            "referrerModerationStatus": "APPROVED",
            "fraudSignals": {
                "ip": {
                    "message": "Referrer and referred came from the same IP",
                    "score": 50
                }
            }
        }
    ]
}

Lookup a Referral

GET /api/v1/{tenant_alias}/referrals/{referralId}

Looks up a single Referral object by it's associated id. This method is helpful for looking into a particular referral of interest. Since it requires the id of the referral to be specified, it isn't applicable for querying all referrals to find those made by a particular user or account. To query for those referrals use the list referrals endpoint instead with query parameters specified.

Tags: Referral Authentication: APIKey

Arguments

Required referralId
string

The id of the referral to look up

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/referrals/{referralId} \
        -u :API_KEY \
        
        

Returns

id
string

Unique identifier for the Referral object

referredUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referrerUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

referrerReward
object

Rewards are used in SaaSquatch to track the credits, discounts, gift cards and other prizes that a User earns.

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

moderationStatus
string

When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated.

Possible values: PENDING, or ACTIONED

referredModerationStatus
string

Used to identify the referred user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

referrerModerationStatus
string

Used to identify the referrer user's moderation status and affect Reward cancellation.

Possible values: PENDING, APPROVED, or DENIED

fraudSignals
object

Information about signals of potential fraud on the referral

name
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

ip
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

email
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

rate
object

Information about an individual fraud signal on the referral

message
String

A human readable description of the fraud signal. For example: 'Referrer and referred have very similar names'

score
integer

A numeric score that describes the severity of the fraud signal.

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

Example Response

HTTP 200
"546270a6e4b0c1871186a920"
{
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
{
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
{
    "id": "5462600de4b09b1c41108f2e",
    "type": "PCT_DISCOUNT",
    "dateGiven": 1415733261275,
    "dateExpires": null,
    "dateCancelled": null,
    "accountId": "613611",
    "userId": "876343",
    "cancellable": true,
    "rewardSource": "REFERRED",
    "discountPercent": 20,
    "unit": "%"
}
{
    "id": "5462600de4b09b1c41108f2e",
    "type": "PCT_DISCOUNT",
    "dateGiven": 1415733261275,
    "dateExpires": null,
    "dateCancelled": null,
    "accountId": "613611",
    "userId": "876343",
    "cancellable": true,
    "rewardSource": "REFERRED",
    "discountPercent": 20,
    "unit": "%"
}
"ACTIONED"
1415737510411
1415737557217
""
1427410131029
"APPROVED"
"APPROVED"
{
    "ip": {
        "message": "Referrer and referred came from the same IP",
        "score": 50
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Moderate referrals

POST /api/v1/{tenant_alias}/referrals/moderate

Moderates one or several referrals by either approving or denying. Moderation can apply to one side of a referral, the other side, or both sides (Referrer and Referred). When a referral is denied, the associated reward will be "cancelled". A referral can be moderated several times, subsequently cancelling and un-cancelling the associated reward or rewards, and can be done as long as the associated reward is cancellable. Some rewards such as the coupons automatically generated by Referral SaaSquatch into Stripe and Recurly are not cancellable and requests to change the moderation will error.

Tags: Referral Authentication: APIKey

Arguments

Required moderationBulkRequest
JSON Body

Details of the referrals to be moderated

Required actions
array

A list of individual moderation actions for specific referrals. Limited to a maximum of 100 actions per request

Required referralId
string

The id of the Referral to be moderated

Required action
string

The type of moderation action.

Possible values: APPROVED, DENIED, REFERRER_APPROVED, REFERRED_APPROVED, REFERRER_DENIED, or REFERRED_DENIED

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/referrals/moderate \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "actions": [
        {
            "referralId": "546270a6e4b0c1871186a920",
            "action": "REFERRED_DENIED"
        }
    ]
}'
        

Returns

Example Response

HTTP 200

List reward balances

GET /api/v1/{tenant_alias}/reward/balance

Looks up the balance for all rewards of the same type and units.

Tags: Reward Balance Authentication: APIKey

Arguments

Required accountId
string

The ID of the account to look up

userId
string

Filters rewards by user.id.

rewardTypeFilter
string

Filters rewards by type.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/reward/balance?accountId= \
        -u :API_KEY \
        
        

Returns

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with types TIME_CREDIT, and CREDIT

count
integer

"The number of rewards earned. Usually is equal to the number of successful referrals made. E.g. An account has $80 of credit due to the referral program. $60 from making referrals, $20 from being referred. The count would be 4 rewards, each worth $20. Only works for TIME_CREDIT, and CREDIT"

totalAssignedCredit
integer

The total assignedCredit for all reward credits of the same unit type. Only works with types: TIME_CREDIT, CREDIT

totalRedeemedCredit
integer

The total redeemedCredit for all reward credits of the same unit type. Only works with types: TIME_CREDIT, CREDIT

totalDiscountPercent
integer

The total discountPercent from all rewards. Only works with types: PCT_DISCOUNT

referredDiscountPercent
integer

The total discountPercent from rewards with rewardSource = REFERRED Only works with types: PCT_DISCOUNT

referrerDiscountPercent
integer

The total discountPercent from rewards with rewardSource = FRIEND_SIGNUP Only works with types: PCT_DISCOUNT

totalFuelTankCodes
integer

The number of earned fueltank rewards. Only works with type: FUELTANK

Example Response

HTTP 200
[
    {
        "type": "CREDIT",
        "count": "4",
        "totalAssignedCredit": "10000",
        "totalRedeemedCredit": "0",
        "unit": "cents"
    },
    {
        "type": "PCT_DISCOUNT",
        "totalDiscountPercent": "30",
        "referredDiscountPercent": "10",
        "referrerDiscountPercent": "20"
    },
    {
        "type": "FUELTANK",
        "totalFuelTankCodes": 1
    }
]

Debit a reward balance

POST /api/v1/{tenant_alias}/credit/bulkredeem

Used to redeem the credit earned from a referral program. Permanently debits an account balance. Works with: TIME_CREDIT and CREDIT

Tags: Reward Balance Authentication: APIKey

Arguments

Required debit
JSON Body

Details of the debit

Required accountId
string

The ID of the account to be debitted.

Required unit
string

The type of credit to be debitted. E.g. "free-months" or "cents"

Required amount
integer

The amount of credit to be debitted.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/credit/bulkredeem \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "accountId": "abc123",
    "unit": "cents",
    "amount": 200
}'
        

Returns

creditRedeemed
integer

The amount of credit that was just debitted.

creditAvailable
integer

The remaining credit in this account of the same unit type.

unit
string

The type of credit that was just debitted.

Example Response

HTTP 200
{
    "creditRedeemed": 200,
    "creditAvailable": 0,
    "unit": "cents"
}

List an account's rewards

GET /api/v1/{tenant_alias}/reward

Looks up a list of single rewards

Tags: Reward Authentication: APIKey

Arguments

Required accountId
string

The ID of the account to look up

userId
string

Filters rewards by user.id.

rewardTypeFilter
string

Filters rewards by type.

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/reward?accountId= \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

Example Response

HTTP 200
[
    {
        "id": "582142aae4b05442a5fa01a5",
        "type": "CREDIT",
        "dateGiven": 1478574762838,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "unit": "CENTS",
        "assignedCredit": 2500,
        "redeemedCredit": 0,
        "redemptions": [
            {
                "id": "5462600de4b09b1c41238f2f",
                "dateRedeemed": 1415733261275,
                "quantityRedeemed": 2000
            }
        ],
        "name": "Dollar Credit",
        "currency": null
    },
    {
        "id": "5462600de4b09b1c41108f2e",
        "type": "PCT_DISCOUNT",
        "dateGiven": 1415733261275,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "discountPercent": 20,
        "unit": "%"
    },
    {
        "id": "12345678e4b1234aff143be5",
        "type": "FUELTANK",
        "dateGiven": 1497907329060,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "abc_122",
        "userId": "abc_122",
        "cancellable": true,
        "rewardSource": "FRIEND_SIGNUP",
        "fuelTankCode": "CODE8",
        "unit": "CENTS",
        "amount": 1000,
        "fueltankType": "CREDIT"
    }
]

Lookup a single reward

GET /api/v1/{tenant_alias}/reward/{id}/

Used to lookup an individual reward using the ID of the reward. Works with: CREDIT, PCT_DISCOUNT, and FUELTANK

Tags: Reward Authentication: APIKey

Arguments

Required id
string

The ID of the specific reward to lookup

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/reward/{id}/ \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

Example Response

HTTP 201
[
    {
        "id": "582142aae4b05442a5fa01a5",
        "type": "CREDIT",
        "dateGiven": 1478574762838,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "unit": "CENTS",
        "assignedCredit": 2500,
        "redeemedCredit": 0,
        "redemptions": [
            {
                "id": "5462600de4b09b1c41238f2f",
                "dateRedeemed": 1415733261275,
                "quantityRedeemed": 2000
            }
        ],
        "name": "Dollar Credit",
        "currency": null
    },
    {
        "id": "5462600de4b09b1c41108f2e",
        "type": "PCT_DISCOUNT",
        "dateGiven": 1415733261275,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "discountPercent": 20,
        "unit": "%"
    },
    {
        "id": "12345678e4b1234aff143be5",
        "type": "FUELTANK",
        "dateGiven": 1497907329060,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "abc_122",
        "userId": "abc_122",
        "cancellable": true,
        "rewardSource": "FRIEND_SIGNUP",
        "fuelTankCode": "CODE8",
        "unit": "CENTS",
        "amount": 1000,
        "fueltankType": "CREDIT"
    }
]

Redeem a single reward

POST /api/v1/{tenant_alias}/credit/{id}/redeem

Used to redeem an individual credit earned from a referral program. Works with: TIME_CREDIT and CREDIT

Tags: Reward Authentication: APIKey

Arguments

Required id
string

The ID of the specific reward to be redeemed

Required debit
JSON Body

Details of the debit

Required amount
integer

The amount of credit to be debitted.

Required unit
string

The type of credit to be debitted. E.g. "free-months" or "cents"

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/credit/{id}/redeem \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "amount": 200,
    "unit": "cents"
}'
        

Returns

creditRedeemed
integer

The amount of credit that was just debitted.

creditAvailable
integer

The remaining credit in this account of the same unit type.

unit
string

The type of credit that was just debitted.

Example Response

HTTP 200
{
    "creditRedeemed": 200,
    "creditAvailable": 1800,
    "unit": "cents"
}

Cancel a single reward

POST /api/v1/{tenant_alias}/reward/{id}/cancel

Used to cancel an individual reward earned from a referral program. Works with: CREDIT, PCT_DISCOUNT, and FUELTANK

Tags: Reward Authentication: APIKey

Arguments

Required id
string

The ID of the specific reward to be cancelled

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/reward/{id}/cancel \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d ''
        

Returns

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

Example Response

HTTP 200
{
    "id": "582142aae4b05442a5fa01a5",
    "type": "CREDIT",
    "dateGiven": 1478574762838,
    "dateExpires": null,
    "dateCancelled": null,
    "accountId": "613611",
    "userId": "876343",
    "cancellable": true,
    "rewardSource": "REFERRED",
    "unit": "CENTS",
    "assignedCredit": 2500,
    "redeemedCredit": 0,
    "redemptions": [
        {
            "id": "5462600de4b09b1c41238f2f",
            "dateRedeemed": 1415733261275,
            "quantityRedeemed": 2000
        }
    ],
    "name": "Dollar Credit",
    "currency": null
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 400
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Create a single reward

POST /api/v1/{tenant_alias}/rewards/account/{accountId}/user/{userId}

Used to create a reward for a specified user. Note that the reward will only be redeemed automatically if the default program supports automatic redemption for the provided reward type (see the install guides for more on automatic redemption).

Tags: Reward Authentication: APIKey

Arguments

Required userId
string

The ID of the user that will be given the reward

Required accountId
string

The ID of the account that will be given the reward

Required reward
JSON Body

Details of the reward to create

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateExpires
integer

Timestamp of when this reward is set to expire. Works with: PCT_DISCOUNT

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'. Works with: TIME_CREDIT or CREDIT

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

currency
string

For programs that require a currency. Works with: CREDIT

fuelTankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK.

amount
integer

The earned quantity of the reward. Works with: FUELTANK

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/rewards/account/{accountId}/user/{userId} \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "type": "PCT_DISCOUNT",
    "dateExpires": 1471028988000,
    "cancellable": true,
    "discountPercent": 15
}'
        

Returns

id
string

The unique identifier for this reward

type
string

The type of reward.

Possible values: PCT_DISCOUNT, TIME_CREDIT, CREDIT, or FUELTANK

dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

cancellable
boolean

If a reward is cancellable then it may be revoked. If it has been cancelled then dateCancelled will be non-null.

rewardSource
string

The type of the source of the reward.

Possible values: FRIEND_SIGNUP, REFERRED, or MANUAL

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

discountPercent
integer

The percent discount. E.g. 10 means 10% Works with: PCT_DISCOUNT

name
string

The human-readable name of the reward.

description
string

The human-readable description of the reward. Works with: INTEGRATION

assignedCredit
integer

The earned quantity of the reward. Works with: TIME_CREDIT or CREDIT

redeemedCredit
integer

The redeemed quantity of the reward. Works with: TIME_CREDIT or CREDIT

redemptions
array
id
string

The unique identifier for this redemption

dateRedeemed
integer

Timestamp of when this redemption took place.

quantityRedeemed
integer

the amount of the reward that was redeemed.

currency
string

For programs that require a currency. Works with: CREDIT

amount
integer

The earned quantity of the reward. Works with: FUELTANK

fuelTankCode
string

The fueltank code associated with this reward. Works with: FUELTANK

fueltankType
string

The type of reward associated with this fueltank code. Works with: FUELTANK

Possible values: PCT_DISCOUNT, or CREDIT

Example Response

HTTP 201
[
    {
        "id": "582142aae4b05442a5fa01a5",
        "type": "CREDIT",
        "dateGiven": 1478574762838,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "unit": "CENTS",
        "assignedCredit": 2500,
        "redeemedCredit": 0,
        "redemptions": [
            {
                "id": "5462600de4b09b1c41238f2f",
                "dateRedeemed": 1415733261275,
                "quantityRedeemed": 2000
            }
        ],
        "name": "Dollar Credit",
        "currency": null
    },
    {
        "id": "5462600de4b09b1c41108f2e",
        "type": "PCT_DISCOUNT",
        "dateGiven": 1415733261275,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "613611",
        "userId": "876343",
        "cancellable": true,
        "rewardSource": "REFERRED",
        "discountPercent": 20,
        "unit": "%"
    },
    {
        "id": "12345678e4b1234aff143be5",
        "type": "FUELTANK",
        "dateGiven": 1497907329060,
        "dateExpires": null,
        "dateCancelled": null,
        "accountId": "abc_122",
        "userId": "abc_122",
        "cancellable": true,
        "rewardSource": "FRIEND_SIGNUP",
        "fuelTankCode": "CODE8",
        "unit": "CENTS",
        "amount": 1000,
        "fueltankType": "CREDIT"
    }
]

User Upsert

PUT /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}

This method updates/creates a user and an account and returns the user object representing that newly created user/account.

Because this call creates a user, it requires either a write token or an API key.

Tags: User Open Endpoint Authentication: APIKey UserJWT

Arguments

Required accountId
string

The account to upsert

Required userId
string

The user to upsert

Required user
JSON Body
Required id
string

The unique identifier provided for this user.

Required accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

referralCode
string

The referral code used for sharing by this user

paymentProviderId
string

The paymentProviderId is either the Stripe Customer ID, the Recurly Account ID, the Braintree Account ID or the Zuora Account ID. This field cannot be updated. Do not include this arguement on an API-only program, or unless looking to set it.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referredBy
object

An object containing information about who referred this user.

code
string

The referral code of the person that referred this account.

isConverted
bool

Whether or not this referred user has hit to goal post and the referral should be converted to kick of reward creation for the referrer.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

segments
array

A list of operations for adding and removing a user from segments.

Details about the supported operators and operations for adding and removing users from a segment can be found in our User Segmentation article.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X PUT https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "id": "219065",
    "accountId": "accc9065",
    "firstName": "Bob",
    "lastName": "Testerson",
    "email": "bob@example.com",
    "referable": true,
    "referralCode": "BOBTESTERSON",
    "paymentProviderId": "cus_8rVOAthabctvT6",
    "locale": "en_US",
    "referredBy": {
        "code": "JONDOE1234",
        "isConverted": true
    },
    "imageUrl": "https://www.example.com/profile/ab5111251125",
    "segments": [
        "segment1",
        "~segment2"
    ],
    "customFields": {
        "lastPurchaseDate": 1512152525513,
        "plan": "Pro+",
        "phone": 19055551234,
        "address": "123 Main st., City, Province, Country, H0H0H0",
        "shoeSize": 12.5,
        "currency": "CAD"
    }
}'
        

Returns

id
string

The unique identifier for this user.

cookieId
string

A unique identifier for this participant.

accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

referralCode
string

The referral code used for sharing by this user

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referredBy
object

An object containing information about who referred this user.

code
string

The referral code of the person that referred this account.

isConverted
bool

Whether or not this referred user has hit to goal post and the referral should be converted to kick of reward creation for the referrer.

newlyReferred
bool

Whether or not this referred user was referred recently.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

segments
array

A list of segments that a user is a member of.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "cookieId": "2523423436323",
    "accountId": "987321",
    "firstName": "Henk",
    "lastName": "Thompson",
    "email": "hello@example.com",
    "referable": true,
    "locale": null,
    "referralCode": "HENKTHOMPSON",
    "referredBy": {
        "code": "JONDOE1234",
        "isConverted": true,
        "newlyReferred": false
    },
    "imageUrl": "",
    "customFields": {
        "lastPurchaseDate": 1512152525513,
        "plan": "Pro+",
        "phone": 19055551234,
        "address": "123 Main st., City, Province, Country, H0H0H0",
        "shoeSize": 12.5,
        "currency": "CAD"
    },
    "segments": [
        "segment1",
        "segment3"
    ],
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 403

Create a user and account

POST /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}

This method creates a user and an account and returns the user object representing that newly created user/account.

Because this call creates a user, it requires either a write token or an API key.

Tags: User Open Endpoint Authentication: APIKey UserJWT

Arguments

Required accountId
string

The account to create

Required userId
string

The user to create

Required user
JSON Body
Required id
string

The unique identifier provided for this user.

Required accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

referralCode
string

The referral code used for sharing by this user

paymentProviderId
string

The paymentProviderId is either the Stripe Customer ID, the Recurly Account ID, the Braintree Account ID or the Zuora Account ID. This field cannot be updated. Do not include this arguement on an API-only program, or unless looking to set it.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referredBy
object

An object containing information about who referred this user.

code
string

The referral code of the person that referred this account.

isConverted
bool

Whether or not this referred user has hit to goal post and the referral should be converted to kick of reward creation for the referrer.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

segments
array

A list of operations for adding and removing a user from segments.

Details about the supported operators and operations for adding and removing users from a segment can be found in our User Segmentation article.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} \
        -u :API_KEY \
        -H "Content-Type: application/json" \
        -d '{
    "id": "219065",
    "accountId": "accc9065",
    "firstName": "Bob",
    "lastName": "Testerson",
    "email": "bob@example.com",
    "referable": true,
    "referralCode": "BOBTESTERSON",
    "paymentProviderId": "cus_8rVOAthabctvT6",
    "locale": "en_US",
    "referredBy": {
        "code": "JONDOE1234",
        "isConverted": true
    },
    "imageUrl": "https://www.example.com/profile/ab5111251125",
    "segments": [
        "segment1",
        "~segment2"
    ],
    "customFields": {
        "lastPurchaseDate": 1512152525513,
        "plan": "Pro+",
        "phone": 19055551234,
        "address": "123 Main st., City, Province, Country, H0H0H0",
        "shoeSize": 12.5,
        "currency": "CAD"
    }
}'
        

Returns

id
string

The unique identifier for this user.

cookieId
string

A unique identifier for this participant.

accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

referralCode
string

The referral code used for sharing by this user

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referredBy
object

An object containing information about who referred this user.

code
string

The referral code of the person that referred this account.

isConverted
bool

Whether or not this referred user has hit to goal post and the referral should be converted to kick of reward creation for the referrer.

newlyReferred
bool

Whether or not this referred user was referred recently.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

segments
array

A list of segments that a user is a member of.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "cookieId": "2523423436323",
    "accountId": "987321",
    "firstName": "Henk",
    "lastName": "Thompson",
    "email": "hello@example.com",
    "referable": true,
    "locale": null,
    "referralCode": "HENKTHOMPSON",
    "referredBy": {
        "code": "JONDOE1234",
        "isConverted": true,
        "newlyReferred": false
    },
    "imageUrl": "",
    "customFields": {
        "lastPurchaseDate": 1512152525513,
        "plan": "Pro+",
        "phone": 19055551234,
        "address": "123 Main st., City, Province, Country, H0H0H0",
        "shoeSize": 12.5,
        "currency": "CAD"
    },
    "segments": [
        "segment1",
        "segment3"
    ],
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 403

Lookup a user

GET /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}

Looks up a user based upon their id and returns their personal information including sharelinks. This endpoint requires a read token or an API key.

This is an Open Endpoint and disabled by default. Contact support to enable the open endpoints.

Tags: User Open Endpoint Authentication: APIKey UserJWT

Arguments

Required accountId
string

A valid Account ID that a user is associated with

Required userId
string

A valid User ID

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} \
        -u :API_KEY \
        
        

Returns

id
string

The unique identifier for this user.

cookieId
string

A unique identifier for this participant.

accountId
string

The unique identifier of the Account that this user belongs to.

firstName
string

The user's first name

lastName
string

The user's last name

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

referralCode
string

The referral code used for sharing by this user

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

referredBy
object

An object containing information about who referred this user.

code
string

The referral code of the person that referred this account.

isConverted
bool

Whether or not this referred user has hit to goal post and the referral should be converted to kick of reward creation for the referrer.

newlyReferred
bool

Whether or not this referred user was referred recently.

referable
boolean

Flag used by the SaaSquatch system to determine whether a user is able to be referred.

customFields
object

An object containing the custom fields for this user.

Learn more about the available custom field functionality in our Custom Fields Developer Guide

segments
array

A list of segments that a user is a member of.

shareLinks
object
readonly

Share link for an individual user.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

Example Response

HTTP 200
{
    "id": "898746321",
    "cookieId": "2523423436323",
    "accountId": "987321",
    "firstName": "Henk",
    "lastName": "Thompson",
    "email": "hello@example.com",
    "referable": true,
    "locale": null,
    "referralCode": "HENKTHOMPSON",
    "referredBy": {
        "code": "JONDOE1234",
        "isConverted": true,
        "newlyReferred": false
    },
    "imageUrl": "",
    "customFields": {
        "lastPurchaseDate": 1512152525513,
        "plan": "Pro+",
        "phone": 19055551234,
        "address": "123 Main st., City, Province, Country, H0H0H0",
        "shoeSize": 12.5,
        "currency": "CAD"
    },
    "segments": [
        "segment1",
        "segment3"
    ],
    "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
    }
}
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 401
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 403
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Delete a user

DELETE /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}

Delete a user in your SaaSquatch project. This endpoint will only delete a User on an Account (and not the Account itself). Learn more about Accounts vs. Users in our article on Account Structure.

To delete both the Account (and all the users on the account), use the Delete Account endpoint.

Learn more about deleting participants within your SaaSquatch project in our article on Participant Deletion

Include the doNotTrack query parameter as true to indicate to the SaaSquatch system that the user should not be able to be re-registered. Learn more about doNotTrack in our article on Participant Deletion

Tags: User Open Endpoint Authentication: APIKey

Arguments

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Required accountId
string

The ID of the account to be deleted

Required userId
string

The ID of the user to be deleted

doNotTrack
boolean

Do not track this user (this user cannot be re-registered in SaaSquatch). Learn more about doNotTrack in our article on Participant Deletion

Example Curl Request

curl -X DELETE https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId} \
        -u :API_KEY \
        
        

Returns

Example Response

HTTP 204
statusCode
integer

The HTTP status code of the error

message
string

The human-readable description of what went wrong. Use this to help you debug.

apiErrorCode
string

A machine error code

Example Response

HTTP 404

Lookup a user's share URLs

GET /api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}/shareurls

This API method returns the full list of referral share links for a user. Optional filter parameters are available to return only links of a specific share or engagement medium.

Share links are made available to a Referrer to provide to their friends and family to click and be directed to your referral program landing page.

The sharelinks are segmented by Engagement Medium, which is the channel the Referrer accessed the program to be able to share out their referral through. For each Engagment Medium, like EMBED, a link is provided for each available Share Medium. This segmentation is used to power the SaaSquatch analytics platform to provide information about how, and where, your users are interacting with your referral program. For example, The WHATSAPP link from the MOBILE section is intended to be used to indicated to our system that the Referrer accessed the referral program from a mobile device and shared their referral with their friend using Whatsapp. More information about available Engagement Mediums and Share Mediums can be found in our success center.

Share links work by dropping a tracking cookie in the user's browser when the user clicks the link and is directed to your referral program's landing page. This cookie includes the referral code of the Referrer that shared it. Once on your website this cookie can be read using the squatch.js autofill method and is also automatically picked up by our squatch.js library to connect referrals.

The referral code is also passed along to your referral program landing page as the URL parameter rsCode. For example http://ssqt.co/pZVp redirects to https://www.google.ca/?rsCode=JOHNDOE.

Tags: User Open Endpoint Authentication: APIKey UserJWT

Arguments

Required tenant_alias
string

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Required accountId
string

The ID of the account to look up

Required userId
string

Filters share urls by user.id.

engagementMedium
string

Filters share urls by engagementMedium.

shareMedium
string

Filters share urls by shareMedium.

Example Curl Request

curl -X GET https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}/shareurls \
        -u :API_KEY \
        
        

Returns

shareLinks
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

EMAIL
object

An individual user's Share links for use in the EMAIL engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

MOBILE
object

An individual user's Share links for use in the MOBILE engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

EMBED
object

An individual user's Share links for use in the EMBED engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

POPUP
object

An individual user's Share links for use in the POPUP engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string

The Share Link for the Direct shareMedium.

WHATSAPP
string

The Share Link for the Whatsapp shareMedium.

LINEMESSENGER
string

The Share Link for the Line Messenger shareMedium.

SMS
string

The Share Link for the SMS shareMedium.

FBMESSENGER
string

The Share Link for the Facebook Messenger shareMedium.

UNKNOWN
string

The Share Link for an unknown shareMedium.

LINKEDIN
string

The Share Link for the linkedIn shareMedium.

UNKNOWN
object

An individual user's Share links for use in an UNKNOWN engagementMedium.

EMAIL
string

The Share Link for the Email shareMedium.

FACEBOOK
string

The Share Link for the Facebook shareMedium.

PINTEREST
string

The Share Link for the Pinterest shareMedium.

TWITTER
string

The Share Link for the Twitter shareMedium.

DIRECT
string