---
title: "Record order with a coupon"
method: POST
path: "/api/consumer/{version}/coupon_redemption"
tags: ["Record Order"]
---

# Record order with a coupon

`POST /api/consumer/{version}/coupon_redemption`

For In-Store situations where a referral transaction can occur identified by a coupon
and typically without a customer email address.

The coupon must be a single-use coupon. You can validate the coupon code first using the Merchant API -> Validate Coupon Code endpoint if you wish.

If you have an email address and may not have a coupon, use the Record Order endpoint instead.

We will use the order confirmation to:

- Record the customer is an existing customer and no longer eligible for introductory rewards
(and mark their referral as redeemed)

- Reward a referrer if this purchase was as a result of a referral


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

## Path parameters

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

## Request body

- ConfirmOrderWithCouponType
  - `order` OrderWithCouponType, required
    - `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, required — The coupon that was used in the transaction. 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.
  - `customer` CustomerDetails
    - `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).
  - `request` Request, 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.
  - `address` Address
    - `addressLine1` string — First line of address
    - `addressLine2` string — Second line of address
    - `addressCity` string — City part of address
    - `addressCounty` string — County or state part of address
    - `addressPostCode` string — Post or ZIP code
    - `addressCountry` string — Country of address

## Response `202`

Returned when successful

## Other responses

- `400` — The request contains errors
- `403` — Returned when the integration for this merchant is not enabled
- `404` — Returned when it is not possible to confirm an order took place with these details
- `422` — The request cannot be processed because of validation errors
- `500` — Internal server error, unable to complete the request

---

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