POST
/
v2
/
earn
/
reverse

Authorizations

Authorization
string
header
required

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

Body

application/json

Transaction details to reverse the earned points

activityTimestamp
string
required

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

checkForDuplicateTransaction
integer
required

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

discountValue
number | null
required

Discount amount applied on the transaction.

entityReference
string
required

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

Required string length: 3 - 15
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.

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.

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.

reverseTransactionExternalRef
string
required

External reference number of the transaction to be reversed

Required string length: 1 - 100
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.

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

transactionTypeExternalReference
string
required

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

Required string length: 3 - 15
cancelAuditUser
string | null

Representative who cancelled the earn transaction.

Required string length: 1 - 100
discounts
object[]

Discount details.

isCompanyUser
boolean
default:
false

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

issueAuditUser
string | null

Representative who issued the earn transaction.

Required string length: 1 - 100
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
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.

transactionItems
object[]

Details of the transaction items to be reversed.

Response

200 - application/json

Metadata for the Earn Reverse response

data
object

Earn Reverse response details

errors
object

In a successful response, this is always a blank object

message
string

Message corresponding to the status code.

status
integer

Status code for the call