Earn
Reverse Earned Points
Authentication v1
- Identity APIs
- User
- Address
- Auth
User Self Service APIs
- Introduction
- User Self Service APIs
- Authentication APIs
Experiences v2 (XM v2)
- XM
- Pages
- Global Components
- Menu
Experiences v1 (XM v1)
- XM
- Pages
- Global Components
- Menu
Product Catalog
- Product Catalog
- Category
- Product
- Attributes
- Bulk Import
Orders v2 (OMS v2)
- Order Management System
- Order
- Order Attribute
- Developer Guide
- Order Return
- Payment Status
- Package Tracking
- Cross Border
- Order Cancellation
- Appeasement
- Allocation
- Configuration
- Fraud Configuration
- Target Configuration
- Location
- Location Attribute
- Inventory Network
- Inventory
- Inventory Counter
- Inventory Bulk Operation
- Inventory Attribute
- Inventory Upload Log
- Shipment
- Shipping Method
- Webhook
- Notification
- Export
- Invoice
- Fraud
- Backorder Preorder Reservation
- List
Orders v1 (OMS v1)
- Order Management System
- Cart
- Bill To
- Ship To
- Wishlist
- Cart Decoupled
- Warehouse
- Inventory
- Attributes
- List
- Tax/Address Validate
- Shipping
- Payments
- Order
Offers v2
- Offers
- Developer Guide
- Promotion
- Price Kind
- Dynamic Pricing Engine
- Segment
- Coupon
- Coupon Codes
- Product
- Price List
- Attributes
- Item
- Price Guard
- Global Exclusion
- Upload Price CSV
- Pricing
- Redemption
- Exports
Offers v1
- Offers
- Login API
- Promotions
- Pricing
Subscriptions (SMT API)
- Subscriptions API
- Cancellation Reasons
- Subscription Discounts
- Subscriptions
- Subscribers
- Orders
Loyalty (Member)
- Member APIs
- Inquire
- Discounts
- Redeem
- Earn
- Members
Dropship
- Dropship API
- Shipments
- Products
- Invoices
- Connections
- Inventory
- Developer Guide
- Returns
- Orders
Cart API
- Cart
- Order Draft
- Attribute
- Adjustments
- Shipping
- Cart
Checkout API
- Checkout
- Checkout
Customer
- Core Concepts
- Customer Service
- Organization
- User Party
- Organization Group Addresses
- User Internal Party
- Organization Contracts
- Party
- Party Contracts
- Contracts
- User
- Search
- User Trait
- Organization Users
- Address
- User Address
- Trait
- Party Address
- Party Trait
- Organization Group Users
- Internal Party
- Contract Pricelist
- Internal Parties Party
- Account
- Party Account
- Organization Addresses
- Organization Groups
- Individual Addresses
- Users Organization
- Individual
Earn
Reverse Earned Points
When a member cancels a purchase transaction or returns an order, this endpoint cancels all the points earned in that transaction.
POST
/
v2
/
earn
/
reverse
curl --request POST \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"entityReference": "LIBERTY_STORE",
"reverseTransactionExternalRef": "LOYALTY-12345",
"transactionTypeExternalReference": "RETURN",
"activityTimestamp": "2020-02-08 09:30:26",
"transactionExternalReference": "LOYALTY-8675",
"checkForDuplicateTransaction": 1,
"fetchUpdatedMemberPointTotals": 1,
"transactionGrossAmount": -100,
"discountValue": -20,
"totalAmountPaid": -80,
"totalTax": -10,
"netAmount": -70,
"discounts": [
{
"type": "promotion",
"description": "Black Friday discount",
"id": 2345,
"value": 20
}
],
"issueAuditUser": "Joe",
"cancelAuditUser": "Mia",
"redemptionCode": [],
"setToPending": true,
"reasonCode": "9393",
"reasonDescription": "returning item",
"transactionItems": [
{
"grossAmount": 100,
"taxAmount": 10,
"discounts": [],
"totalAmountPaid": 100,
"netAmount": 90,
"categories": [
"Supplements"
],
"itemName": "demo item",
"itemPrice": 45,
"itemQuantity": 2,
"SKU": "12345",
"lineNumber": 1,
"UOM": "unit",
"couponCodes": []
}
],
"isCompanyUser": false
}'
{
"status": 201,
"message": "earn reversed",
"errors": {},
"data": {
"transactionCode": "62660e74-02e3-11e8-b443-00163e990abc",
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"transactionNumber": "LOYALTY-8675",
"transactionDateTime": "2020-03-20T14:28:23.382748",
"activityTimestamp": "2020-03-20T14:28:23.382748",
"totalAmountPaid": -80,
"totalTax": -10,
"transactionNetAmount": -70,
"points": -70,
"basePoints": 70,
"bonusPoints": 0,
"promotionalPoints": 0,
"currentPointsBalance": 500,
"reasonCode": "9393",
"reasonDescription": "returning item",
"discounts": [
{
"type": "promotion",
"description": "Black Friday discount",
"id": 2345,
"value": 20
}
],
"discountValue": 20,
"transactionItems": [
{
"grossAmount": 100,
"taxAmount": 10,
"discounts": [],
"netAmount": 90,
"categories": [
"Supplements"
],
"itemName": "demo item",
"itemPrice": 45,
"itemQuantity": 2,
"SKU": "12345",
"lineNumber": 1,
"UOM": "unit",
"couponCodes": []
}
],
"rewards": [],
"issueAuditUser": "Joe",
"cancelAuditUser": "Mia",
"deviceId": "D10626",
"transactionType": "EARN_REVERSE",
"transactionActivityType": "TRANS_CANCEL",
"transactionTypeExternalReference": "RETURN",
"transactionExternalReference": "LOYALTY-8675",
"transactionEntityReference": "LIBERTY_STORE"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Transaction details to reverse the earned points
Response
200
application/json
OK
Metadata for the Earn Reverse
response
Was this page helpful?
curl --request POST \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"entityReference": "LIBERTY_STORE",
"reverseTransactionExternalRef": "LOYALTY-12345",
"transactionTypeExternalReference": "RETURN",
"activityTimestamp": "2020-02-08 09:30:26",
"transactionExternalReference": "LOYALTY-8675",
"checkForDuplicateTransaction": 1,
"fetchUpdatedMemberPointTotals": 1,
"transactionGrossAmount": -100,
"discountValue": -20,
"totalAmountPaid": -80,
"totalTax": -10,
"netAmount": -70,
"discounts": [
{
"type": "promotion",
"description": "Black Friday discount",
"id": 2345,
"value": 20
}
],
"issueAuditUser": "Joe",
"cancelAuditUser": "Mia",
"redemptionCode": [],
"setToPending": true,
"reasonCode": "9393",
"reasonDescription": "returning item",
"transactionItems": [
{
"grossAmount": 100,
"taxAmount": 10,
"discounts": [],
"totalAmountPaid": 100,
"netAmount": 90,
"categories": [
"Supplements"
],
"itemName": "demo item",
"itemPrice": 45,
"itemQuantity": 2,
"SKU": "12345",
"lineNumber": 1,
"UOM": "unit",
"couponCodes": []
}
],
"isCompanyUser": false
}'
{
"status": 201,
"message": "earn reversed",
"errors": {},
"data": {
"transactionCode": "62660e74-02e3-11e8-b443-00163e990abc",
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"transactionNumber": "LOYALTY-8675",
"transactionDateTime": "2020-03-20T14:28:23.382748",
"activityTimestamp": "2020-03-20T14:28:23.382748",
"totalAmountPaid": -80,
"totalTax": -10,
"transactionNetAmount": -70,
"points": -70,
"basePoints": 70,
"bonusPoints": 0,
"promotionalPoints": 0,
"currentPointsBalance": 500,
"reasonCode": "9393",
"reasonDescription": "returning item",
"discounts": [
{
"type": "promotion",
"description": "Black Friday discount",
"id": 2345,
"value": 20
}
],
"discountValue": 20,
"transactionItems": [
{
"grossAmount": 100,
"taxAmount": 10,
"discounts": [],
"netAmount": 90,
"categories": [
"Supplements"
],
"itemName": "demo item",
"itemPrice": 45,
"itemQuantity": 2,
"SKU": "12345",
"lineNumber": 1,
"UOM": "unit",
"couponCodes": []
}
],
"rewards": [],
"issueAuditUser": "Joe",
"cancelAuditUser": "Mia",
"deviceId": "D10626",
"transactionType": "EARN_REVERSE",
"transactionActivityType": "TRANS_CANCEL",
"transactionTypeExternalReference": "RETURN",
"transactionExternalReference": "LOYALTY-8675",
"transactionEntityReference": "LIBERTY_STORE"
}
}