POST
/
v2
/
earn
/
reverse

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Transaction details to reverse the earned points

profileId
string
required

Profile ID of the member. In an ecosystem, it acts as a primary ID to keep the various systems (apps, websites, etc.) in sync. profileId is generated as part of the Enroll Member endpoint - POST /members.

entityReference
string
required

Unique name or ID of store (or entity) where the transaction took place.

Required string length: 3 - 15
reverseTransactionExternalRef
string
required

External reference number of the transaction to be reversed

Required string length: 1 - 100
transactionTypeExternalReference
string
required

External reference for transaction type such purchase, return, or exchange (configurable as per requirement).

Required string length: 3 - 15
activityTimestamp
string
required

Activity date (in UTC format). An activity could be enrolling a member, making a transaction, etc.

transactionExternalReference
string
required

Order ID or receipt ID for the transaction (received from the store). This is needed to cancel or return an order.

Required string length: 1 - 100
checkForDuplicateTransaction
integer
required

0 indicates the system allows duplicate and 1 indicates there is a validation in place to identify duplicates.

fetchUpdatedMemberPointTotals
integer
required

A value of 1 indicates the total points (including the points earned in the latest transaction) are calculated and displayed to the member. A value of 0 indicates the total points are not calculated and the member is only notified if the earn is successful. The response is faster when the value is 0 because there is no calculations involved.

transactionGrossAmount
number
required

Transaction gross amount. For example, gross amount of item1 is 50.00 and gross amount of item2 is 100.00, then transactionGrossAmount is 150.00

discountValue
number | null
required

Discount amount applied on the transaction.

totalAmountPaid
number
required

Total amount paid for the items. For example, the amount paid for item1 is 100.00 and the amount of item2 is 200.00 so the total amount paid is 300.00.

totalTax
number
required

Final tax amount based on the number of items in the transaction. Example - the tax amount of item1 is 2.00; Tax amount of item2 is 2.00. The totalTax is 4.00.

netAmount
number
required

Net transaction amount. Example - the net amount of item1 is 100.00 and net amount of item2 is 200.00. So, the netAmount is 300.00.

discounts
object[]

Discount details.

issueAuditUser
string | null

Representative who issued the earn transaction.

Required string length: 1 - 100
cancelAuditUser
string | null

Representative who cancelled the earn transaction.

Required string length: 1 - 100
redemptionCode
string[] | null

Redemption code used to identify and link the rewards used in a specific transaction. This code is generated in the response of the Issue Variable Rewards endpoint - POST /api/v1/redeem/reward/issue.

setToPending
boolean

true: Points in Pending status <br /> false: Points in Active status. Note: The time period for Pending state is configurable.

reasonCode
string | null

Reason code to categorize transactions. A parent company can configure custom codes for their stores as required.

Required string length: 1 - 4
reasonDescription
string | null

When reason codes are not configured, store can make use of the reason description.

Required string length: 1 - 20
transactionItems
object[]

Details of the transaction items to be reversed.

isCompanyUser
boolean
default: false

true: Company user is running the endpoint <br /> false: Client user is running the endpoint.

Response

200 - application/json

Metadata for the Earn Reverse response

status
integer

Status code for the call

message
string

Message corresponding to the status code.

errors
object

In a successful response, this is always a blank object

data
object

Earn Reverse response details