Calculate Order Cashback
This API calculates the cashback points to be rewarded for a specific order in Gameball, based on provided order details. It considers configured cashback rules and customer eligibility.
Security: Requires apiKey header.
Channel Merging Available: If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball's channel merging feature helps unify customer profiles. By including the customer's mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.
Important: This API calculates the expected cashback points but does not perform any actual reward or action for the customer.
Request body
Example request
{
"customerId": "cust_12345abc",
"email": "john.doe@example.com",
"mobile": "+1234567890",
"totalPaid": 350,
"totalPrice": 350,
"lineItems": [
{
"productId": "875511",
"quantity": 1,
"price": 150,
"sku": "sku123",
"collection": [
"123"
]
}
],
"merchant": {
"uniqueId": "MERCH001",
"name": "TechGadgetStore",
"branch": {
"uniqueId": "BRANCH001",
"name": "Downtown Branch"
}
}
}Response
Cashback calculated successfully
Example response
{
"totalPoints": 19000,
"lineItems": [
{
"productId": "875511",
"quantity": 1,
"totalDecimalPoints": 15000,
"totalPoints": 15000,
"rewardWalletFactor": 20,
"campaignId": 2149,
"campaignName": "5x Points Campaign",
"campaignEndDate": "2024-11-01T08:39:00",
"campaignImpactWalletFactor": 5,
"campaignImpactPoints": 12000
}
]
}Changes
Changed in 3 of the 38 revisions of this API.413
- ▲
the request property
totalDiscountbecame requiredrequest-property-became-required
- ▲
the request property
totalShippingbecame requiredrequest-property-became-required
- ▲
the
lineItems/items/campaignEndDateresponse's property type/format changed fromstringnull/tostringnull/date-timefor status200response-property-type-changed
- ●
the
totalDiscountrequest property's min was set to0.00request-property-min-set
- ○
api operation id
calculateOrderCashbackwas addedapi-operation-id-added
- ○
api tag
Ordersaddedapi-tag-added
- ▲
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 38 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲