v1
latestOpenAPI 3.0.12026-07-24501176.6 MBAdd/Return transaction (single)
Lets you add a new transaction or return an existing transaction. It supports both loyalty and not-interested transactions.
post/transactions
Query parameters
identifierName'mobile' | 'email' | 'externalId' | 'id' | 'wechat' | 'martjackId' | 'fbId' | 'cardnumber' | 'cardExternalId' required
Pass any of the registered identifier name of the customer.
identifierValuestring required
Pass the respective identifier value.
accountIdstring
For sources with multiple accounts (such as MARTJACK, WECHAT), pass the respective account ID. Not applicable for INSTORE source.
use_asyncboolean
source'INSTORE( for InStore)' | 'WECHAT (WeChat)' | 'MARTJACK(AnywhereCommerce)' | 'WEB_ENGAGE (Web-engage integration)' | 'ECOMMERCE (ECOMMERCE)' | 'JD (JD)' | 'TAOBAO (Taobao)' | 'TMALL (TMall)' | 'FACEBOOK (Facebook)' | 'WEBSITE (other website)' | 'OTHERS (any other source).'
Source on which the customer identifier is registered.
Headers
X-CAP-DIRECT-REPLAYboolean
Pass true to add the call to the event execution queue (reply event) - in this case, transaction is added and other events will be executed later. Pass false to directly execute the event.
Request body
Response
200
Example response
{
"createdId": 2147939409,
"sideEffects": [
{
"entityType": "USER",
"rawAwardedPoints": 120,
"awardedPoints": 120,
"type": "points"
}
],
"rawSideEffects": [
{
"awardOn": "BILL",
"awardStrategyId": "35637",
"awardedOn": "23rd Sep, 2021",
"awardedOnMillis": "1632397476258",
"billNumber": "bill00017",
"evaluatedEntity": "USER",
"expiryDate": "24th Sep, 2021",
"expiryDateMillis": "1632508199999",
"expiryStrategyId": "79650",
"lineItemId": "-1",
"pointTypeId": "6463",
"pointTypeIsRedeemable": "true",
"pointTypeName": "Main",
"points": "1500.000",
"programId": "1016",
"promoId": "-1",
"sourceId": "2147876300",
"sourceType": "Bill",
"tenderCodeId": "-1",
"type": "AWARD"
}
],
"customerInfo": {
"firstName": "Tom",
"lastName": "Sawyer"
}
}