XM
Members
Reverse Points
This API is used to accumulating member points against sales transaction to earn points through core rules, promotion rules, and earn burn rules.
The member must be first enrolled in order to earn.
Path:
1
POST https://{baseurl}/earn/
Copied!

Headers

Content-Type : application/json
Authorization: JWT Token
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox"

Parameters []

Sample Path

1
POST https://{baseurl}/earn/
Copied!

Sample Request

1
{
2
"entityReference": "dolor labo",
3
"transactionTypeExternalReference": "magna eiusmod",
4
"activityTimestamp": "1992-03-22T06:03:44.822Z",
5
"transactionExternalReference": "officia",
6
"transactionGrossAmount": -90412495,
7
"checkForDuplicateTransaction": -33009092,
8
"fetchUpdatedMemberPointTotals": -78499859,
9
"discountValue": -69149918,
10
"netAmount": -40091391,
11
"totalTax": 99794593,
12
"loyaltyNumber": "c",
13
"profileId": "urn:uuid:1579bdcb-8657-f786-0f2c-57b2411b7090",
14
"issueAuditUser": "officia aliqua et consectetur",
15
"cancelAuditUser": "consectetur mollit minim tempor",
16
"redemptionCode": [
17
"mollit minim sint",
18
"Duis enim"
19
],
20
"reasonCode": "ir",
21
"reasonDescription": "anim e",
22
"discounts": [
23
{
24
"id": -90955510,
25
"value": 49775724,
26
"type": "sit"
27
},
28
{
29
"id": -59165515,
30
"value": 3259215,
31
"type": "et mollit sunt id"
32
}
33
],
34
"transactionItems": [
35
{
36
"taxAmount": 35651239,
37
"grossAmount": 96424999,
38
"netAmount": 77333309,
39
"categories": [
40
"amet adipisicing irure velit in",
41
"esse"
42
],
43
"itemPrice": 94217593,
44
"itemQuantity": 33513617,
45
"SKU": "in",
46
"lineNumber": -30753465,
47
"itemName": "adipisicing",
48
"UOM": "sit Ut sint qui",
49
"discounts": [
50
{
51
"id": 26526731,
52
"value": -51196349,
53
"type": "in incididunt"
54
},
55
{
56
"id": -55516370,
57
"value": -80894125,
58
"type": "deserunt dolor in do"
59
}
60
]
61
},
62
{
63
"taxAmount": -23215620,
64
"grossAmount": -4646057,
65
"netAmount": -548848,
66
"categories": [
67
"consectetur dolor",
68
"do ut ipsum incididunt"
69
],
70
"itemPrice": -57697893,
71
"itemQuantity": 7972620,
72
"SKU": "eu nulla labore do pr",
73
"lineNumber": -21758497,
74
"itemName": "eiusmod sint laboris sunt proident",
75
"UOM": "officia culpa dolor",
76
"discounts": [
77
{
78
"id": -60294546,
79
"value": -70655401,
80
"type": "magna E"
81
},
82
{
83
"id": -68676538,
84
"value": 48343130,
85
"type": "co"
86
}
87
]
88
}
89
],
90
"setToPending": false
91
}
Copied!

Sample Response

Response Code: 200
Message: OK
1
{
2
"status": -21256401,
3
"message": "Exception message",
4
"errors": {},
5
"data": {
6
"loyaltyNumber": "culpa consequat",
7
"profileId": "urn:uuid:919c4519-606c-8856-1441-b0cb05695de8",
8
"transactionTypeCode": "Excepteur deserunt",
9
"transactionNumber": "ad non proident",
10
"transactionId": -59722736,
11
"transactionDateTime": "1982-11-03",
12
"activityDate": "1965-11-24",
13
"createDate": "2016-05-06",
14
"updateDate": "1953-07-25",
15
"transactionNetTotal": -92064950.77141374,
16
"transactionProfitValue": 4002504.5773552507,
17
"transactionBasePointValue": -78705220.2078332,
18
"transactionPointValue": -83564936.88217439,
19
"memberPointsEarned": 83346803.87975118,
20
"memberPointsDeducted": -53081065.53754448,
21
"memberPointsUsed": 922260.6201670021,
22
"memberPointsExpired": -27950723.331816673,
23
"memberPointsAvailable": -86009428.90463856,
24
"memberPointsLocked": 62288173.14901805,
25
"totalTax": -56280369,
26
"reasonCode": "deserunt eu",
27
"reasonDescription": "cillum laborum",
28
"discounts": [
29
{
30
"id": 69283973,
31
"value": -91097914,
32
"type": "laboris ex ad"
33
},
34
{
35
"id": 40758341,
36
"value": 27771431,
37
"type": "dolor consectetur in"
38
}
39
],
40
"products": [
41
{
42
"name": "sit dolore velit eiusmod proident",
43
"sku": "officia tempor aliqua",
44
"quantity": -51254563,
45
"lineNumber": -65911181,
46
"itemPrice": -5124759,
47
"grossAmount": 41487191,
48
"netAmount": -17929684,
49
"totalTax": 9675316
50
},
51
{
52
"name": "officia ullamco qui in",
53
"sku": "est voluptate incididunt proident",
54
"quantity": -45038943,
55
"lineNumber": 69312085,
56
"itemPrice": -85240048,
57
"grossAmount": -60615098,
58
"netAmount": 39223226,
59
"totalTax": 71256534
60
}
61
],
62
"rewards": [
63
{
64
"reward_id": 62076979,
65
"core_rule_id": -87282953,
66
"reward_portion": 99431986.00101653
67
},
68
{
69
"reward_id": -10234149,
70
"core_rule_id": 41462895,
71
"reward_portion": -86483828.14501958
72
}
73
]
74
},
75
"limit": 87589746,
76
"offset": 4523148,
77
"count": 50020932
78
}
Copied!
Response Code: 400
Message: Bad Request
Response Code: 401
Message: Unauthorized

Changelog

  • Nov-2021
Last modified 17d ago
Copy link
Contents
Changelog