Reverse Earned Points
When a member cancels a purchase transaction or returns an order, this endpoint cancels all the points earned in that transaction.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Transaction details to reverse the earned points
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.
"67460e74-02e3-11e8-b443-00163e990bdb"
Unique name or ID of store (or entity) where the transaction took place.
3 - 15
"LIBERTY_STORE"
External reference number of the transaction to be reversed
1 - 100
"LOYALTY-12345"
External reference for transaction type such purchase
, return
, or exchange
(configurable as per requirement).
3 - 15
"RETURN"
Activity date (in UTC format). An activity could be enrolling a member, making a transaction, etc.
"2020-02-08 09:30:26"
Order ID or receipt ID for the transaction (received from the store). This is needed to cancel or return an order.
1 - 100
"LOYALTY-8675"
0 indicates the system allows duplicate and 1 indicates there is a validation in place to identify duplicates.
1
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.
1
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
-100
Discount amount applied on the transaction.
-20
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.
-80
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.
-10
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.
-70
Discount details.
Discount details
Representative who issued the earn transaction.
1 - 100
"Joe"
Representative who cancelled the earn transaction.
1 - 100
"Mia"
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.
[]
true: Points in Pending status <br /> false: Points in Active status. Note: The time period for Pending state is configurable.
Reason code to categorize transactions. A parent company can configure custom codes for their stores as required.
1 - 4
"9393"
When reason codes are not configured, store can make use of the reason description.
1 - 20
"returning item"
Details of the transaction items to be reversed.
Details of items returned
true: Company user is running the endpoint <br /> false: Client user is running the endpoint.
Response
Metadata for the Earn Reverse
response
Status code for the call
201
Message corresponding to the status code.
"earn reversed"
In a successful response, this is always a blank object
{}
Earn Reverse response details
Was this page helpful?