friendbuy | Developer Docs
Navbar
  • Introduction
  • REST API
  • Webhooks
  • Client API Integrations
  • Embedded JavaScript
  • Introduction

    Welcome to our developer documentation! Here you will find complete reference information for each of Friendbuy’s integration methods.

    You will find JSON and JavaScript code examples in the right-hand pane and explanations of parameters and data models in the center pane.

    You can also visit our Help Center for end user documentation.

    Integration Methods

    Friendbuy offers several integration options for your applications:

    Security

    Your Friendbuy account comes with an access key and a secret key. The REST API uses Basic Authentication over HTTPS with the access key as the username and the secret key as the password. When invoking webhooks and integrating with APIs on your servers, Friendbuy will use the secret key to sign requests.

    Example Python Signature Computation

    from base64 import b64encode
    from hashlib import sha1
    import hmac
    def create_signature(api_secret, data):
        mac = hmac.new(api_secret.encode('utf-8'), data.encode('utf-8'), sha1)
        computed = b64encode(mac.digest())
        return computed.strip()
    

    You can verify the authenticity of a webhook request or client API integration from Friendbuy by analyzing its cryptographic signature. When Friendbuy sends a request to your endpoints, a signature is placed in the X-FRIENDBUY-SIGNATURE header (X-FRIENDBUY-SIGNATURE-V2 for custom reward validation), and is computed by Base64-encoding the HMAC-SHA1 hash of the request body with your Friendbuy secret key. To verify the signature:

    1. Calculate an HMAC-SHA1 composition of the JSON request body: HMAC(api_secret, json_body)
    2. Base64 encode the resulting value.
    3. If the Base64 encoded hash matches the signature header, the request is valid.

    To provide better flexibility for customers that have specific header signature requirements, Friendbuy can now include custom headers as an alternative to our standard signature. For example, you may wish Friendbuy to supply the access token ac33-pXAP under the header Api-Access-Token. Friendbuy will then append the header in each webhook or integration request:

    Api-Access-Token=ac33-pXAP

    Custom headers can also be utilized for purposes other than security. For instance, if your webhook or integration url handles posts from more than one service, a vendor identifier could be used to indicate Friendbuy is the requesting vendor, for example:

    Webhook-Consumer-Id=friendbuy

    This feature is supported for all webhooks and client integration callbacks. For more details about utilizing custom headers, please contact your Friendbuy Customer Success Manager.

    Content Types

    The content type for all requests and responses for the REST API, webhooks, and client integrations is application/json.

    Response Codes

    Each request to the REST API will return one or more of the following codes in the HTTP response, to indicate success or failure:

    Code Meaning Description
    200 OK The request was successful and the response body contains valid data
    201 Created An entity was successfully created
    202 Accepted The request for an asynchronous operation was received
    400 Bad Request The request was malformed or semantically invalid
    401 Unauthorized The request did not contain proper credentials
    404 Not Found The requested resource could not be found
    405 Method Not Allowed The endpoint does not permit access via the specified method
    406 Not Acceptable The request asked for a response in a format other than JSON
    409 Conflict The request attempted to create a resource with a key that already exits
    410 Gone The endpoint is no longer supported
    503 Service Unavailable The API is temporarily offline

    For webhooks and client integrations, the response codes expected from your servers are:

    Code Description
    200 The request was successful and the response body contains valid data
    non-200 The webhook or integration request failed

    Retries

    If the response from a webhook or integration call is not 200, Friendbuy will retry the same request once per hour for at most 24 hours, or until a 200 respsonse is received.

    Whitelisting

    Webhook and client API calls to your endpoints will originate from the following IP addresses:

    REST API

    The REST API provides the ability to programmatically retrieve and create data associated with a referral program and supports integration use cases such as:

    Each endpoint available through the REST API is documented below. For each endpoint, a complete technical specification of the data model is detailed in the Response Model found in the center pane. The right-hand pane contains an Example tab for easily viewing sample JSON responses.

    Base URL

    The Base URL of all REST API endpoints is https://api.friendbuy.com/v1.

    The Sandbox

    A Try It button is available for all endpoints. This feature simulates a working API integration where you can experiment with POST, PATCH, and GET calls, and receive associated responses. Note that the Base URL for sandbox API endpoints is https://developer-api.friendbuy.com/v1.

    The Try It feature makes use of a sandboxed database that is pre-populated with sample data. Data can be added to the sandbox by using Try It for a POST or PATCH call, such as POST /purchases. The database is reset to baseline sample data every 30 minutes, so feel free to experiment.

    The sandbox contains the following sample entities:

    Entity Type Values
    Campaigns ids 1...4
    Customers internal ids 1...3; account ids JAYZ, ALCP, and MNLS, respectively
    Referral Codes cP4...cP9, cP-, q5A...q5H, uxB...uxE, uxQ...uxS
    Shares ids 1..5 and 7..9
    Reminder emails id 14
    Purchases ids 1..6
    Conversions ids 1...8
    Rewards ids 1...8
    Coupon Codes SPECIAL1000...SPECIAL1004
    Email Opt Out Addresses 5 of them
    Email Opt Out Job Statuses ids 1..5

    Once the Try it button is clicked, the response from the sandbox is displayed in the Try It tab in the right-hand pane.

    Search Results

    Several of the API endpoints return paginated searches. In each case, the response returns a JSON payload with the following fields:

    SearchResults
    offset
    integer
    Zero-based index of first result on this page in the entirety of all results
    this_page_results_count
    integer
    Number of results on this page
    total_results_count
    integer
    Total number of search results across all pages
    results
    array
    Array of search results

    Campaigns

    In the context of the REST API, a campaign refers to the the name, configuration, and design of a given widget variant. Variants may be associated with others as part of a campaign group, as listed in the Friendbuy platform under Referral & Sharing > Widgets.

    GET /campaigns

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00",
          "archived": false,
          "objective": "referral",
          "distribution": 50,
          "is_champion": true,
          "campaign_group_id": "hm-NNz"
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of widget variants.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)

    Response Model

    Campaign
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    archived
    boolean
    Whether the campaign has been archived
    objective
    string
    One of referral, email_capture, or influencer
    distribution
    integer
    Percentage chance that the campaign’s widget will be served (100 for campaigns that have no variants)
    is_champion
    boolean
    Whether the campaign is designated as the champion of its group
    campaign_group_id
    string
    Identifier denoting the group (of campaign variants) to which the campaign belongs

    Customers

    For a more seamless integration of your referral program with Friendbuy, information about your logged in customers, including their account id, email address, and name, can be passed to us. This can be done at anytime through a Track Customer call via the Friendbuy JavaScript embedded on your site, or while sending purchase data via the POST /purchases endpoint. A new customer record will be created by Friendbuy each time a unique customer account id is passed to us.

    Customer data can be leveraged in Friendbuy to auto-populate widget fields, as well as tie referral activity to specific users as they are defined in your system.

    GET /customers

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of customers.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)
    account_id
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)

    Response Model

    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved

    GET /customers/{id}

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "account_id": "JAYZ",
      "id": "JAYZ",
      "first_name": "Jaylene",
      "last_name": "Zheng",
      "email": "jzheng@example.mil",
      "stripe_customer_id": "cus_Agg4bCEhno7A1E",
      "chargebee_customer_id": "4gkYnd21ouvW",
      "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
      "created_at": "2013-02-02T02:02:02.222220",
      "recent_shares": [
        {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      ],
      "recent_referral_codes": [
        {
          "referral_code": "uxC",
          "trackable_link": "http://fbuy.me/uxC",
          "destination_url": "http://mycompany.example.com/rewards/908",
          "referral_code_blacklisted": true
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves the complete details associated to a customer based on the customer’s Friendbuy id. See the description below for instructions on retrieving this id.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Response Model

    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.

    Referral Codes

    Referrals are tracked using a Friendbuy-generated identifier called a referral code (e.g. b7x). These short strings are bound to a particular widget variant, the advocate, and the associated referral method (widget share, reminder email, PURL). Referral codes give Friendbuy the ability to track referral link clicks, referral purchases, and establish attribution back to an advocate.

    All shares directly through a widget channel (e.g. email Twitter, Facebook) are assigned a new referral code for each share and channel. A personal URL or PURL (e.g. http://fbuy.me/c8z), however, always has the same referral code.

    POST /referral_codes

    • Example
    • Try It
    // Example Request Body
    {
      "campaign": {
        "id": 53
      },
      "customer": {
        "id": "C9911",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW"
      },
      "email": "morgan@example.com",
      "parameters": {
        "utm_medium": "referral",
        "utm_source": "Friendbuy"
      }
    }
    
    // Example Response (200 OK)
    {
      "type": "share",
      "referral_code": "uxC",
      "trackable_link": "http://fbuy.me/uxC",
      "destination_url": "http://mycompany.example.com/rewards/908",
      "referral_code_blacklisted": false,
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09",
          "facebook_profile": {
            "facebook_id": "100001724970193",
            "name": "Taylor Gomez",
            "first_name": "Taylor",
            "last_name": "Gomez",
            "email_address": "tgo@example.net",
            "gender": "female",
            "locale": "es_MX",
            "link": "http://www.facebook.com/100001724970193",
            "timezone": -7,
            "verified": true,
            "birthday": "1989-11-09T00:00:00.000Z",
            "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
            "friends_count": 75025
          },
          "twitter_profile": {
            "twitter_id": "308061521170129",
            "name": "Taylor Gomez",
            "screen_name": "taygomz17711",
            "time_zone": "America/Mexico_City",
            "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
            "homepage": "senate.example.mx/taylor_gomez",
            "location": "Antarctica",
            "language": "es",
            "utc_offset": -18000,
            "statuses_count": 89,
            "friends_count": 55,
            "followers_count": 75025,
            "favourites_count": 1597,
            "listed_count": 13,
            "is_translator": false,
            "contributors_enabled": true,
            "verified": true,
            "geo_enabled": true,
            "protected": false,
            "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
          }
        },
        "purchase": {
          "order_id": "PQZ-4181",
          "coupon_code": "COUPON123456",
          "date": "2017-04-01T11:07:40.904Z",
          "total": 15.97,
          "new_customer": "true",
          "email": "adrian@example.fi",
          "ip_address": "200.1.2.3",
          "products": [
            {
              "sku": "99P88Q77R",
              "quantity": 21,
              "price": 319.99
            }
          ],
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          }
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "additional_link_parameters": "{\"utm_medium\": \"referral\", \"utm_source\": \"Friendbuy\"}",
      "customer": {
        "account_id": "JAYZ",
        "id": "JAYZ",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW",
        "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
        "created_at": "2013-02-02T02:02:02.222220",
        "recent_shares": [
          {
            "id": 196418,
            "referral_code": "uxC",
            "message": {
              "id": "100001965159666_428859647189537",
              "content": "This is my favorite tennis racket ever",
              "network": "facebook"
            },
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "ip_address": "8.8.8.8",
            "newsletter_opt_in": true,
            "send_reminder": true,
            "created_at": "2017-01-13T19:18:38.239Z",
            "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
            "email_recipients": [
              "pele@example.br",
              "messi@example.ar"
            ],
            "sharer": {
              "name": "Taylor Gomez",
              "email": "tgo@example.net",
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        ],
        "recent_referral_codes": [
          {
            "referral_code": "uxC",
            "trackable_link": "http://fbuy.me/uxC",
            "destination_url": "http://mycompany.example.com/rewards/908",
            "referral_code_blacklisted": true
          }
        ]
      },
      "email": "alex@example.ca"
    }
    
    // To see live output, click the Try It button
    

    Generates a referral code for a specific advocate.

    When specifying a campaign id and either a customer id or an email address in the request body, this endpoint first checks to see if there is an existing referral code for that advocate/campaign combination. If found, the referral code is updated with any new information specified in the body. If not found, a new referral code will be created.

    If customer id is provided in the request, the newly generated referral code will be typed as a customer PURL. However, if only an email address is provided as the request parameter, the new referral code will be typed as an email PURL. There is no functional difference from a advocate or friend perspective between the two types of PURLs.

    If providing customer id, we will check if there is an existing customer record in Friendbuy. If so, the record will be updated with any new information specified in the body. If no customer record exists, a new one will be created. In each scenario, the share will be associated with the customer.

    Body Parameters

    campaign.id*
    The campaign id
    customer.id**
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    customer.first_name
    Customer first name
    customer.last_name
    Customer last name
    customer.email
    Email associated with the customer
    customer.stripe_customer_id
    Stripe’s id for the customer
    customer.chargebee_customer_id
    Chargebee’s id for the customer
    email**
    Email address, if creating or retrieving email purls
    parameters
    Link parameters to set on the referral code (enter as JSON to try out)

    * Required field
    ** At least one of these fields is required

    Response Model

    ReferralCode
    type
    string
    One of share, personal_url, email_personal_url, or reminder_email
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    If the referral code is from a share, the associated share (Expand)
    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    reminder_email
    object
    If the referral code is from a reminder email, the associated reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    campaign
    object
    If the code is a personal url, the campaign to which it is bound. Otherwise, find the campaign information in the nested share or reminder email object. (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    additional_link_parameters
    string
    Link parameters set on the referral code
    customer
    object
    If the code is a customer personal url, the customer to which it is assigned (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    email
    string
    If the code is an email personal url, the email address to which it is assigned

    GET /referral_codes/{code}

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "type": "share",
      "referral_code": "uxC",
      "trackable_link": "http://fbuy.me/uxC",
      "destination_url": "http://mycompany.example.com/rewards/908",
      "referral_code_blacklisted": false,
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09",
          "facebook_profile": {
            "facebook_id": "100001724970193",
            "name": "Taylor Gomez",
            "first_name": "Taylor",
            "last_name": "Gomez",
            "email_address": "tgo@example.net",
            "gender": "female",
            "locale": "es_MX",
            "link": "http://www.facebook.com/100001724970193",
            "timezone": -7,
            "verified": true,
            "birthday": "1989-11-09T00:00:00.000Z",
            "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
            "friends_count": 75025
          },
          "twitter_profile": {
            "twitter_id": "308061521170129",
            "name": "Taylor Gomez",
            "screen_name": "taygomz17711",
            "time_zone": "America/Mexico_City",
            "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
            "homepage": "senate.example.mx/taylor_gomez",
            "location": "Antarctica",
            "language": "es",
            "utc_offset": -18000,
            "statuses_count": 89,
            "friends_count": 55,
            "followers_count": 75025,
            "favourites_count": 1597,
            "listed_count": 13,
            "is_translator": false,
            "contributors_enabled": true,
            "verified": true,
            "geo_enabled": true,
            "protected": false,
            "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
          }
        },
        "purchase": {
          "order_id": "PQZ-4181",
          "coupon_code": "COUPON123456",
          "date": "2017-04-01T11:07:40.904Z",
          "total": 15.97,
          "new_customer": "true",
          "email": "adrian@example.fi",
          "ip_address": "200.1.2.3",
          "products": [
            {
              "sku": "99P88Q77R",
              "quantity": 21,
              "price": 319.99
            }
          ],
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          }
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "additional_link_parameters": "{\"utm_medium\": \"referral\", \"utm_source\": \"Friendbuy\"}",
      "customer": {
        "account_id": "JAYZ",
        "id": "JAYZ",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW",
        "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
        "created_at": "2013-02-02T02:02:02.222220",
        "recent_shares": [
          {
            "id": 196418,
            "referral_code": "uxC",
            "message": {
              "id": "100001965159666_428859647189537",
              "content": "This is my favorite tennis racket ever",
              "network": "facebook"
            },
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "ip_address": "8.8.8.8",
            "newsletter_opt_in": true,
            "send_reminder": true,
            "created_at": "2017-01-13T19:18:38.239Z",
            "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
            "email_recipients": [
              "pele@example.br",
              "messi@example.ar"
            ],
            "sharer": {
              "name": "Taylor Gomez",
              "email": "tgo@example.net",
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        ],
        "recent_referral_codes": [
          {
            "referral_code": "uxC",
            "trackable_link": "http://fbuy.me/uxC",
            "destination_url": "http://mycompany.example.com/rewards/908",
            "referral_code_blacklisted": true
          }
        ]
      },
      "email": "alex@example.ca"
    }
    
    // To see live output, click the Try It button
    

    Retrieves the complete details associated to a specific referral code.

    Path Parameters

    code*
    Short alphanumeric code to be looked up

    *Required field

    Response Model

    ReferralCode
    type
    string
    One of share, personal_url, email_personal_url, or reminder_email
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    If the referral code is from a share, the associated share (Expand)
    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    reminder_email
    object
    If the referral code is from a reminder email, the associated reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    campaign
    object
    If the code is a personal url, the campaign to which it is bound. Otherwise, find the campaign information in the nested share or reminder email object. (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    additional_link_parameters
    string
    Link parameters set on the referral code
    customer
    object
    If the code is a customer personal url, the customer to which it is assigned (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    email
    string
    If the code is an email personal url, the email address to which it is assigned

    PATCH /referral_codes/{code}

    • Example
    • Try It
    // Example Request Body
    {
      "parameters": {
        "utm_medium": "referral",
        "utm_source": "Friendbuy"
      }
    }
    
    // Example Response (200 OK)
    {
      "type": "share",
      "referral_code": "uxC",
      "trackable_link": "http://fbuy.me/uxC",
      "destination_url": "http://mycompany.example.com/rewards/908",
      "referral_code_blacklisted": false,
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09",
          "facebook_profile": {
            "facebook_id": "100001724970193",
            "name": "Taylor Gomez",
            "first_name": "Taylor",
            "last_name": "Gomez",
            "email_address": "tgo@example.net",
            "gender": "female",
            "locale": "es_MX",
            "link": "http://www.facebook.com/100001724970193",
            "timezone": -7,
            "verified": true,
            "birthday": "1989-11-09T00:00:00.000Z",
            "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
            "friends_count": 75025
          },
          "twitter_profile": {
            "twitter_id": "308061521170129",
            "name": "Taylor Gomez",
            "screen_name": "taygomz17711",
            "time_zone": "America/Mexico_City",
            "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
            "homepage": "senate.example.mx/taylor_gomez",
            "location": "Antarctica",
            "language": "es",
            "utc_offset": -18000,
            "statuses_count": 89,
            "friends_count": 55,
            "followers_count": 75025,
            "favourites_count": 1597,
            "listed_count": 13,
            "is_translator": false,
            "contributors_enabled": true,
            "verified": true,
            "geo_enabled": true,
            "protected": false,
            "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
          }
        },
        "purchase": {
          "order_id": "PQZ-4181",
          "coupon_code": "COUPON123456",
          "date": "2017-04-01T11:07:40.904Z",
          "total": 15.97,
          "new_customer": "true",
          "email": "adrian@example.fi",
          "ip_address": "200.1.2.3",
          "products": [
            {
              "sku": "99P88Q77R",
              "quantity": 21,
              "price": 319.99
            }
          ],
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          }
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "additional_link_parameters": "{\"utm_medium\": \"referral\", \"utm_source\": \"Friendbuy\"}",
      "customer": {
        "account_id": "JAYZ",
        "id": "JAYZ",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW",
        "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
        "created_at": "2013-02-02T02:02:02.222220",
        "recent_shares": [
          {
            "id": 196418,
            "referral_code": "uxC",
            "message": {
              "id": "100001965159666_428859647189537",
              "content": "This is my favorite tennis racket ever",
              "network": "facebook"
            },
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "ip_address": "8.8.8.8",
            "newsletter_opt_in": true,
            "send_reminder": true,
            "created_at": "2017-01-13T19:18:38.239Z",
            "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
            "email_recipients": [
              "pele@example.br",
              "messi@example.ar"
            ],
            "sharer": {
              "name": "Taylor Gomez",
              "email": "tgo@example.net",
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        ],
        "recent_referral_codes": [
          {
            "referral_code": "uxC",
            "trackable_link": "http://fbuy.me/uxC",
            "destination_url": "http://mycompany.example.com/rewards/908",
            "referral_code_blacklisted": true
          }
        ]
      },
      "email": "alex@example.ca"
    }
    
    // To see live output, click the Try It button
    

    Updates the tracking parameters associated with a specific referral link. Although the most common type of link parameter is the UTM, this endpoint allows you define any key-value pair to be appended to referral link for a PURL.

    Path Parameters

    code*
    Short alphanumeric code of the referral code to update

    *Required field

    Body Parameters

    parameters
    Link parameters to set on the referral code (enter as JSON to try out)

    * Required field

    Response Model

    ReferralCode
    type
    string
    One of share, personal_url, email_personal_url, or reminder_email
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    If the referral code is from a share, the associated share (Expand)
    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    reminder_email
    object
    If the referral code is from a reminder email, the associated reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    campaign
    object
    If the code is a personal url, the campaign to which it is bound. Otherwise, find the campaign information in the nested share or reminder email object. (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    additional_link_parameters
    string
    Link parameters set on the referral code
    customer
    object
    If the code is a customer personal url, the customer to which it is assigned (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    email
    string
    If the code is an email personal url, the email address to which it is assigned

    GET /customers/{id}/referral_codes

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "referral_code": "uxC",
          "trackable_link": "http://fbuy.me/uxC",
          "destination_url": "http://mycompany.example.com/rewards/908",
          "referral_code_blacklisted": true
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of referral codes for a specific customer.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)

    Response Model

    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.

    Shares

    A share occurs when an advocate refers a friend directly through a Friendbuy widget. The share will be associated to a specific channel, such as email, Facebook, or Twitter.

    GET /shares

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of shares.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)
    campaign
    Id of the campaign to be searched (can be found on the widget detail page of your Friendbuy dashboard, or via a search at the GET /campaigns endpoint)

    Response Model

    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known

    GET /shares/{id}

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "id": 196418,
      "referral_code": "uxC",
      "message": {
        "id": "100001965159666_428859647189537",
        "content": "This is my favorite tennis racket ever",
        "network": "facebook"
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "ip_address": "8.8.8.8",
      "newsletter_opt_in": true,
      "send_reminder": true,
      "created_at": "2017-01-13T19:18:38.239Z",
      "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
      "email_recipients": [
        "pele@example.br",
        "messi@example.ar"
      ],
      "sharer": {
        "name": "Taylor Gomez",
        "email": "tgo@example.net",
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
          "created_at": "2013-02-02T02:02:02.222220",
          "recent_shares": [
            {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          ],
          "recent_referral_codes": [
            {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            }
          ]
        },
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09",
        "facebook_profile": {
          "facebook_id": "100001724970193",
          "name": "Taylor Gomez",
          "first_name": "Taylor",
          "last_name": "Gomez",
          "email_address": "tgo@example.net",
          "gender": "female",
          "locale": "es_MX",
          "link": "http://www.facebook.com/100001724970193",
          "timezone": -7,
          "verified": true,
          "birthday": "1989-11-09T00:00:00.000Z",
          "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
          "friends_count": 75025
        },
        "twitter_profile": {
          "twitter_id": "308061521170129",
          "name": "Taylor Gomez",
          "screen_name": "taygomz17711",
          "time_zone": "America/Mexico_City",
          "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
          "homepage": "senate.example.mx/taylor_gomez",
          "location": "Antarctica",
          "language": "es",
          "utc_offset": -18000,
          "statuses_count": 89,
          "friends_count": 55,
          "followers_count": 75025,
          "favourites_count": 1597,
          "listed_count": 13,
          "is_translator": false,
          "contributors_enabled": true,
          "verified": true,
          "geo_enabled": true,
          "protected": false,
          "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
        }
      },
      "purchase": {
        "order_id": "PQZ-4181",
        "coupon_code": "COUPON123456",
        "date": "2017-04-01T11:07:40.904Z",
        "total": 15.97,
        "new_customer": "true",
        "email": "adrian@example.fi",
        "ip_address": "200.1.2.3",
        "products": [
          {
            "sku": "99P88Q77R",
            "quantity": 21,
            "price": 319.99
          }
        ],
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
          "created_at": "2013-02-02T02:02:02.222220",
          "recent_shares": [
            {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          ],
          "recent_referral_codes": [
            {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            }
          ]
        }
      }
    }
    
    // To see live output, click the Try It button
    

    Retrieves the complete details associated to a specific share.

    Path Parameters

    id*
    The internal id of the share

    *Required field

    Response Model

    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.

    POST /shares

    • Example
    • Try It
    // Example Request Body
    {
      "campaign_id": 931,
      "from_email_address": "root@fifa.example.org",
      "email_recipients": [
        "pele@example.br",
        "messi@example.ar"
      ],
      "newsletter_opt_in": true,
      "send_reminder": true,
      "custom_message": "Good game!",
      "customer": {
        "account_id": "C9911",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW"
      },
      "parameters": {
        "utm_medium": "referral",
        "utm_source": "Friendbuy",
        "referrer": "MDMQ4DE9"
      }
    }
    
    // Example Response (201 CREATED)
    {
      "id": 196418,
      "referral_code": "uxC",
      "message": {
        "id": "100001965159666_428859647189537",
        "content": "This is my favorite tennis racket ever",
        "network": "facebook"
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "ip_address": "8.8.8.8",
      "newsletter_opt_in": true,
      "send_reminder": true,
      "created_at": "2017-01-13T19:18:38.239Z",
      "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
      "email_recipients": [
        "pele@example.br",
        "messi@example.ar"
      ],
      "sharer": {
        "name": "Taylor Gomez",
        "email": "tgo@example.net",
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
          "created_at": "2013-02-02T02:02:02.222220",
          "recent_shares": [
            {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          ],
          "recent_referral_codes": [
            {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            }
          ]
        },
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09",
        "facebook_profile": {
          "facebook_id": "100001724970193",
          "name": "Taylor Gomez",
          "first_name": "Taylor",
          "last_name": "Gomez",
          "email_address": "tgo@example.net",
          "gender": "female",
          "locale": "es_MX",
          "link": "http://www.facebook.com/100001724970193",
          "timezone": -7,
          "verified": true,
          "birthday": "1989-11-09T00:00:00.000Z",
          "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
          "friends_count": 75025
        },
        "twitter_profile": {
          "twitter_id": "308061521170129",
          "name": "Taylor Gomez",
          "screen_name": "taygomz17711",
          "time_zone": "America/Mexico_City",
          "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
          "homepage": "senate.example.mx/taylor_gomez",
          "location": "Antarctica",
          "language": "es",
          "utc_offset": -18000,
          "statuses_count": 89,
          "friends_count": 55,
          "followers_count": 75025,
          "favourites_count": 1597,
          "listed_count": 13,
          "is_translator": false,
          "contributors_enabled": true,
          "verified": true,
          "geo_enabled": true,
          "protected": false,
          "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
        }
      },
      "purchase": {
        "order_id": "PQZ-4181",
        "coupon_code": "COUPON123456",
        "date": "2017-04-01T11:07:40.904Z",
        "total": 15.97,
        "new_customer": "true",
        "email": "adrian@example.fi",
        "ip_address": "200.1.2.3",
        "products": [
          {
            "sku": "99P88Q77R",
            "quantity": 21,
            "price": 319.99
          }
        ],
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
          "created_at": "2013-02-02T02:02:02.222220",
          "recent_shares": [
            {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          ],
          "recent_referral_codes": [
            {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            }
          ]
        }
      }
    }
    
    // To see live output, click the Try It button
    

    Generates a new email share.

    If providing customer id, we will check if there is an existing customer record in Friendbuy. If so, the record will be updated with any new information specified in the body parameters. If no customer record exists, a new one will be created. In each scenario, the share will be associated with the customer.

    Body Parameters

    campaign_id*
    Id of the campaign for which the share is to be made
    from_email_address*
    Email address from which the share is sent
    email_recipients*
    Recipients of the share (enter as comma-separated list to try out)
    newsletter_opt_in
    Whether a newsletter opt in should take place with the share
    send_reminder
    Whether a reminder should be sent for the share
    custom_message
    Message sent with the share
    customer.account_id
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    customer.first_name
    Customer first name
    customer.last_name
    Customer last name
    customer.email
    Email associated with the customer
    customer.stripe_customer_id
    Stripe’s id for the customer
    customer.chargebee_customer_id
    Chargebee’s id for the customer
    parameters
    Custom referral parameters, for additional details about shares

    * Required field

    Response Model

    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.

    GET /customers/{id}/shares

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of shares for a specific customer.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Response Model

    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known

    GET /customers/{id}/email-recipients

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "email": "messi@example.ar",
          "invitation_dates": [
            "2017-01-13T10:53:09.933Z",
            "2017-03-30T10:11:29.105Z"
          ]
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of email addresses to which a given customer has sent email shares.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Response Model

    EmailRecipient
    email
    string
    Invited email address
    invitation_dates
    array
    Datetimes of invitations (missing time zone)

    Conversions

    A conversion occurs when (1) Friendbuy is notified of a purchase, and (2) we are able to associate the purchase to an advocate’s referral via the referral code or coupon code provided to their friend.

    You can notify Friendbuy of a purchase through a Track Order call via the Friendbuy JavaScript embedded on your site, or through the POST /purchases endpoint.

    GET /conversions

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 121393,
          "status": "paid",
          "type": "share",
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "purchase": {
            "order_id": "PQZ-4181",
            "coupon_code": "COUPON123456",
            "date": "2017-04-01T11:07:40.904Z",
            "total": 15.97,
            "new_customer": "true",
            "email": "adrian@example.fi",
            "ip_address": "200.1.2.3",
            "products": [
              {
                "sku": "99P88Q77R",
                "quantity": 21,
                "price": 319.99
              }
            ],
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            }
          },
          "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
          "created_at": "2016-03-01T19:12:38.239Z",
          "possible_self_referral": true,
          "fraud": {
            "same_shopper": false,
            "same_customer": false,
            "same_email": false,
            "same_ip_address": false,
            "same_ip_and_user_agent": false,
            "fuzzy_email": false,
            "high_sensitivity_fuzzy_email": false
          },
          "reward": "null",
          "personal_url": {
            "referral_code": "uxC",
            "trackable_link": "http://fbuy.me/uxC",
            "destination_url": "http://mycompany.example.com/rewards/908",
            "referral_code_blacklisted": true
          },
          "share": {
            "id": 196418,
            "referral_code": "uxC",
            "message": {
              "id": "100001965159666_428859647189537",
              "content": "This is my favorite tennis racket ever",
              "network": "facebook"
            },
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "ip_address": "8.8.8.8",
            "newsletter_opt_in": true,
            "send_reminder": true,
            "created_at": "2017-01-13T19:18:38.239Z",
            "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
            "email_recipients": [
              "pele@example.br",
              "messi@example.ar"
            ],
            "sharer": {
              "name": "Taylor Gomez",
              "email": "tgo@example.net",
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          },
          "reminder_email": {
            "id": 377,
            "referral_code": "ux7Q",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "created_at": "2017-01-13T19:18:38.239Z",
            "sharer": null,
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          },
          "referrer": {
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "email": "alex@example.ca",
            "name": "Taylor Gomez",
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          },
          "rewards": [
            {
              "id": 3181,
              "status": "valid",
              "type": "fixed_cash",
              "amount": 10,
              "rejected_reasons": "",
              "created_at": "2017-01-13T19:18:38.239Z",
              "evaluate_at": "2017-01-13T19:20:38.211Z",
              "conversion": {
                "id": 121393,
                "status": "paid",
                "type": "share",
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "purchase": {
                  "order_id": "PQZ-4181",
                  "coupon_code": "COUPON123456",
                  "date": "2017-04-01T11:07:40.904Z",
                  "total": 15.97,
                  "new_customer": "true",
                  "email": "adrian@example.fi",
                  "ip_address": "200.1.2.3",
                  "products": [
                    {
                      "sku": "99P88Q77R",
                      "quantity": 21,
                      "price": 319.99
                    }
                  ],
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  }
                },
                "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
                "created_at": "2016-03-01T19:12:38.239Z",
                "possible_self_referral": true,
                "fraud": {
                  "same_shopper": false,
                  "same_customer": false,
                  "same_email": false,
                  "same_ip_address": false,
                  "same_ip_and_user_agent": false,
                  "fuzzy_email": false,
                  "high_sensitivity_fuzzy_email": false
                },
                "reward": "null",
                "personal_url": {
                  "referral_code": "uxC",
                  "trackable_link": "http://fbuy.me/uxC",
                  "destination_url": "http://mycompany.example.com/rewards/908",
                  "referral_code_blacklisted": true
                },
                "share": {
                  "id": 196418,
                  "referral_code": "uxC",
                  "message": {
                    "id": "100001965159666_428859647189537",
                    "content": "This is my favorite tennis racket ever",
                    "network": "facebook"
                  },
                  "campaign": {
                    "id": 233,
                    "name": "Fall Shoe Sale",
                    "published": true,
                    "referral_incentive": {
                      "type": "fixed_cash",
                      "value": 25
                    },
                    "created_at": "2015-08-09T03:20:11.098230-07:00"
                  },
                  "ip_address": "8.8.8.8",
                  "newsletter_opt_in": true,
                  "send_reminder": true,
                  "created_at": "2017-01-13T19:18:38.239Z",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                  "email_recipients": [
                    "pele@example.br",
                    "messi@example.ar"
                  ],
                  "sharer": {
                    "name": "Taylor Gomez",
                    "email": "tgo@example.net",
                    "customer": {
                      "account_id": "JAYZ",
                      "id": "JAYZ",
                      "first_name": "Jaylene",
                      "last_name": "Zheng",
                      "email": "jzheng@example.mil",
                      "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                      "chargebee_customer_id": "4gkYnd21ouvW",
                      "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                    },
                    "facebook_friends_count": 987,
                    "twitter_followers_count": 121393,
                    "birthdate": "1989-11-09"
                  }
                },
                "reminder_email": {
                  "id": 377,
                  "referral_code": "ux7Q",
                  "campaign": {
                    "id": 233,
                    "name": "Fall Shoe Sale",
                    "published": true,
                    "referral_incentive": {
                      "type": "fixed_cash",
                      "value": 25
                    },
                    "created_at": "2015-08-09T03:20:11.098230-07:00"
                  },
                  "created_at": "2017-01-13T19:18:38.239Z",
                  "sharer": null,
                  "share": {
                    "id": 196418,
                    "referral_code": "uxC",
                    "message": {
                      "id": "100001965159666_428859647189537",
                      "content": "This is my favorite tennis racket ever",
                      "network": "facebook"
                    },
                    "campaign": {
                      "id": 233,
                      "name": "Fall Shoe Sale",
                      "published": true,
                      "referral_incentive": {
                        "type": "fixed_cash",
                        "value": 25
                      },
                      "created_at": "2015-08-09T03:20:11.098230-07:00"
                    },
                    "ip_address": "8.8.8.8",
                    "newsletter_opt_in": true,
                    "send_reminder": true,
                    "created_at": "2017-01-13T19:18:38.239Z",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                    "email_recipients": [
                      "pele@example.br",
                      "messi@example.ar"
                    ],
                    "sharer": {
                      "name": "Taylor Gomez",
                      "email": "tgo@example.net",
                      "customer": {
                        "account_id": "JAYZ",
                        "id": "JAYZ",
                        "first_name": "Jaylene",
                        "last_name": "Zheng",
                        "email": "jzheng@example.mil",
                        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                        "chargebee_customer_id": "4gkYnd21ouvW",
                        "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                      },
                      "facebook_friends_count": 987,
                      "twitter_followers_count": 121393,
                      "birthdate": "1989-11-09"
                    }
                  }
                },
                "referrer": {
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "email": "alex@example.ca",
                  "name": "Taylor Gomez",
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            }
          ]
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of conversions.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)
    campaign
    Id of the campaign to be searched (can be found on the widget detail page of your Friendbuy dashboard, or via a search at the GET /campaigns endpoint)

    Response Model

    ConversionExcerpt
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known
    rewards
    array
    Rewards from this conversion, only present for top-level conversion queries and webhooks and never included for conversions are embedded within reward data (Expand)
    RewardExcerpt
    id
    integer
    Friendbuy internal id for the reward
    status
    string
    One of pending, valid, or invalid
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    amount
    number
    Amount of the reward in units of the reward type
    rejected_reasons
    string
    JSON object with keys matching those of the conversion.fraud object and values describing the fraudulent activity in human-readable terms
    created_at
    datetime
    Timestamp at which the reward was created
    evaluate_at
    datetime
    Timestamp at which the reward validity was evaluated
    conversion
    object
    Conversion of the reward (Expand)
    ConversionExceprtWithoutRewards
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known

    GET /conversions/{id}

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "id": 121393,
      "status": "paid",
      "type": "share",
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "purchase": {
        "order_id": "PQZ-4181",
        "coupon_code": "COUPON123456",
        "date": "2017-04-01T11:07:40.904Z",
        "total": 15.97,
        "new_customer": "true",
        "email": "adrian@example.fi",
        "ip_address": "200.1.2.3",
        "products": [
          {
            "sku": "99P88Q77R",
            "quantity": 21,
            "price": 319.99
          }
        ],
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        }
      },
      "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
      "created_at": "2016-03-01T19:12:38.239Z",
      "possible_self_referral": true,
      "fraud": {
        "same_shopper": false,
        "same_customer": false,
        "same_email": false,
        "same_ip_address": false,
        "same_ip_and_user_agent": false,
        "fuzzy_email": false,
        "high_sensitivity_fuzzy_email": false
      },
      "reward": "null",
      "personal_url": {
        "referral_code": "uxC",
        "trackable_link": "http://fbuy.me/uxC",
        "destination_url": "http://mycompany.example.com/rewards/908",
        "referral_code_blacklisted": true
      },
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09",
          "facebook_profile": {
            "facebook_id": "100001724970193",
            "name": "Taylor Gomez",
            "first_name": "Taylor",
            "last_name": "Gomez",
            "email_address": "tgo@example.net",
            "gender": "female",
            "locale": "es_MX",
            "link": "http://www.facebook.com/100001724970193",
            "timezone": -7,
            "verified": true,
            "birthday": "1989-11-09T00:00:00.000Z",
            "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
            "friends_count": 75025
          },
          "twitter_profile": {
            "twitter_id": "308061521170129",
            "name": "Taylor Gomez",
            "screen_name": "taygomz17711",
            "time_zone": "America/Mexico_City",
            "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
            "homepage": "senate.example.mx/taylor_gomez",
            "location": "Antarctica",
            "language": "es",
            "utc_offset": -18000,
            "statuses_count": 89,
            "friends_count": 55,
            "followers_count": 75025,
            "favourites_count": 1597,
            "listed_count": 13,
            "is_translator": false,
            "contributors_enabled": true,
            "verified": true,
            "geo_enabled": true,
            "protected": false,
            "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
          }
        },
        "purchase": {
          "order_id": "PQZ-4181",
          "coupon_code": "COUPON123456",
          "date": "2017-04-01T11:07:40.904Z",
          "total": 15.97,
          "new_customer": "true",
          "email": "adrian@example.fi",
          "ip_address": "200.1.2.3",
          "products": [
            {
              "sku": "99P88Q77R",
              "quantity": 21,
              "price": 319.99
            }
          ],
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          }
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "referrer": {
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        },
        "email": "alex@example.ca",
        "name": "Taylor Gomez",
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09"
      },
      "rewards": [
        {
          "id": 3181,
          "status": "valid",
          "type": "fixed_cash",
          "amount": 10,
          "rejected_reasons": "",
          "created_at": "2017-01-13T19:18:38.239Z",
          "evaluate_at": "2017-01-13T19:20:38.211Z",
          "conversion": {
            "id": 121393,
            "status": "paid",
            "type": "share",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "purchase": {
              "order_id": "PQZ-4181",
              "coupon_code": "COUPON123456",
              "date": "2017-04-01T11:07:40.904Z",
              "total": 15.97,
              "new_customer": "true",
              "email": "adrian@example.fi",
              "ip_address": "200.1.2.3",
              "products": [
                {
                  "sku": "99P88Q77R",
                  "quantity": 21,
                  "price": 319.99
                }
              ],
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              }
            },
            "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
            "created_at": "2016-03-01T19:12:38.239Z",
            "possible_self_referral": true,
            "fraud": {
              "same_shopper": false,
              "same_customer": false,
              "same_email": false,
              "same_ip_address": false,
              "same_ip_and_user_agent": false,
              "fuzzy_email": false,
              "high_sensitivity_fuzzy_email": false
            },
            "reward": "null",
            "personal_url": {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            },
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            },
            "reminder_email": {
              "id": 377,
              "referral_code": "ux7Q",
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "created_at": "2017-01-13T19:18:38.239Z",
              "sharer": null,
              "share": {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            },
            "referrer": {
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "email": "alex@example.ca",
              "name": "Taylor Gomez",
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves the complete details associated with a specific conversion.

    Path Parameters

    id*
    The internal id of the conversion

    *Required field

    Response Model

    Conversion
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known
    rewards
    array
    Rewards from this conversion, only present for top-level conversion queries and webhooks and never included for conversions are embedded within reward data (Expand)
    RewardExcerpt
    id
    integer
    Friendbuy internal id for the reward
    status
    string
    One of pending, valid, or invalid
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    amount
    number
    Amount of the reward in units of the reward type
    rejected_reasons
    string
    JSON object with keys matching those of the conversion.fraud object and values describing the fraudulent activity in human-readable terms
    created_at
    datetime
    Timestamp at which the reward was created
    evaluate_at
    datetime
    Timestamp at which the reward validity was evaluated
    conversion
    object
    Conversion of the reward (Expand)
    ConversionExceprtWithoutRewards
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known

    POST /purchases

    • Example
    • Try It
    // Example Request Body
    {
      "referral_code": "z7x",
      "coupon_code": "COUPON98765",
      "order": {
        "id": "777B221-X",
        "amount": 177.11,
        "email": "rory@example.za",
        "new_customer": true
      },
      "customer": {
        "id": "C9911",
        "first_name": "Jaylene",
        "last_name": "Zheng",
        "email": "jzheng@example.mil",
        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
        "chargebee_customer_id": "4gkYnd21ouvW"
      },
      "products": [
        {
          "sku": "99P88Q77R",
          "quantity": 21,
          "price": 319.99
        }
      ]
    }
    
    // Example Response (201 CREATED)
    {
      "id": 121393,
      "status": "paid",
      "type": "share",
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "purchase": {
        "order_id": "PQZ-4181",
        "coupon_code": "COUPON123456",
        "date": "2017-04-01T11:07:40.904Z",
        "total": 15.97,
        "new_customer": "true",
        "email": "adrian@example.fi",
        "ip_address": "200.1.2.3",
        "products": [
          {
            "sku": "99P88Q77R",
            "quantity": 21,
            "price": 319.99
          }
        ],
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        }
      },
      "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
      "created_at": "2016-03-01T19:12:38.239Z",
      "possible_self_referral": true,
      "fraud": {
        "same_shopper": false,
        "same_customer": false,
        "same_email": false,
        "same_ip_address": false,
        "same_ip_and_user_agent": false,
        "fuzzy_email": false,
        "high_sensitivity_fuzzy_email": false
      },
      "reward": "null",
      "personal_url": {
        "referral_code": "uxC",
        "trackable_link": "http://fbuy.me/uxC",
        "destination_url": "http://mycompany.example.com/rewards/908",
        "referral_code_blacklisted": true
      },
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09",
          "facebook_profile": {
            "facebook_id": "100001724970193",
            "name": "Taylor Gomez",
            "first_name": "Taylor",
            "last_name": "Gomez",
            "email_address": "tgo@example.net",
            "gender": "female",
            "locale": "es_MX",
            "link": "http://www.facebook.com/100001724970193",
            "timezone": -7,
            "verified": true,
            "birthday": "1989-11-09T00:00:00.000Z",
            "picture_url": "http://pictures.example.org/8abdjw87fe677lko",
            "friends_count": 75025
          },
          "twitter_profile": {
            "twitter_id": "308061521170129",
            "name": "Taylor Gomez",
            "screen_name": "taygomz17711",
            "time_zone": "America/Mexico_City",
            "bio": "Rabblerouser, marathon runner, pole vaulter, senator",
            "homepage": "senate.example.mx/taylor_gomez",
            "location": "Antarctica",
            "language": "es",
            "utc_offset": -18000,
            "statuses_count": 89,
            "friends_count": 55,
            "followers_count": 75025,
            "favourites_count": 1597,
            "listed_count": 13,
            "is_translator": false,
            "contributors_enabled": true,
            "verified": true,
            "geo_enabled": true,
            "protected": false,
            "picture_url": "http://pbs.twimg.com/profile_images/601898989899999900/DzBmLB0Y.png"
          }
        },
        "purchase": {
          "order_id": "PQZ-4181",
          "coupon_code": "COUPON123456",
          "date": "2017-04-01T11:07:40.904Z",
          "total": 15.97,
          "new_customer": "true",
          "email": "adrian@example.fi",
          "ip_address": "200.1.2.3",
          "products": [
            {
              "sku": "99P88Q77R",
              "quantity": 21,
              "price": 319.99
            }
          ],
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1",
            "created_at": "2013-02-02T02:02:02.222220",
            "recent_shares": [
              {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            ],
            "recent_referral_codes": [
              {
                "referral_code": "uxC",
                "trackable_link": "http://fbuy.me/uxC",
                "destination_url": "http://mycompany.example.com/rewards/908",
                "referral_code_blacklisted": true
              }
            ]
          }
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "referrer": {
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        },
        "email": "alex@example.ca",
        "name": "Taylor Gomez",
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09"
      },
      "rewards": [
        {
          "id": 3181,
          "status": "valid",
          "type": "fixed_cash",
          "amount": 10,
          "rejected_reasons": "",
          "created_at": "2017-01-13T19:18:38.239Z",
          "evaluate_at": "2017-01-13T19:20:38.211Z",
          "conversion": {
            "id": 121393,
            "status": "paid",
            "type": "share",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "purchase": {
              "order_id": "PQZ-4181",
              "coupon_code": "COUPON123456",
              "date": "2017-04-01T11:07:40.904Z",
              "total": 15.97,
              "new_customer": "true",
              "email": "adrian@example.fi",
              "ip_address": "200.1.2.3",
              "products": [
                {
                  "sku": "99P88Q77R",
                  "quantity": 21,
                  "price": 319.99
                }
              ],
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              }
            },
            "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
            "created_at": "2016-03-01T19:12:38.239Z",
            "possible_self_referral": true,
            "fraud": {
              "same_shopper": false,
              "same_customer": false,
              "same_email": false,
              "same_ip_address": false,
              "same_ip_and_user_agent": false,
              "fuzzy_email": false,
              "high_sensitivity_fuzzy_email": false
            },
            "reward": "null",
            "personal_url": {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            },
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            },
            "reminder_email": {
              "id": 377,
              "referral_code": "ux7Q",
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "created_at": "2017-01-13T19:18:38.239Z",
              "sharer": null,
              "share": {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            },
            "referrer": {
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "email": "alex@example.ca",
              "name": "Taylor Gomez",
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Notifies Friendbuy that a purchase has occurred and is associated to a given referral code or coupon code. In addition to tracking the purchase in Friendbuy, posting to this endpoint will generate an an accompanying conversion.

    Body Parameters

    referral_code**
    Refcode (just the string, not the entire object) that referred the friend to make the purchase. Required unless coupon_code is present. If both referral_code and coupon_code are provided, referral_code will take precedence.
    coupon_code**
    Coupon code that brought the friend to the merchant to make the purchase. Required unless referral_code is present.
    order.id*
    Unique order id for the purchase. If this order id has been previously used, the request will fail with a 409 CONFLICT error and no new purchase (and no new conversion) will be created.
    order.amount
    Amount of the order
    order.email
    Email associated with the order
    order.new_customer
    Whether or not the purchase is made by a new (first-time) customer. Used to check for reward eligibility, since Friendbuy allows merchants to state “must be a new customer” as one of the reward criteria.
    customer.id
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    customer.first_name
    Customer first name
    customer.last_name
    Customer last name
    customer.email
    Email associated with the customer
    customer.stripe_customer_id
    Stripe’s id for the customer
    customer.chargebee_customer_id
    Chargebee’s id for the customer
    products[0].sku
    Product SKU
    products[0].quantity
    Number of units of the product that were purchased
    products[0].price
    Amount of the order, in currency units

    * Required field
    ** At least one of these fields is required

    Response Model

    Conversion
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    Share
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    Sharer
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    facebook_profile
    object
    Facebook profile data (Expand)
    FacebookProfile
    facebook_id
    string
    Id known to Facebook
    name
    string
    Name known to Facebook
    first_name
    string
    First name
    last_name
    string
    Last Name
    email_address
    string
    Email stored in Facebook profile
    gender
    string
    Facebook-captured gender information
    locale
    string
    Knwon locale
    link
    string
    Facebook link
    timezone
    integer
    Time zone offset
    verified
    boolean
    Whether the profile is marked as verified by Facebook
    birthday
    datetime
    Birthdate reported to Facebook
    picture_url
    string
    URL of facebook picture
    friends_count
    integer
    Number of Facebook friends
    twitter_profile
    object
    Twitter profile data (Expand)
    TwitterProfile
    twitter_id
    string
    Id at Twitter
    name
    string
    Twitter name
    screen_name
    string
    Twitter screen name
    time_zone
    string
    Time zone
    bio
    string
    Twitter bio
    homepage
    string
    Home page
    location
    string
    User-defined location for the Twitter profile
    language
    string
    Language reported to Twitter
    utc_offset
    integer
    Offset from UTC in seconds
    statuses_count
    integer
    Number of tweets, including retweets
    friends_count
    integer
    Number of friends
    followers_count
    integer
    Number of followers
    favourites_count
    integer
    Number of favorites
    listed_count
    integer
    The number of public lists that this account is a member of
    is_translator
    boolean
    Whether the user is a participant in Twitter’s translator community
    contributors_enabled
    boolean
    Whether contributors are enabled
    verified
    boolean
    Whether the Twitter account is verified
    geo_enabled
    boolean
    Whether the account is geo enabled
    protected
    boolean
    Whether the Twitter user has chosen to protect the tweets
    picture_url
    string
    URL for the Twitter picture
    purchase
    object
    Purchase (Expand)
    Purchase
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    Customer
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    created_at
    datetime
    Timestamp at which Friendbuy created the customer record (missing time zone)
    recent_shares
    array
    Array of the customer’s recent shares (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    recent_referral_codes
    array
    Array of the customer’s recent referral codes (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known
    rewards
    array
    Rewards from this conversion, only present for top-level conversion queries and webhooks and never included for conversions are embedded within reward data (Expand)
    RewardExcerpt
    id
    integer
    Friendbuy internal id for the reward
    status
    string
    One of pending, valid, or invalid
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    amount
    number
    Amount of the reward in units of the reward type
    rejected_reasons
    string
    JSON object with keys matching those of the conversion.fraud object and values describing the fraudulent activity in human-readable terms
    created_at
    datetime
    Timestamp at which the reward was created
    evaluate_at
    datetime
    Timestamp at which the reward validity was evaluated
    conversion
    object
    Conversion of the reward (Expand)
    ConversionExceprtWithoutRewards
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known

    GET /customers/{id}/conversions

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 121393,
          "status": "paid",
          "type": "share",
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "purchase": {
            "order_id": "PQZ-4181",
            "coupon_code": "COUPON123456",
            "date": "2017-04-01T11:07:40.904Z",
            "total": 15.97,
            "new_customer": "true",
            "email": "adrian@example.fi",
            "ip_address": "200.1.2.3",
            "products": [
              {
                "sku": "99P88Q77R",
                "quantity": 21,
                "price": 319.99
              }
            ],
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            }
          },
          "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
          "created_at": "2016-03-01T19:12:38.239Z",
          "possible_self_referral": true,
          "fraud": {
            "same_shopper": false,
            "same_customer": false,
            "same_email": false,
            "same_ip_address": false,
            "same_ip_and_user_agent": false,
            "fuzzy_email": false,
            "high_sensitivity_fuzzy_email": false
          },
          "reward": "null",
          "personal_url": {
            "referral_code": "uxC",
            "trackable_link": "http://fbuy.me/uxC",
            "destination_url": "http://mycompany.example.com/rewards/908",
            "referral_code_blacklisted": true
          },
          "share": {
            "id": 196418,
            "referral_code": "uxC",
            "message": {
              "id": "100001965159666_428859647189537",
              "content": "This is my favorite tennis racket ever",
              "network": "facebook"
            },
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "ip_address": "8.8.8.8",
            "newsletter_opt_in": true,
            "send_reminder": true,
            "created_at": "2017-01-13T19:18:38.239Z",
            "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
            "email_recipients": [
              "pele@example.br",
              "messi@example.ar"
            ],
            "sharer": {
              "name": "Taylor Gomez",
              "email": "tgo@example.net",
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          },
          "reminder_email": {
            "id": 377,
            "referral_code": "ux7Q",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "created_at": "2017-01-13T19:18:38.239Z",
            "sharer": null,
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            }
          },
          "referrer": {
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "email": "alex@example.ca",
            "name": "Taylor Gomez",
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          },
          "rewards": [
            {
              "id": 3181,
              "status": "valid",
              "type": "fixed_cash",
              "amount": 10,
              "rejected_reasons": "",
              "created_at": "2017-01-13T19:18:38.239Z",
              "evaluate_at": "2017-01-13T19:20:38.211Z",
              "conversion": {
                "id": 121393,
                "status": "paid",
                "type": "share",
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "purchase": {
                  "order_id": "PQZ-4181",
                  "coupon_code": "COUPON123456",
                  "date": "2017-04-01T11:07:40.904Z",
                  "total": 15.97,
                  "new_customer": "true",
                  "email": "adrian@example.fi",
                  "ip_address": "200.1.2.3",
                  "products": [
                    {
                      "sku": "99P88Q77R",
                      "quantity": 21,
                      "price": 319.99
                    }
                  ],
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  }
                },
                "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
                "created_at": "2016-03-01T19:12:38.239Z",
                "possible_self_referral": true,
                "fraud": {
                  "same_shopper": false,
                  "same_customer": false,
                  "same_email": false,
                  "same_ip_address": false,
                  "same_ip_and_user_agent": false,
                  "fuzzy_email": false,
                  "high_sensitivity_fuzzy_email": false
                },
                "reward": "null",
                "personal_url": {
                  "referral_code": "uxC",
                  "trackable_link": "http://fbuy.me/uxC",
                  "destination_url": "http://mycompany.example.com/rewards/908",
                  "referral_code_blacklisted": true
                },
                "share": {
                  "id": 196418,
                  "referral_code": "uxC",
                  "message": {
                    "id": "100001965159666_428859647189537",
                    "content": "This is my favorite tennis racket ever",
                    "network": "facebook"
                  },
                  "campaign": {
                    "id": 233,
                    "name": "Fall Shoe Sale",
                    "published": true,
                    "referral_incentive": {
                      "type": "fixed_cash",
                      "value": 25
                    },
                    "created_at": "2015-08-09T03:20:11.098230-07:00"
                  },
                  "ip_address": "8.8.8.8",
                  "newsletter_opt_in": true,
                  "send_reminder": true,
                  "created_at": "2017-01-13T19:18:38.239Z",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                  "email_recipients": [
                    "pele@example.br",
                    "messi@example.ar"
                  ],
                  "sharer": {
                    "name": "Taylor Gomez",
                    "email": "tgo@example.net",
                    "customer": {
                      "account_id": "JAYZ",
                      "id": "JAYZ",
                      "first_name": "Jaylene",
                      "last_name": "Zheng",
                      "email": "jzheng@example.mil",
                      "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                      "chargebee_customer_id": "4gkYnd21ouvW",
                      "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                    },
                    "facebook_friends_count": 987,
                    "twitter_followers_count": 121393,
                    "birthdate": "1989-11-09"
                  }
                },
                "reminder_email": {
                  "id": 377,
                  "referral_code": "ux7Q",
                  "campaign": {
                    "id": 233,
                    "name": "Fall Shoe Sale",
                    "published": true,
                    "referral_incentive": {
                      "type": "fixed_cash",
                      "value": 25
                    },
                    "created_at": "2015-08-09T03:20:11.098230-07:00"
                  },
                  "created_at": "2017-01-13T19:18:38.239Z",
                  "sharer": null,
                  "share": {
                    "id": 196418,
                    "referral_code": "uxC",
                    "message": {
                      "id": "100001965159666_428859647189537",
                      "content": "This is my favorite tennis racket ever",
                      "network": "facebook"
                    },
                    "campaign": {
                      "id": 233,
                      "name": "Fall Shoe Sale",
                      "published": true,
                      "referral_incentive": {
                        "type": "fixed_cash",
                        "value": 25
                      },
                      "created_at": "2015-08-09T03:20:11.098230-07:00"
                    },
                    "ip_address": "8.8.8.8",
                    "newsletter_opt_in": true,
                    "send_reminder": true,
                    "created_at": "2017-01-13T19:18:38.239Z",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                    "email_recipients": [
                      "pele@example.br",
                      "messi@example.ar"
                    ],
                    "sharer": {
                      "name": "Taylor Gomez",
                      "email": "tgo@example.net",
                      "customer": {
                        "account_id": "JAYZ",
                        "id": "JAYZ",
                        "first_name": "Jaylene",
                        "last_name": "Zheng",
                        "email": "jzheng@example.mil",
                        "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                        "chargebee_customer_id": "4gkYnd21ouvW",
                        "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                      },
                      "facebook_friends_count": 987,
                      "twitter_followers_count": 121393,
                      "birthdate": "1989-11-09"
                    }
                  }
                },
                "referrer": {
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "email": "alex@example.ca",
                  "name": "Taylor Gomez",
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            }
          ]
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of conversions for a specific customer.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Response Model

    ConversionExcerpt
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known
    rewards
    array
    Rewards from this conversion, only present for top-level conversion queries and webhooks and never included for conversions are embedded within reward data (Expand)
    RewardExcerpt
    id
    integer
    Friendbuy internal id for the reward
    status
    string
    One of pending, valid, or invalid
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    amount
    number
    Amount of the reward in units of the reward type
    rejected_reasons
    string
    JSON object with keys matching those of the conversion.fraud object and values describing the fraudulent activity in human-readable terms
    created_at
    datetime
    Timestamp at which the reward was created
    evaluate_at
    datetime
    Timestamp at which the reward validity was evaluated
    conversion
    object
    Conversion of the reward (Expand)
    ConversionExceprtWithoutRewards
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known

    Rewards

    A reward is an optional referral incentive triggered by a conversion. For each conversion occurence, Friendbuy will check whether the widget variant associated with the referral is configured with a reward. If a reward configuration was specified, Friendbuy will evaluate the conversion against the reward criteria and enabled fraud checks to determine if a reward should be approved. If the conversion passes all checks, the reward is approved. If not, the reward is marked rejected.

    GET /customers/{id}/rewards

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 3181,
          "status": "valid",
          "type": "fixed_cash",
          "amount": 10,
          "rejected_reasons": "",
          "created_at": "2017-01-13T19:18:38.239Z",
          "evaluate_at": "2017-01-13T19:20:38.211Z",
          "conversion": {
            "id": 121393,
            "status": "paid",
            "type": "share",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "purchase": {
              "order_id": "PQZ-4181",
              "coupon_code": "COUPON123456",
              "date": "2017-04-01T11:07:40.904Z",
              "total": 15.97,
              "new_customer": "true",
              "email": "adrian@example.fi",
              "ip_address": "200.1.2.3",
              "products": [
                {
                  "sku": "99P88Q77R",
                  "quantity": 21,
                  "price": 319.99
                }
              ],
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              }
            },
            "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
            "created_at": "2016-03-01T19:12:38.239Z",
            "possible_self_referral": true,
            "fraud": {
              "same_shopper": false,
              "same_customer": false,
              "same_email": false,
              "same_ip_address": false,
              "same_ip_and_user_agent": false,
              "fuzzy_email": false,
              "high_sensitivity_fuzzy_email": false
            },
            "reward": "null",
            "personal_url": {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            },
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            },
            "reminder_email": {
              "id": 377,
              "referral_code": "ux7Q",
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "created_at": "2017-01-13T19:18:38.239Z",
              "sharer": null,
              "share": {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            },
            "referrer": {
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "email": "alex@example.ca",
              "name": "Taylor Gomez",
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of rewards for a specific customer.

    Path Parameters

    id*
    Friendbuy-assigned internal id of the customer to lookup. This differs from the id you have assigned to the customer. Generally this endpoint is discovered by first performing a search at the /customers endpoint and then navigating via the detail_uri property of a search result.

    *Required field

    Response Model

    RewardExcerpt
    id
    integer
    Friendbuy internal id for the reward
    status
    string
    One of pending, valid, or invalid
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    amount
    number
    Amount of the reward in units of the reward type
    rejected_reasons
    string
    JSON object with keys matching those of the conversion.fraud object and values describing the fraudulent activity in human-readable terms
    created_at
    datetime
    Timestamp at which the reward was created
    evaluate_at
    datetime
    Timestamp at which the reward validity was evaluated
    conversion
    object
    Conversion of the reward (Expand)
    ConversionExceprtWithoutRewards
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown
    email
    string
    Email address of the purchaser if known
    ip_address
    string
    IP address
    products
    array
    List of products reported in the purchase (Expand)
    Product
    sku
    string
    Product SKU
    quantity
    number
    Number of units of the product that were purchased
    price
    number
    Amount of the order, in currency units
    customer
    object
    Customer making the purchase, if known (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    detail_uri
    string
    Friendbuy REST API resource for the conversion
    created_at
    datetime
    Conversion creation timestamp
    possible_self_referral
    boolean
    Whether the conversion may have come from an advocate using their own referral. This is done by comparing the data collected at time of a purchase to the data collected at time the share, PURL, or reminder email is generated. Note: this calculation is dependent on which fraud check settings have been enabled in the Friendbuy platform (specifically, the browser, customer id, email address, and IP address checks)
    fraud
    object
    Brief report on the presence or absence of various fraud conditions (Expand)
    FraudChecks
    same_shopper
    boolean
    Whether the same browser was used in both referral and purchase
    same_customer
    boolean
    Whether the merchant-assigned customer ids of the referrer and purchaser match
    same_email
    boolean
    Whether the email addresses of the referrer and purchaser match exactly
    same_ip_address
    boolean
    Whether the IP addresses of the referrer and purchaser match exactly
    same_ip_and_user_agent
    boolean
    Whether both the IP addresses and the user agent strings of the referrer and purchaser match exactly
    fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _very_ similar
    high_sensitivity_fuzzy_email
    boolean
    Whether the email addresses of the referrer and purchaser are _loosely_ similar
    rewardDeprecated, always null
    personal_url
    object
    Present only if conversion was triggered from a PURL (Expand)
    ReferralCodeExcerpt
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    trackable_link
    string
    URI formed from the shortened domain together with the short code
    destination_url
    string
    URI in the merchant’s site that the trackable link redirects to
    referral_code_blacklisted
    boolean
    States if referral code has been invalidated from redirecting users to offer, managed within Referral Code Blacklist in the application.
    share
    object
    Present only if conversion was triggered from a share (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    reminder_email
    object
    Present only if conversion was triggered from a reminder email (Expand)
    ReminderEmail
    id
    integer
    Friendbuy-assigned id for the reminder email
    referral_code
    string
    Short alphanumeric code
    campaign
    object
    Campaign for this reminder (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Creation timestamp
    sharerQuick access to the email and customer of the sharer (if known)
    share
    object
    Share that is being reminded (Expand)
    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known
    referrer
    object
    Information about the advocate creating the conversion (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known

    Email Opt Outs

    Friendbuy maintains a list of email addresses for users who have opted out of receiving referral-related email communications from Friendbuy on behalf of your company. This list is always cross-referenced prior to sending emails from our system. For information about integrating Friendbuy with your own API endpoint, please refrer to the Email Recipient Authorization.

    GET /opt_outs/emails

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 19,
          "email": "delia@example.net",
          "ip_address": "8.8.8.8",
          "source": "upload",
          "created_at": "2017-01-13T12:11:45.736234-08:00"
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of opted-out email addresses.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)

    Response Model

    EmailOptOut
    id
    integer
    Id of the opt out record
    email
    string
    Email address on the opt out list
    ip_address
    string
    IP address associated with the opt out
    source
    string
    Source of the opt_out_list, either share if the opt out was made from a share widget, or upload if part of an uploaded opt out list
    created_at
    datetime
    Datetime at which the opt out was recorded

    POST /opt_outs/emails

    • Example
    • Try It
    // Example Request Body
    {
      "emails": [
        "pele@example.br, messi@example.ar, neuer@example.de"
      ]
    }
    
    // Example Response (202 ACCEPTED)
    {
      "message": "Processing 3 emails to the opt out list",
      "update_id": 7
    }
    
    // To see live output, click the Try It button
    

    In addition to allowing users to opt out through an unsubscribe link in email shares, you can upload a list of email addresses that is maintained by your company.

    Body Parameters

    emails*
    Array of email addresses to opt out (enter as a comma-separated list to try out)

    * Required field

    Response Model

    EmailOptOutJobSubmissionResponse
    message
    string
    Feedback from the job submission
    update_id
    integer
    Id of the created job

    GET /opt_outs/email_update/{id}

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "id": 15,
      "filename": "/tmp/907bf7ce2211aa",
      "status": "Success",
      "total_items_count": 89,
      "updated_items_count": 55,
      "failure_reason": "",
      "created_at": "2017-01-13T11:58:45.467054",
      "last_modified_at": "2017-01-13T11:58:45.467054"
    }
    
    // To see live output, click the Try It button
    

    Retrieves the status of a request to the POST /opt_outs/emails endpoint.

    Path Parameters

    id*
    Id of the email optout job to check

    *Required field

    Response Model

    EmailOptOutJob
    id
    integer
    Opt out job id
    filename
    string
    Filename
    status
    string
    One of Success, Failed, or In Progress
    total_items_count
    integer
    updated_items_count
    integer
    failure_reason
    string
    Failure reason
    created_at
    datetime
    Datetime of job creation (missing time zone)
    last_modified_at
    datetime
    Datetime of last modification (missing time zone)

    Newsletter Opt Ins

    Selected Friendbuy widgets enable users to opt in to receiving future newsletter communications from your company.

    GET /newsletter_opt_ins

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        "pele@example.br"
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves the list of email addresses that have opted in to receiving newsletter emails

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page
    from_date
    First date of range (YYYY-MM-DD, inclusive)
    to_date
    Last date of range (YYYY-MM-DD, inclusive)
    campaign
    Id of the campaign to be searched (can be found on the widget detail page of your Friendbuy dashboard, or via a search at the GET /campaigns endpoint)

    Response Model

    NewsletterOptInSearchResults
    offset
    integer
    Zero-based index of first result on this page in the entirety of all results
    this_page_results_count
    integer
    Number of results on this page
    total_results_count
    integer
    Total number of search results across all pages
    results
    array
    Array of search results

    Communication Emails

    Communication emails are targeted communications to your customers which include either transactional or promotional content. The below endpoints provide a programatic way to select the appropriate content and request an email be sent.

    GET /communication_email_templates

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 1,
          "name": "Refer a friend promotional email template",
          "email_type": "communication_promotional",
          "created_at": "2017-01-13T12:11:45.736234-08:00"
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of communication email templates.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page

    Response Model

    CommunicationEmailTemplates
    id
    integer
    Communication email template ID
    name
    string
    Name of the email template
    email_type
    string
    One of `communication_promotional` or `communication_transactional`
    created_at
    datetime
    Datetime at which the email template was recorded

    GET /coupon_banks

    • Example
    • Try It
    // Example Response (200 OK)
    {
      "offset": 20,
      "this_page_results_count": 1,
      "total_results_count": 21,
      "results": [
        {
          "id": 1,
          "name": "Fall promotion",
          "description": "Coupons for fall promotion",
          "total_coupons": 400,
          "coupons_remaining": 385
        }
      ]
    }
    
    // To see live output, click the Try It button
    

    Retrieves a list of coupon banks.

    Query Parameters

    offset
    Zero-based index of the first result to appear on the results page
    limit
    Maximum number of results to return for the page

    Response Model

    CouponBanks
    id
    integer
    Coupon bank ID
    name
    string
    Name of the coupon bank
    description
    string
    Description of the coupon bank
    total_coupons
    integer
    Total number of coupons in the coupon bank
    coupons_remaining
    integer
    Total number of coupons remaining in the coupon bank

    POST /communication_emails

    • Example
    • Try It
    // Example Request Body
    {
      "email_addresses": [
        "alex@example.ca",
        "jzheng@example.mil"
      ],
      "email_template_id": 1,
      "coupon_bank_id": 1
    }
    
    // Example Response (202 ACCEPTED)
    {
      "message": "processing 10 communication emails"
    }
    
    // To see live output, click the Try It button
    

    Send a communication email to a list of recipients.

    Body Parameters

    email_addresses
    Array of up to 10 email addresses (enter as a comma-separated list to try out)
    email_template_id
    ID of communication email template to be used
    coupon_bank_id
    ID of coupon bank to be used (must contain at least as many coupons remaining as email addresses specified)

    * Required field

    Response Model

    CommunicationEmails
    message
    string
    Message indicating success or failure for the request

    Webhooks

    Friendbuy’s webhooks provide real-time notifications to your system based on data created by a referral program. Use webhooks to:

    Each available webhook is documented below. For each webhook, a complete technical specification of the data model is provided in the center pane. The right-hand pane contains an example of such a JSON request.

    Share Webhook

    Example Post Body for Webhook

    {
      "id": 196418,
      "referral_code": "uxC",
      "message": {
        "id": "100001965159666_428859647189537",
        "content": "This is my favorite tennis racket ever",
        "network": "facebook"
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "ip_address": "8.8.8.8",
      "newsletter_opt_in": true,
      "send_reminder": true,
      "created_at": "2017-01-13T19:18:38.239Z",
      "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
      "email_recipients": [
        "pele@example.br",
        "messi@example.ar"
      ],
      "sharer": {
        "name": "Taylor Gomez",
        "email": "tgo@example.net",
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        },
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09"
      }
    }
    

    A share occurs when an advocate refers a friend directly through a Friendbuy widget. The share will be associated to a specific channel, such as email, Facebook, or Twitter.

    After a successful share, Friendbuy will send a POST request to your system with data about the share. Share webhooks are triggered only in response to direct shares, and not to dissemination of a Personal URL (PURL).

    Request Model

    ShareExcerpt
    id
    integer
    Friendbuy internal id for this share
    referral_code
    string
    Short alphanumeric code
    message
    object
    Message sent along with share (Expand)
    ShareMessage
    id
    string
    Message id assigned by facebook or twitter
    content
    string
    Text entered by the advocate
    network
    string
    Distribution channel for this share
    campaign
    object
    Campaign that is being shared (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    ip_address
    string
    IP address of the share
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the share
    send_reminder
    boolean
    Whether a reminder should be sent for the share
    created_at
    datetime
    Share creation timestamp
    detail_uri
    string
    URI endpoint at which to get full details of the share
    email_recipients
    array
    JSON-formatted array of recipients for the share, present only if (1) the share is an email share and (2) the merchant is permitted to access this information (*Contact Friendbuy to inquire about the ability to access the recipient list*)
    sharer
    object
    Information for the entity making the share (Expand)
    SharerExcerpt
    name
    string
    Name of sharer, if known
    email
    string
    Email address to receive the reward, if eventually eligible
    customer
    object
    Customer information, if available at the time of share (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    facebook_friends_count
    integer
    Number of Facebook friends, if known
    twitter_followers_count
    integer
    Number of Twitter followers, if known
    birthdate
    date
    Birthdate, if known

    Email Capture Webhook

    Example Post Body for Webhook

    {
      "id": 362752,
      "email_address": "jwu@gmail.com",
      "coupon_code": "BOGO-8910",
      "custom_properties": {
        "birthdate": "1969-07-28",
        "tel": "343-555-8680",
        "zipcode": "45678"
      },
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "created_at": "2018-02-21T19:12:38.239Z",
      "referrer": {
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        },
        "email": "alex@example.ca",
        "name": "Taylor Gomez",
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09"
      },
      "referral_code": "uxC",
      "newsletter_opt_in": true,
      "ip_address": "8.8.8.8",
      "purchase_history_validation_passed": false
    }
    

    An email capture event occurs when a referred friend or site visitor submits their email address through an email capture widget.

    After a successful email capture, Friendbuy will send a POST request to your system with data about the email capture, the visitor, and offer (if applicable). If the visitor is a referred friend, details about the referring advocate will also be included.

    Request Model

    EmailCaptureExcerpt
    id
    integer
    Friendbuy internal id for this email capture
    email_address
    string
    The email address that was captured
    coupon_code
    string
    The coupon code that was provided after email capture, if given
    custom_properties
    object
    Additional data collected by the email capture widget
    campaign
    object
    Campaign for this email capture (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    created_at
    datetime
    Email capture creation timestamp
    referrer
    object
    Information about the advocate who referred the email capture (Expand)
    Referrer
    customer
    object
    Present only if referral is a customer personal url or a share with a known customer (Expand)
    CustomerExcerpt
    account_id
    string
    The id you assigned to your customer (not the same as the internal Friendbuy-assigned id)
    id
    string
    Copy of the account_id field
    first_name
    string
    Customer first name
    last_name
    string
    Customer last name
    email
    string
    Email associated with the customer
    stripe_customer_id
    string
    Stripe’s id for the customer
    chargebee_customer_id
    string
    Chargebee’s id for the customer
    detail_uri
    string
    URI at which complete details of the customer can be retrieved
    email
    string
    Present only if referral is an email personal url or a share with a known referring email
    name
    string
    Name of referrer, if conversion was from a share
    facebook_friends_count
    integer
    Number of Facebook friends of sharer, if known
    twitter_followers_count
    integer
    Number of Twitter followers of sharer, if known
    birthdate
    date
    Birthdate of sharer, if known
    referral_code
    string
    Short alphanumeric code (e.g., uxC)
    newsletter_opt_in
    boolean
    Whether a newsletter opt in should take place with the email capture
    ip_address
    string
    IP address associated with the email capture
    purchase_history_validation_passed
    boolean
    Indicates if Friendbuy has already recorded a purchase associated with the email address provided by the visitor. This property is only included in the payload for email capture widgets that have this validation check enabled.

    Conversion Webhook

    Example Post Body for Webhook

    {
      "id": 121393,
      "status": "paid",
      "type": "share",
      "campaign": {
        "id": 233,
        "name": "Fall Shoe Sale",
        "published": true,
        "referral_incentive": {
          "type": "fixed_cash",
          "value": 25
        },
        "created_at": "2015-08-09T03:20:11.098230-07:00"
      },
      "purchase": {
        "order_id": "PQZ-4181",
        "coupon_code": "COUPON123456",
        "date": "2017-04-01T11:07:40.904Z",
        "total": 15.97,
        "new_customer": "true",
        "email": "adrian@example.fi",
        "ip_address": "200.1.2.3",
        "products": [
          {
            "sku": "99P88Q77R",
            "quantity": 21,
            "price": 319.99
          }
        ],
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        }
      },
      "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
      "created_at": "2016-03-01T19:12:38.239Z",
      "possible_self_referral": true,
      "fraud": {
        "same_shopper": false,
        "same_customer": false,
        "same_email": false,
        "same_ip_address": false,
        "same_ip_and_user_agent": false,
        "fuzzy_email": false,
        "high_sensitivity_fuzzy_email": false
      },
      "reward": "null",
      "personal_url": {
        "referral_code": "uxC",
        "trackable_link": "http://fbuy.me/uxC",
        "destination_url": "http://mycompany.example.com/rewards/908",
        "referral_code_blacklisted": true
      },
      "share": {
        "id": 196418,
        "referral_code": "uxC",
        "message": {
          "id": "100001965159666_428859647189537",
          "content": "This is my favorite tennis racket ever",
          "network": "facebook"
        },
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "ip_address": "8.8.8.8",
        "newsletter_opt_in": true,
        "send_reminder": true,
        "created_at": "2017-01-13T19:18:38.239Z",
        "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
        "email_recipients": [
          "pele@example.br",
          "messi@example.ar"
        ],
        "sharer": {
          "name": "Taylor Gomez",
          "email": "tgo@example.net",
          "customer": {
            "account_id": "JAYZ",
            "id": "JAYZ",
            "first_name": "Jaylene",
            "last_name": "Zheng",
            "email": "jzheng@example.mil",
            "stripe_customer_id": "cus_Agg4bCEhno7A1E",
            "chargebee_customer_id": "4gkYnd21ouvW",
            "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
          },
          "facebook_friends_count": 987,
          "twitter_followers_count": 121393,
          "birthdate": "1989-11-09"
        }
      },
      "reminder_email": {
        "id": 377,
        "referral_code": "ux7Q",
        "campaign": {
          "id": 233,
          "name": "Fall Shoe Sale",
          "published": true,
          "referral_incentive": {
            "type": "fixed_cash",
            "value": 25
          },
          "created_at": "2015-08-09T03:20:11.098230-07:00"
        },
        "created_at": "2017-01-13T19:18:38.239Z",
        "sharer": null,
        "share": {
          "id": 196418,
          "referral_code": "uxC",
          "message": {
            "id": "100001965159666_428859647189537",
            "content": "This is my favorite tennis racket ever",
            "network": "facebook"
          },
          "campaign": {
            "id": 233,
            "name": "Fall Shoe Sale",
            "published": true,
            "referral_incentive": {
              "type": "fixed_cash",
              "value": 25
            },
            "created_at": "2015-08-09T03:20:11.098230-07:00"
          },
          "ip_address": "8.8.8.8",
          "newsletter_opt_in": true,
          "send_reminder": true,
          "created_at": "2017-01-13T19:18:38.239Z",
          "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
          "email_recipients": [
            "pele@example.br",
            "messi@example.ar"
          ],
          "sharer": {
            "name": "Taylor Gomez",
            "email": "tgo@example.net",
            "customer": {
              "account_id": "JAYZ",
              "id": "JAYZ",
              "first_name": "Jaylene",
              "last_name": "Zheng",
              "email": "jzheng@example.mil",
              "stripe_customer_id": "cus_Agg4bCEhno7A1E",
              "chargebee_customer_id": "4gkYnd21ouvW",
              "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
            },
            "facebook_friends_count": 987,
            "twitter_followers_count": 121393,
            "birthdate": "1989-11-09"
          }
        }
      },
      "referrer": {
        "customer": {
          "account_id": "JAYZ",
          "id": "JAYZ",
          "first_name": "Jaylene",
          "last_name": "Zheng",
          "email": "jzheng@example.mil",
          "stripe_customer_id": "cus_Agg4bCEhno7A1E",
          "chargebee_customer_id": "4gkYnd21ouvW",
          "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
        },
        "email": "alex@example.ca",
        "name": "Taylor Gomez",
        "facebook_friends_count": 987,
        "twitter_followers_count": 121393,
        "birthdate": "1989-11-09"
      },
      "rewards": [
        {
          "id": 3181,
          "status": "valid",
          "type": "fixed_cash",
          "amount": 10,
          "rejected_reasons": "",
          "created_at": "2017-01-13T19:18:38.239Z",
          "evaluate_at": "2017-01-13T19:20:38.211Z",
          "conversion": {
            "id": 121393,
            "status": "paid",
            "type": "share",
            "campaign": {
              "id": 233,
              "name": "Fall Shoe Sale",
              "published": true,
              "referral_incentive": {
                "type": "fixed_cash",
                "value": 25
              },
              "created_at": "2015-08-09T03:20:11.098230-07:00"
            },
            "purchase": {
              "order_id": "PQZ-4181",
              "coupon_code": "COUPON123456",
              "date": "2017-04-01T11:07:40.904Z",
              "total": 15.97,
              "new_customer": "true",
              "email": "adrian@example.fi",
              "ip_address": "200.1.2.3",
              "products": [
                {
                  "sku": "99P88Q77R",
                  "quantity": 21,
                  "price": 319.99
                }
              ],
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              }
            },
            "detail_uri": "https://developer-api.friendbuy.com/v1/conversions/121393",
            "created_at": "2016-03-01T19:12:38.239Z",
            "possible_self_referral": true,
            "fraud": {
              "same_shopper": false,
              "same_customer": false,
              "same_email": false,
              "same_ip_address": false,
              "same_ip_and_user_agent": false,
              "fuzzy_email": false,
              "high_sensitivity_fuzzy_email": false
            },
            "reward": "null",
            "personal_url": {
              "referral_code": "uxC",
              "trackable_link": "http://fbuy.me/uxC",
              "destination_url": "http://mycompany.example.com/rewards/908",
              "referral_code_blacklisted": true
            },
            "share": {
              "id": 196418,
              "referral_code": "uxC",
              "message": {
                "id": "100001965159666_428859647189537",
                "content": "This is my favorite tennis racket ever",
                "network": "facebook"
              },
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "ip_address": "8.8.8.8",
              "newsletter_opt_in": true,
              "send_reminder": true,
              "created_at": "2017-01-13T19:18:38.239Z",
              "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
              "email_recipients": [
                "pele@example.br",
                "messi@example.ar"
              ],
              "sharer": {
                "name": "Taylor Gomez",
                "email": "tgo@example.net",
                "customer": {
                  "account_id": "JAYZ",
                  "id": "JAYZ",
                  "first_name": "Jaylene",
                  "last_name": "Zheng",
                  "email": "jzheng@example.mil",
                  "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                  "chargebee_customer_id": "4gkYnd21ouvW",
                  "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                },
                "facebook_friends_count": 987,
                "twitter_followers_count": 121393,
                "birthdate": "1989-11-09"
              }
            },
            "reminder_email": {
              "id": 377,
              "referral_code": "ux7Q",
              "campaign": {
                "id": 233,
                "name": "Fall Shoe Sale",
                "published": true,
                "referral_incentive": {
                  "type": "fixed_cash",
                  "value": 25
                },
                "created_at": "2015-08-09T03:20:11.098230-07:00"
              },
              "created_at": "2017-01-13T19:18:38.239Z",
              "sharer": null,
              "share": {
                "id": 196418,
                "referral_code": "uxC",
                "message": {
                  "id": "100001965159666_428859647189537",
                  "content": "This is my favorite tennis racket ever",
                  "network": "facebook"
                },
                "campaign": {
                  "id": 233,
                  "name": "Fall Shoe Sale",
                  "published": true,
                  "referral_incentive": {
                    "type": "fixed_cash",
                    "value": 25
                  },
                  "created_at": "2015-08-09T03:20:11.098230-07:00"
                },
                "ip_address": "8.8.8.8",
                "newsletter_opt_in": true,
                "send_reminder": true,
                "created_at": "2017-01-13T19:18:38.239Z",
                "detail_uri": "https://developer-api.friendbuy.com/v1/shares/196418",
                "email_recipients": [
                  "pele@example.br",
                  "messi@example.ar"
                ],
                "sharer": {
                  "name": "Taylor Gomez",
                  "email": "tgo@example.net",
                  "customer": {
                    "account_id": "JAYZ",
                    "id": "JAYZ",
                    "first_name": "Jaylene",
                    "last_name": "Zheng",
                    "email": "jzheng@example.mil",
                    "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                    "chargebee_customer_id": "4gkYnd21ouvW",
                    "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
                  },
                  "facebook_friends_count": 987,
                  "twitter_followers_count": 121393,
                  "birthdate": "1989-11-09"
                }
              }
            },
            "referrer": {
              "customer": {
                "account_id": "JAYZ",
                "id": "JAYZ",
                "first_name": "Jaylene",
                "last_name": "Zheng",
                "email": "jzheng@example.mil",
                "stripe_customer_id": "cus_Agg4bCEhno7A1E",
                "chargebee_customer_id": "4gkYnd21ouvW",
                "detail_uri": "https://developer-api.friendbuy.com/v1/customers/1"
              },
              "email": "alex@example.ca",
              "name": "Taylor Gomez",
              "facebook_friends_count": 987,
              "twitter_followers_count": 121393,
              "birthdate": "1989-11-09"
            }
          }
        }
      ]
    }
    

    A conversion occurs when (1) Friendbuy is notified of a purchase and (2) we are able to associate to that purchase to an advocate’s referral via the referral code or coupon code provided to their friend.

    You can notify Friendbuy of a purchase through a Track Order call via the Friendbuy JavaScript embedded on your site, or through the POST /purchases endpoint.

    After a successful conversion, Friendbuy will send a POST request to your system containing data about the conversion.

    Request Model

    ConversionExcerpt
    id
    integer
    Friendbuy internal id for this conversion
    status
    string
    One of unmarked, paid, or rejected
    type
    string
    One of share, customer_personal_url, email_personal_url, or reminder_email
    campaign
    object
    Campaign for this reward (Expand)
    CampaignExcerpt
    id
    integer
    Friendbuy-assigned id for the campaign
    name
    string
    Name of the campaign
    published
    boolean
    Whether the campaign has been published
    referral_incentive
    object
    Incentive for the campaign (Expand)
    ReferralIncentive
    type
    string
    One of percent_discount, fixed_cash, fixed_points, stripe_credit or other
    value
    number
    Amount of the reward in units of the reward type
    created_at
    datetime
    Creation timestamp
    purchase
    object
    Purchase triggering the conversion if any (Expand)
    PurchaseExcerpt
    order_id
    string
    Order Id of the purchase
    coupon_code
    string
    Present if a coupon code was used to make the purchase
    date
    string
    Timestamp of purchase (missing time zone)
    total
    number
    Total purchase amount reported
    new_customer
    boolean
    Whether or not the purchase was reported to have been made by a new (first-time) customer, one of true, false, or unknown