> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mention-me.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrol referrer

> 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



## OpenAPI

````yaml /openapi/consumer_api.oas.json post /api/consumer/{version}/referrer/enrol
openapi: 3.0.0
info:
  title: Consumer API
  description: Create your own front end for the referral journey using our Consumer API.
  termsOfService: https://mention-me.com/help/tnc_f/site
  version: v2
servers:
  - url: https://mention-me.com
    description: Production
  - url: https://demo.mention-me.com
    description: Demo
security: []
tags:
  - name: Record Order
  - name: Enrol Referrer
  - name: Get referrer dashboard
  - name: Find referrer by name
  - name: Link new customer to referrer
paths:
  /api/consumer/{version}/referrer/enrol:
    post:
      tags:
        - Enrol Referrer
      summary: Enrol referrer
      description: >-
        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
      operationId: post_api_referrer_enrol
      parameters:
        - name: version
          in: path
          description: Version
          required: true
          schema:
            type: string
            pattern: v2|v1
            enum:
              - v2
              - v1
          example: v2
      requestBody:
        description: Details of the customer to enrol
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrolReferrerType'
      responses:
        '200':
          description: Returned when successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralShareOffer'
        '404':
          description: Returned when there is no suitable offer to serve this customer
        '422':
          description: The referrer could not be enrolled due to validation errors
        '500':
          description: Internal server error, unable to complete the request
components:
  schemas:
    EnrolReferrerType:
      required:
        - customer
        - request
      properties:
        customer:
          title: Customer
          description: Information about the referrer to enrol
          oneOf:
            - $ref: '#/components/schemas/CustomerEnrolling'
        request:
          title: Request
          description: Information about the request
          oneOf:
            - $ref: '#/components/schemas/RequestWithVariation'
        order:
          title: Order
          description: >-
            Information about the order (used for recording order events AND
            segmentation)
          oneOf:
            - $ref: '#/components/schemas/OrderDetails'
        address:
          title: Address
          description: Information about the address of the customer, for segmentation
          oneOf:
            - $ref: '#/components/schemas/AddressWithCountry'
      type: object
    ReferralShareOffer:
      properties:
        offer:
          title: Description of the offer and rewards.
          oneOf:
            - $ref: '#/components/schemas/Offer'
        nameShare:
          title: 'Name Share information:'
          description: >-
            Details about NameShare, including the name someone can search for
            and their referral code if available.
          oneOf:
            - $ref: '#/components/schemas/NameShare'
        shareLinks:
          title: List of share links for different share mechanisms.
          type: array
          items:
            $ref: '#/components/schemas/ShareLink'
        termsLinks:
          title: Links to the terms and conditions for this offer.
          oneOf:
            - $ref: '#/components/schemas/TermsLinks'
      type: object
    CustomerEnrolling:
      required:
        - emailAddress
        - firstname
        - surname
      properties:
        emailAddress:
          description: Customer email address
          type: string
          example: jane.doe@example.com
        title:
          description: Customer title such as Mr, Miss, Dr or Sir
          type: string
          example: ''
        firstname:
          description: Customer firstname
          type: string
          example: ''
        surname:
          description: Customer surname
          type: string
          example: ''
        uniqueIdentifier:
          description: Your unique identifier for this customer e.g. CustomerId
          type: string
          example: ''
        segment:
          description: >-
            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.
          type: string
          example: ''
        customField:
          description: >-
            Custom field - a string containing custom data about this customer,
            e.g. SEGMENT001 or Package B
          type: string
          example: ''
        visitorId:
          description: >-
            The visitor ID from the MentionMe Browser Fingerprint, used to link
            customer journeys. This should be a SHA256 hash (browserId +
            clientIP).
          type: string
          example: ''
        hasEngaged:
          description: >-
            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.
          type: boolean
          example: false
      type: object
    RequestWithVariation:
      required:
        - partnerCode
        - situation
        - localeCode
      properties:
        partnerCode:
          description: Your partner code, used to link to your users and offers
          type: string
          example: '[YOUR-PARTNER-CODE]'
        situation:
          description: >-
            Situation - a string representing where in the application you are
            making this request
          type: string
          example: mobile-app
        segment:
          description: Segment - the segment the customer belongs to
          type: string
          example: vip
        localeCode:
          description: >-
            Locale code - ISO standard locale code (e.g. en_GB) for the locale
            you expect the content to be in
          type: string
          example: en_GB
        ipAddress:
          description: >-
            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.
          type: string
          example: 127.0.0.1
        userDeviceIdentifier:
          description: >-
            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.
          type: string
          example: ''
        deviceType:
          description: >-
            Device type - your description of the device the user is using. We
            use this for performance and conversion optimisation.
          type: string
          example: ''
        appName:
          description: Your application name. Used for reporting.
          type: string
          example: ''
        appVersion:
          description: >-
            Your application version reference. Used for reporting and
            troubleshooting.
          type: string
          example: e.g. MyApp/v1.73
        variation:
          description: >-
            Variation - an index (0,1,2...) specifying which of the currently
            running AB tests to choose (if available)
          type: string
          example: ''
      type: object
    OrderDetails:
      required:
        - orderIdentifier
        - total
        - currencyCode
        - dateString
      properties:
        orderIdentifier:
          description: Your Order Identifier for the transaction that has taken place
          type: string
          example: '123456'
        total:
          description: >-
            Order subtotal, excluding tax and shipping in the currency specified
            by currencyCode
          type: string
          example: '100'
        currencyCode:
          description: >-
            3 letter currency code for the currency in which the transaction
            took place. Use the ISO4217 format (e.g. GBP, EUR, etc
          type: string
          example: GBP
        dateString:
          description: >-
            The date on which the transaction took place (typically the current
            date/time). Use ISO8601 format (e.g. 2016-11-30T17:52:50Z)
          type: string
          example: '2026-01-01T12:00:00+00:00'
        couponCode:
          description: >-
            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.
          type: string
          example: ABC23252
        discountAmount:
          description: >-
            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.
          type: string
          example: '12.44'
        orderItemCount:
          description: >-
            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.
          type: string
          example: '3'
        isSubscription:
          description: >-
            Whether this order is for a subscription (recurring). This helps us
            qualify and categorise the revenue.
          type: boolean
          example: ''
        isGift:
          description: >-
            Whether this order is a gift (being bought for someone else). Gifts
            can be signals of advocacy.
          type: boolean
          example: ''
      type: object
    AddressWithCountry:
      properties:
        addressCountry:
          description: Country of address e.g. UK or France
          type: string
          example: ''
      type: object
    Offer:
      properties:
        id:
          title: The identifier of the offer.
          type: integer
        localeCode:
          title: The locale code of the Offer.
          type: string
        headline:
          title: The headline description for the Offer.
          description: e.g. "You can get a £20 gift card if you refer a friend to ..."
          type: string
        description:
          title: The details of the Offer.
          description: e.g. "Give your friends a 20% off introductory offer"
          type: string
        callToAction:
          title: >-
            The callToAction text of the Offer - typically goes on the button of
            the offer
          description: e.g. "Get a £20 gift card"
          type: string
        privacyNotice:
          title: >-
            The privacyNotice text of the Offer - typically shown near the CTA
            if required by privacy regulation
          description: e.g. "Get a £20 gift card"
          type: string
        privacyLink:
          title: >-
            The URL to the Mention Me privacy policy - typically shown near the
            Privacy Notice.
          description: e.g. "https://mention-me.com/help/privacy_policy"
          type: string
        referrerReward:
          title: The explicit description of the Referrer Reward for the Referrer.
          oneOf:
            - $ref: '#/components/schemas/Reward'
        refereeReward:
          title: The explicit description of the Referee reward for the Referrer.
          oneOf:
            - $ref: '#/components/schemas/Reward'
      type: object
    NameShare:
      properties:
        name:
          type: string
        referralCode:
          title: 'External docs:'
          description: >-
            Unique code this person can share with others to enter in the "Been
            referred by a friend?" section of your website.
          type: string
      type: object
    ShareLink:
      properties:
        type:
          title: >-
            The type of share mechanism (e.g. Facebook, Twitter, Open link,
            Email link)
          type: string
        protocol:
          title: The protocol (if available) for the share
          type: string
        url:
          title: The url to include in the share
          type: string
        defaultShareMessage:
          title: The default message to include in the share
          type: string
          default: ''
        exampleImplementation:
          title: >-
            An example of the share URL you could use to initiate this share.
            You are free to implement this your own way if you wish.
          type: string
          default: ''
      type: object
    TermsLinks:
      properties:
        localeCode:
          title: The locale code of the terms link
          type: string
        linkToTermsInLocale:
          title: Link to the terms and conditions in the locale stated
          type: string
      type: object
    Reward:
      properties:
        description:
          title: Friendly description of a reward for the intended recipient.
          description: >-
            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"
          type: string
        summary:
          title: >-
            Summary - now deprecated - it serves no purpose over and above the
            description.
          type: string
        amount:
          title: >-
            The reward amount - now deprecated (because rewards don't have a
            consistent amount - some have text, percentage, number. Use the
            description to describe the reward.
          type: string
      type: object

````