Loyalty Transactions
Loyalty Transactions
is the umbrella term for both credit receptions and reward receptions. Basically, they are all the mutations to someone's credit balance.
List Loyalty Transactions
By default, returns the last 10 transactions for a loyalty program. The results can be filtered by contact, shop and loyalty transaction type.
GETList Loyalty Transactions
https://api.piggy.eu/api//loyalty-transactions
HEADERS
Authorization
Bearer {{ access_token }}
PARAMETERS
contact_uuid
string
UUID of the contact for whom loyalty transactions are to be retrieved.
limit
string
Number of loyalty transactions to be retrieved (max. 100, default 10).
page
number
Page number (default: 1).
shop_uuid
string
UUID of the shop for which loyalty transactions are to be retrieved
type
number
Type of loyalty transactions to be retrieved, options: 'credit_receptions' and 'reward_receptions'. If not set, loyalty transactions of all types are retrieved.
Code
Message
1003
Invalid input.
55031
Contact not found.
1008
Shop not found.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"data": [
{
"type": "reward_reception",
"credits": -50,
"uuid": "92e1622d-167a-4399-ae70-a941120ca4d0",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:59:41+00:00",
"reward": {
"uuid": "72a56f33-fac3-4d9c-853e-bcbf6f47ed22",
"title": "Free Coffee"
},
"has_been_collected": true
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "64cc0f1c-06ad-46d4-9edd-a6e359afe185",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:58+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 15,
"uuid": "1e198341-6d0a-4c3a-924a-a888fc2d1bfe",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:57+00:00",
"unit_value": "15.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "3638836d-1bd1-4109-88c5-196f6d7bb4c6",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:57+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "4a74cd30-7a2f-4ca6-b2c1-a80002c1973e",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:56+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "ccb249b1-444c-485b-8cf5-e8d8d73fef61",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:56+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "19cbb877-c804-4c06-b747-ac80ed4de78c",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:55+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "d411a93c-b4bf-44c7-8da2-25f09b39b30e",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:54+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "b4cc24d8-5c8f-408c-b539-0a7b994754df",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:54+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
},
{
"type": "credit_reception",
"credits": 14,
"uuid": "09b06f50-e3e3-44cd-8923-119cce2c597f",
"contact": {
"email": "contact@piggy.eu"
},
"shop": {
"name": "My Store",
"uuid": "asdfjlk-123j-8sa-123lk"
},
"created_at": "2022-04-28T08:58:53+00:00",
"unit_value": "14.5",
"unit": {
"name": "purchase_amount"
}
}
],
"meta": {
"page": 1,
"limit": "10",
"last_page": 4,
"total": 36
}
}