> ## 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.

# Record order

> Tell us that an order took place.

We will use the order to:

- Record the customer is an existing customer and no longer eligible for introductory rewards - Reward a referrer if this purchase was as a result of a referral

We will also use the data to optimise your referral scheme.



## OpenAPI

````yaml /openapi/consumer_api.oas.json post /api/consumer/{version}/order
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}/order:
    post:
      tags:
        - Record Order
      summary: Record order
      description: >-
        Tell us that an order took place.


        We will use the order to:


        - Record the customer is an existing customer and no longer eligible for
        introductory rewards - Reward a referrer if this purchase was as a
        result of a referral


        We will also use the data to optimise your referral scheme.
      operationId: post_api_order
      parameters:
        - name: version
          in: path
          description: Version
          required: true
          schema:
            type: string
            pattern: v2|v1
            enum:
              - v2
              - v1
          example: v2
      requestBody:
        description: About the order
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmOrderType'
      responses:
        '202':
          description: Returned when successful
        '400':
          description: The request contains errors
        '403':
          description: Returned when the integration for this merchant is not enabled
        '404':
          description: >-
            Returned when it is not possible to confirm an order took place with
            these details
        '422':
          description: The request cannot be processed because of validation errors
        '500':
          description: Internal server error, unable to complete the request
components:
  schemas:
    ConfirmOrderType:
      required:
        - order
        - customer
        - request
      properties:
        order:
          title: Order
          description: Information about the order which took place
          oneOf:
            - $ref: '#/components/schemas/OrderDetails'
        customer:
          title: Customer
          description: Information about the customer who placed the order
          oneOf:
            - $ref: '#/components/schemas/CustomerDetails'
        request:
          title: Request
          description: Information about the request
          oneOf:
            - $ref: '#/components/schemas/Request'
        address:
          title: Address
          description: Information about the address of the customer who placed the order
          oneOf:
            - $ref: '#/components/schemas/Address'
      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
    CustomerDetails:
      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: ''
      type: object
    Request:
      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
      type: object
    Address:
      properties:
        addressLine1:
          description: First line of address
          type: string
          example: ''
        addressLine2:
          description: Second line of address
          type: string
          example: ''
        addressCity:
          description: City part of address
          type: string
          example: ''
        addressCounty:
          description: County or state part of address
          type: string
          example: ''
        addressPostCode:
          description: Post or ZIP code
          type: string
          example: ''
        addressCountry:
          description: Country of address
          type: string
          example: ''
      type: object

````