---
title: "Enrol referrer"
method: POST
path: "/api/consumer/{version}/referrer/enrol"
tags: ["Enrol Referrer"]
---

# Enrol referrer

`POST /api/consumer/{version}/referrer/enrol`

Tell us about a customer (and any related order and segmentation details) to enrol them as a referrer and receive an offer to share with them

## Path parameters

- `version` 'v2' | 'v1', required

## Request body

- EnrolReferrerType
  - `customer` CustomerEnrolling, required
    - `emailAddress` string, required — Customer email address
    - `title` string — Customer title such as Mr, Miss, Dr or Sir
    - `firstname` string, required — Customer firstname
    - `surname` string, required — Customer surname
    - `uniqueIdentifier` string — Your unique identifier for this customer e.g. CustomerId
    - `segment` string — Customer segment - a string containing segment data about this customer, e.g. vip or employee. You can concatenate multiple segments together if you wish using hyphens.
    - `customField` string — Custom field - a string containing custom data about this customer, e.g. SEGMENT001 or Package B
    - `visitorId` string — The visitor ID from the MentionMe Browser Fingerprint, used to link customer journeys. This should be a SHA256 hash (browserId + clientIP).
    - `hasEngaged` boolean — Has this customer been informed of their privacy rights, and actively engaged in the offer? Mention Me expects you to set this as false when you first show the offer, and true when someone has actively engaged, e.g. after clicking a call to action. If no value is provided, we will use the default defined on the offer.
  - `request` RequestWithVariation, required
    - `partnerCode` string, required — Your partner code, used to link to your users and offers
    - `situation` string, required — Situation - a string representing where in the application you are making this request
    - `segment` string — Segment - the segment the customer belongs to
    - `localeCode` string, required — Locale code - ISO standard locale code (e.g. en_GB) for the locale you expect the content to be in
    - `ipAddress` string — IP address of the customer connection. If you're making a request on behalf of a customer, pass their IP address here. If the customer will connect directly, leave this empty and we will retrieve this from their request.
    - `userDeviceIdentifier` string — User Device Identifier should be a unique reference to this device. We use this for preventing gaming. Multiple users with the same Device Identifier will be treated as the same individual and may be flagged for gaming. On Android the UniqueID could be an InstanceID or GUID. On iPhone the UniqueID should be generated by identifierForVendor.
    - `deviceType` string — Device type - your description of the device the user is using. We use this for performance and conversion optimisation.
    - `appName` string — Your application name. Used for reporting.
    - `appVersion` string — Your application version reference. Used for reporting and troubleshooting.
    - `variation` string — Variation - an index (0,1,2...) specifying which of the currently running AB tests to choose (if available)
  - `order` OrderDetails
    - `orderIdentifier` string, required — Your Order Identifier for the transaction that has taken place
    - `total` string, required — Order subtotal, excluding tax and shipping in the currency specified by currencyCode
    - `currencyCode` string, required — 3 letter currency code for the currency in which the transaction took place. Use the ISO4217 format (e.g. GBP, EUR, etc
    - `dateString` string, required — The date on which the transaction took place (typically the current date/time). Use ISO8601 format (e.g. 2016-11-30T17:52:50Z)
    - `couponCode` string — If a coupon was used in the transaction, the coupon code the consumer used. If multiple coupons were used, pass them as a comma separated list. Leave blank if no coupon was used.
    - `discountAmount` string — The discount amount. Our assumption is this has already been taken off the order subtotal provided. This allows us to calculate the Cost Per Acquisition for referral.
    - `orderItemCount` string — The number of items in the order/cart (if applicable). This helps us understand the type of purchase and can be a signal of advocacy.
    - `isSubscription` boolean — Whether this order is for a subscription (recurring). This helps us qualify and categorise the revenue.
    - `isGift` boolean — Whether this order is a gift (being bought for someone else). Gifts can be signals of advocacy.
  - `address` AddressWithCountry
    - `addressCountry` string — Country of address e.g. UK or France

## Response `200`

Returned when successful

- ReferralShareOffer
  - `offer` Offer
    - `id` integer
    - `localeCode` string
    - `headline` string — e.g. "You can get a £20 gift card if you refer a friend to ..."
    - `description` string — e.g. "Give your friends a 20% off introductory offer"
    - `callToAction` string — e.g. "Get a £20 gift card"
    - `privacyNotice` string — e.g. "Get a £20 gift card"
    - `privacyLink` string — e.g. "https://mention-me.com/help/privacy_policy"
    - `referrerReward` Reward
      - `description` string — The description we give may vary depending on the point in the flow that we choose to give it. Note that in some cases this might be "promising the reward" and in other cases "giving it". e.g. "You'll get £20 for each friend you refer" e.g. "Your friends get a free camera when they order for the first time" e.g. "A 20% discount code"
      - `summary` string
      - `amount` string
    - `refereeReward` Reward
      - `description` string — The description we give may vary depending on the point in the flow that we choose to give it. Note that in some cases this might be "promising the reward" and in other cases "giving it". e.g. "You'll get £20 for each friend you refer" e.g. "Your friends get a free camera when they order for the first time" e.g. "A 20% discount code"
      - `summary` string
      - `amount` string
  - `nameShare` NameShare
    - `name` string
    - `referralCode` string — Unique code this person can share with others to enter in the "Been referred by a friend?" section of your website.
  - `shareLinks` ShareLink[]
    - `type` string
    - `protocol` string
    - `url` string
    - `defaultShareMessage` string
    - `exampleImplementation` string
  - `termsLinks` TermsLinks
    - `localeCode` string
    - `linkToTermsInLocale` string

## Other responses

- `404` — Returned when there is no suitable offer to serve this customer
- `422` — The referrer could not be enrolled due to validation errors
- `500` — Internal server error, unable to complete the request

---

[API](https://skmtc.dev/mention-me/apis/auth-api.md) · [All operations](https://skmtc.dev/mention-me/apis/auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mention-me/auth-api/revisions/cdad84f071bd/schema)
