Contacts
Contacts are the end-users of Clients. Contacts are provided with basic attributes, such as an email address, first name, last name, and so forth. Any custom attributes can also be created, either in the Business Dashboard or via API. Their email address is the standard unique identifier, via which Contacts can be found. Aside from the email address, Contact Identifiers can also be used to find a Contact.
Get Contact
Retrieve a specific Contact with the the using its UUID.
https://api.piggy.eu/api//contacts/{{contact_uuid}}
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
{
"data": {
"id": 22,
"uuid": "123",
"email": "john@doe.com",
"attributes": [
{
"value": "",
"attribute": {
"id": 2204,
"type": "media_upload",
"field_type": "media_upload",
"name": "avatar",
"label": "Avatar",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2205,
"type": "text",
"field_type": "text",
"name": "firstname",
"label": "First name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2206,
"type": "text",
"field_type": "text",
"name": "lastname",
"label": "Last name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "john@doe.com",
"attribute": {
"id": 2203,
"type": "email",
"field_type": "email",
"name": "email",
"label": "Email",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "1617",
"attribute": {
"id": 2220,
"type": "number",
"field_type": "number",
"name": "previous_loyalty_balance",
"label": "Previous credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1612",
"attribute": {
"id": 2219,
"type": "number",
"field_type": "number",
"name": "loyalty_balance",
"label": "Credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "55",
"attribute": {
"id": 2223,
"type": "number",
"field_type": "number",
"name": "loyalty_number_of_transactions",
"label": "Number of transactions",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-01-09T15:03:37+00:00",
"attribute": {
"id": 2221,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_first_transaction_date",
"label": "First credit reception date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "2023-11-06T11:32:00+00:00",
"attribute": {
"id": 2222,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_last_transaction_date",
"label": "Last transaction date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2207,
"type": "text",
"field_type": "text",
"name": "address",
"label": "Address",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2208,
"type": "phone",
"field_type": "phone",
"name": "phonenumber",
"label": "Telephone number",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2209,
"type": "birth_date",
"field_type": "birth_date",
"name": "birthdate",
"label": "Birth date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2210,
"type": "select",
"field_type": "select",
"name": "channel",
"label": "Channel",
"options": [
{
"value": "BUSINESS_APP",
"label": "BUSINESS_APP",
"description": null,
"media": null
},
{
"value": "API",
"label": "API",
"description": null,
"media": null
},
{
"value": "BUSINESS_DASHBOARD",
"label": "BUSINESS_DASHBOARD",
"description": null,
"media": null
},
{
"value": "CUSTOMER_APP",
"label": "CUSTOMER_APP",
"description": null,
"media": null
},
{
"value": "WEBSHOP_API",
"label": "WEBSHOP_API",
"description": null,
"media": null
},
{
"value": "IMPORT",
"label": "IMPORT",
"description": null,
"media": null
},
{
"value": "WEBSITE_FORM",
"label": "WEBSITE_FORM",
"description": null,
"media": null
},
{
"value": "REGISTER_API",
"label": "REGISTER_API",
"description": null,
"media": null
},
{
"value": "OAUTH_API",
"label": "OAUTH_API",
"description": null,
"media": null
},
{
"value": "SUBSCRIPTION_TYPE",
"label": "SUBSCRIPTION_TYPE",
"description": null,
"media": null
},
{
"value": "CUSTOM_APP",
"label": "CUSTOM_APP",
"description": null,
"media": null
},
{
"value": "AUTOMATIONS",
"label": "AUTOMATIONS",
"description": null,
"media": null
},
{
"value": "FORMS",
"label": "FORMS",
"description": null,
"media": null
},
{
"value": "WIDGET",
"label": "WIDGET",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2211,
"type": "number",
"field_type": "number",
"name": "age",
"label": "Age",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2212,
"type": "select",
"field_type": "select",
"name": "locale",
"label": "Preferred language",
"options": [
{
"value": "en",
"label": "English",
"description": null,
"media": null
},
{
"value": "nl",
"label": "Nederlands",
"description": null,
"media": null
},
{
"value": "de",
"label": "Deutsch",
"description": null,
"media": null
},
{
"value": "es",
"label": "Español",
"description": null,
"media": null
},
{
"value": "fr",
"label": "Francés",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "ACTIVE",
"attribute": {
"id": 2213,
"type": "select",
"field_type": "select",
"name": "status",
"label": "Status",
"options": [
{
"value": "ACTIVE",
"label": "Active",
"description": null,
"media": null
},
{
"value": "INACTIVE",
"label": "Inactive",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-06T16:47:00+00:00",
"attribute": {
"id": 2214,
"type": "date_time",
"field_type": "date_time",
"name": "updated_at",
"label": "Updated at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2021-10-20T18:06:09+00:00",
"attribute": {
"id": 2215,
"type": "date_time",
"field_type": "date_time",
"name": "created_at",
"label": "Created at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2216,
"type": "boolean",
"field_type": "boolean",
"name": "is_anonymous",
"label": "Anonymous",
"options": [
{
"value": "true",
"label": "True",
"description": null,
"media": null
},
{
"value": "false",
"label": "False",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "20",
"attribute": {
"id": 2217,
"type": "float",
"field_type": "float",
"name": "prepaid_balance",
"label": "Prepaid balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"attribute": {
"id": 2218,
"type": "multi_select",
"field_type": "multi_select",
"name": "loyalty_associated_shops",
"label": "Associated shops",
"options": [
{
"value": "123123",
"label": "Amsterdam Pop-up Store",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
{
"value": "12312312312312",
"label": "Web Shop",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/webshop.svg"
}
},
{
"value": "2222e1242t3324535",
"label": "Sesame Street",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1697",
"attribute": {
"id": 2224,
"type": "number",
"field_type": "number",
"name": "loyalty_total_credits_received",
"label": "Total credits received",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1",
"attribute": {
"id": 2225,
"type": "select",
"field_type": "select",
"name": "tier",
"label": "Tier",
"options": [
{
"value": "1",
"label": "Gold",
"description": "VIP Members only",
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2226,
"type": "select",
"field_type": "select",
"name": "subscription_status_3",
"label": "Subscription status: Monthly offers",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2227,
"type": "select",
"field_type": "select",
"name": "subscription_status_1",
"label": "Subscription status: Marketing",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2228,
"type": "select",
"field_type": "select",
"name": "subscription_status_5",
"label": "Product updates",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2229,
"type": "select",
"field_type": "select",
"name": "subscription_status_4",
"label": "Subscription status: Events",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
}
],
"tier": {
"uuid": "ea77edd4-5a5e-4a6e-aeda-55038c43c839",
"name": "Gold",
"description": "VIP Members only",
"position": 1,
"media": null
},
"subscriptions": [
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Monthly offers",
"description": "A monthly email blast with our best offers!",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": null,
"id": 3
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Events",
"description": "Stay in the loop for all our special events",
"active": true,
"strategy": "OPT_IN",
"uuid": null,
"id": 4
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Product updates",
"description": "Never miss out on any of our newest features",
"active": true,
"strategy": "OPT_OUT",
"uuid": null,
"id": 5
}
}
],
"credit_balance": {
"balance": 1612,
"id": 2625740
},
"prepaid_balance": {
"balance_in_cents": 2000
},
"current_values": {
"age": null,
"city": "Duckburg",
"dier": null,
"tier": "1",
"uuid": "123",
"email": "john@doe.com",
"avatar": "",
"locale": null,
"status": "ACTIVE",
"address": "",
"channel": null,
"lastname": "",
"birthdate": null,
"firstname": "",
"created_at": "2021-10-20T18:06:09+00:00",
"postalcode": "9999YZ",
"updated_at": "2023-11-06T16:47:00+00:00",
"housenumber": 12,
"phonenumber": "",
"is_anonymous": false,
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": null,
"loyalty_balance": 1612,
"prepaid_balance": 20,
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Ikh3ZW8yRW9pSU9Gc25SYmxRUFVVWUE9PSIsInZhbHVlIjoianhuYncxVHBlK0dqMTN4RHhXNzdZNVJ3aGJqcERFdmVWQlcxYjFNZVZYSVdoWVVMWk54K1UvQ2lFek1nMmtGaTJZNGRNOG1rUUxwRGNnU25JcitpN0d5RWVKN21kS1gvSmMvNTA2bmxqU0Z0cmxoR2pPT0Ewc1hXeEJsMkVJNGFDQlNlSWpHRXVpWndyd3g3eTVXck90Z0tlL3J2RHNRKzRjRkNGb0tmVmVzPSIsIm1hYyI6ImZlMzc0ZDYzZDVjNTNjOTc3YTc1ZTMxN2RmMzM4MDFkZWQ2YWI2MDkwNDY4OWQ1MDk0ZWRkN2Y2ZTdhZjY5ZmEiLCJ0YWciOiIifQ==",
"custom_app_login_code": 198169,
"subscription_status_1": "UNSUBSCRIBED",
"subscription_status_3": "UNSUBSCRIBED",
"subscription_status_4": "UNSUBSCRIBED",
"subscription_status_5": "UNSUBSCRIBED",
"loyalty_associated_shops": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"previous_loyalty_balance": 1617,
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06T11:32:00+00:00",
"loyalty_first_transaction_date": "2023-01-09T15:03:37+00:00",
"loyalty_number_of_transactions": 55,
"loyalty_total_credits_received": 1697,
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
},
"current_display_values": {
"age": "",
"city": "",
"dier": "False",
"tier": "Gold",
"uuid": "",
"email": "john@doe.com",
"avatar": "",
"locale": "",
"status": "Active",
"address": "",
"channel": "",
"lastname": "",
"birthdate": "",
"firstname": "",
"created_at": "2021-10-20, 20:06",
"postalcode": "",
"updated_at": "2023-11-06, 17:47",
"housenumber": "",
"phonenumber": "",
"is_anonymous": "False",
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": "",
"loyalty_balance": "1612",
"prepaid_balance": "20",
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Imx6TzJVV1ZwNlBRd3VkQmV1NnhKbnc9PSIsInZhbHVlIjoiVnlKZWM4OG5Vdjl0QmNEY242YmZ3OFNpWjQwQXkwRThmMCttWHlwQmNSTFluNzdpVkQwY0ZEcVo5TktvUXRHSVBYUE43S2dscFpyMUJnazFrWWZWVHI3cDNLTVJsZDcwWU9zQWdIejh5YjRQOGx4RjV6aDJjR3FTWlI1RTNlQlRrZEVNcURZeFlaZlYvQ2R2STdSU1RDdFdZT0RRdkxNN01vOXhLQnhaZkNVPSIsIm1hYyI6ImJjMzczNWQ2NGEwNzZlNjZhZTU0OTk3MzIxOTczODYzZjMxZjYwNzM2MjY5ZWJkODRkMTEzODU0NmQxMDU4OTQiLCJ0YWciOiIifQ==",
"custom_app_login_code": "198169",
"subscription_status_1": "Unsubscribed",
"subscription_status_3": "Unsubscribed",
"subscription_status_4": "Unsubscribed",
"subscription_status_5": "Unsubscribed",
"loyalty_associated_shops": "Amsterdam Pop-up Store and Sesame Street",
"previous_loyalty_balance": "1617",
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06, 12:32",
"loyalty_first_transaction_date": "2023-01-09, 16:03",
"loyalty_number_of_transactions": "55",
"loyalty_total_credits_received": "1697",
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
}
},
"meta": []
}
Code
Message
1003
55031
Find Contact
Find a Contact by email address. To find a Contact using an identifier, see Contact Identifiers.
https://api.piggy.eu/api//contacts/find-one-by
Bearer {{ api_key }}
application/json
email
string
REQUIRED
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
{
"data": {
"id": 22,
"uuid": "123",
"email": "john@doe.com",
"attributes": [
{
"value": "",
"attribute": {
"id": 2204,
"type": "media_upload",
"field_type": "media_upload",
"name": "avatar",
"label": "Avatar",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2205,
"type": "text",
"field_type": "text",
"name": "firstname",
"label": "First name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2206,
"type": "text",
"field_type": "text",
"name": "lastname",
"label": "Last name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "john@doe.com",
"attribute": {
"id": 2203,
"type": "email",
"field_type": "email",
"name": "email",
"label": "Email",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "1617",
"attribute": {
"id": 2220,
"type": "number",
"field_type": "number",
"name": "previous_loyalty_balance",
"label": "Previous credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1612",
"attribute": {
"id": 2219,
"type": "number",
"field_type": "number",
"name": "loyalty_balance",
"label": "Credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "55",
"attribute": {
"id": 2223,
"type": "number",
"field_type": "number",
"name": "loyalty_number_of_transactions",
"label": "Number of transactions",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-01-09T15:03:37+00:00",
"attribute": {
"id": 2221,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_first_transaction_date",
"label": "First credit reception date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "2023-11-06T11:32:00+00:00",
"attribute": {
"id": 2222,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_last_transaction_date",
"label": "Last transaction date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2207,
"type": "text",
"field_type": "text",
"name": "address",
"label": "Address",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2208,
"type": "phone",
"field_type": "phone",
"name": "phonenumber",
"label": "Telephone number",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2209,
"type": "birth_date",
"field_type": "birth_date",
"name": "birthdate",
"label": "Birth date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2210,
"type": "select",
"field_type": "select",
"name": "channel",
"label": "Channel",
"options": [
{
"value": "BUSINESS_APP",
"label": "BUSINESS_APP",
"description": null,
"media": null
},
{
"value": "API",
"label": "API",
"description": null,
"media": null
},
{
"value": "BUSINESS_DASHBOARD",
"label": "BUSINESS_DASHBOARD",
"description": null,
"media": null
},
{
"value": "CUSTOMER_APP",
"label": "CUSTOMER_APP",
"description": null,
"media": null
},
{
"value": "WEBSHOP_API",
"label": "WEBSHOP_API",
"description": null,
"media": null
},
{
"value": "IMPORT",
"label": "IMPORT",
"description": null,
"media": null
},
{
"value": "WEBSITE_FORM",
"label": "WEBSITE_FORM",
"description": null,
"media": null
},
{
"value": "REGISTER_API",
"label": "REGISTER_API",
"description": null,
"media": null
},
{
"value": "OAUTH_API",
"label": "OAUTH_API",
"description": null,
"media": null
},
{
"value": "SUBSCRIPTION_TYPE",
"label": "SUBSCRIPTION_TYPE",
"description": null,
"media": null
},
{
"value": "CUSTOM_APP",
"label": "CUSTOM_APP",
"description": null,
"media": null
},
{
"value": "AUTOMATIONS",
"label": "AUTOMATIONS",
"description": null,
"media": null
},
{
"value": "FORMS",
"label": "FORMS",
"description": null,
"media": null
},
{
"value": "WIDGET",
"label": "WIDGET",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2211,
"type": "number",
"field_type": "number",
"name": "age",
"label": "Age",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2212,
"type": "select",
"field_type": "select",
"name": "locale",
"label": "Preferred language",
"options": [
{
"value": "en",
"label": "English",
"description": null,
"media": null
},
{
"value": "nl",
"label": "Nederlands",
"description": null,
"media": null
},
{
"value": "de",
"label": "Deutsch",
"description": null,
"media": null
},
{
"value": "es",
"label": "Español",
"description": null,
"media": null
},
{
"value": "fr",
"label": "Francés",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "ACTIVE",
"attribute": {
"id": 2213,
"type": "select",
"field_type": "select",
"name": "status",
"label": "Status",
"options": [
{
"value": "ACTIVE",
"label": "Active",
"description": null,
"media": null
},
{
"value": "INACTIVE",
"label": "Inactive",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-06T16:47:00+00:00",
"attribute": {
"id": 2214,
"type": "date_time",
"field_type": "date_time",
"name": "updated_at",
"label": "Updated at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2021-10-20T18:06:09+00:00",
"attribute": {
"id": 2215,
"type": "date_time",
"field_type": "date_time",
"name": "created_at",
"label": "Created at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2216,
"type": "boolean",
"field_type": "boolean",
"name": "is_anonymous",
"label": "Anonymous",
"options": [
{
"value": "true",
"label": "True",
"description": null,
"media": null
},
{
"value": "false",
"label": "False",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "20",
"attribute": {
"id": 2217,
"type": "float",
"field_type": "float",
"name": "prepaid_balance",
"label": "Prepaid balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"attribute": {
"id": 2218,
"type": "multi_select",
"field_type": "multi_select",
"name": "loyalty_associated_shops",
"label": "Associated shops",
"options": [
{
"value": "123123",
"label": "Amsterdam Pop-up Store",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
{
"value": "12312312312312",
"label": "Web Shop",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/webshop.svg"
}
},
{
"value": "2222e1242t3324535",
"label": "Sesame Street",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1697",
"attribute": {
"id": 2224,
"type": "number",
"field_type": "number",
"name": "loyalty_total_credits_received",
"label": "Total credits received",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1",
"attribute": {
"id": 2225,
"type": "select",
"field_type": "select",
"name": "tier",
"label": "Tier",
"options": [
{
"value": "1",
"label": "Gold",
"description": "VIP Members only",
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2226,
"type": "select",
"field_type": "select",
"name": "subscription_status_3",
"label": "Subscription status: Monthly offers",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2227,
"type": "select",
"field_type": "select",
"name": "subscription_status_1",
"label": "Subscription status: Marketing",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2228,
"type": "select",
"field_type": "select",
"name": "subscription_status_5",
"label": "Subscription status: Product updates",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2229,
"type": "select",
"field_type": "select",
"name": "subscription_status_4",
"label": "Subscription status: Events",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
}
],
"tier": {
"uuid": "ea77edd4-5a5e-4a6e-aeda-55038c43c839",
"name": "Gold",
"description": "VIP Members only",
"position": 1,
"media": null
},
"subscriptions": [
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Monthly offers",
"description": "A monthly email blast with our best offers!",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": null,
"id": 3
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Events",
"description": "Stay in the loop for all our special events",
"active": true,
"strategy": "OPT_IN",
"uuid": null,
"id": 4
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Product updates",
"description": "Never miss out on any of our newest features",
"active": true,
"strategy": "OPT_OUT",
"uuid": null,
"id": 5
}
}
],
"credit_balance": {
"balance": 1612,
"id": 2625740
},
"prepaid_balance": {
"balance_in_cents": 2000
},
"current_values": {
"age": null,
"city": "Duckburg",
"dier": null,
"tier": "1",
"uuid": "123",
"email": "john@doe.com",
"avatar": "",
"locale": null,
"status": "ACTIVE",
"address": "",
"channel": null,
"lastname": "",
"birthdate": null,
"firstname": "",
"created_at": "2021-10-20T18:06:09+00:00",
"postalcode": "9999YZ",
"updated_at": "2023-11-06T16:47:00+00:00",
"housenumber": 12,
"phonenumber": "",
"is_anonymous": false,
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": null,
"loyalty_balance": 1612,
"prepaid_balance": 20,
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Ikh3ZW8yRW9pSU9Gc25SYmxRUFVVWUE9PSIsInZhbHVlIjoianhuYncxVHBlK0dqMTN4RHhXNzdZNVJ3aGJqcERFdmVWQlcxYjFNZVZYSVdoWVVMWk54K1UvQ2lFek1nMmtGaTJZNGRNOG1rUUxwRGNnU25JcitpN0d5RWVKN21kS1gvSmMvNTA2bmxqU0Z0cmxoR2pPT0Ewc1hXeEJsMkVJNGFDQlNlSWpHRXVpWndyd3g3eTVXck90Z0tlL3J2RHNRKzRjRkNGb0tmVmVzPSIsIm1hYyI6ImZlMzc0ZDYzZDVjNTNjOTc3YTc1ZTMxN2RmMzM4MDFkZWQ2YWI2MDkwNDY4OWQ1MDk0ZWRkN2Y2ZTdhZjY5ZmEiLCJ0YWciOiIifQ==",
"custom_app_login_code": 198169,
"subscription_status_1": "UNSUBSCRIBED",
"subscription_status_3": "UNSUBSCRIBED",
"subscription_status_4": "UNSUBSCRIBED",
"subscription_status_5": "UNSUBSCRIBED",
"loyalty_associated_shops": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"previous_loyalty_balance": 1617,
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06T11:32:00+00:00",
"loyalty_first_transaction_date": "2023-01-09T15:03:37+00:00",
"loyalty_number_of_transactions": 55,
"loyalty_total_credits_received": 1697,
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
},
"current_display_values": {
"age": "",
"city": "",
"dier": "False",
"tier": "Gold",
"uuid": "",
"email": "john@doe.com",
"avatar": "",
"locale": "",
"status": "Active",
"address": "",
"channel": "",
"lastname": "",
"birthdate": "",
"firstname": "",
"created_at": "2021-10-20, 20:06",
"postalcode": "",
"updated_at": "2023-11-06, 17:47",
"housenumber": "",
"phonenumber": "",
"is_anonymous": "False",
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": "",
"loyalty_balance": "1612",
"prepaid_balance": "20",
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Imx6TzJVV1ZwNlBRd3VkQmV1NnhKbnc9PSIsInZhbHVlIjoiVnlKZWM4OG5Vdjl0QmNEY242YmZ3OFNpWjQwQXkwRThmMCttWHlwQmNSTFluNzdpVkQwY0ZEcVo5TktvUXRHSVBYUE43S2dscFpyMUJnazFrWWZWVHI3cDNLTVJsZDcwWU9zQWdIejh5YjRQOGx4RjV6aDJjR3FTWlI1RTNlQlRrZEVNcURZeFlaZlYvQ2R2STdSU1RDdFdZT0RRdkxNN01vOXhLQnhaZkNVPSIsIm1hYyI6ImJjMzczNWQ2NGEwNzZlNjZhZTU0OTk3MzIxOTczODYzZjMxZjYwNzM2MjY5ZWJkODRkMTEzODU0NmQxMDU4OTQiLCJ0YWciOiIifQ==",
"custom_app_login_code": "198169",
"subscription_status_1": "Unsubscribed",
"subscription_status_3": "Unsubscribed",
"subscription_status_4": "Unsubscribed",
"subscription_status_5": "Unsubscribed",
"loyalty_associated_shops": "Amsterdam Pop-up Store and Sesame Street",
"previous_loyalty_balance": "1617",
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06, 12:32",
"loyalty_first_transaction_date": "2023-01-09, 16:03",
"loyalty_number_of_transactions": "55",
"loyalty_total_credits_received": "1697",
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
}
},
"meta": []
}
Code
Message
1003
55031
Create Contact
If a Contact needs to be created, only the email address is needed. To add any additional data to the Contact, a subsequent Update Contact API call can be used.
https://api.piggy.eu/api//contacts
Bearer {{ api_key }}
application/json
Body
email
string
REQUIRED
referral_code
string
OPTIONAL
1
2
3
4
5
6
{
"data": {
"uuid": "cd183615-d1cb-402a-b618-6472d5e13890"
},
"meta": []
}
Code
Message
1003
60005
Create Contact Async
If a Contact needs to be created quickly and any system values that are normally created upon creation aren't relevant, this function can be used. This API call is much faster than the 'regular' creation API call, focusing on basic Contact creation.
https://api.piggy.eu/api//contacts/async
Bearer {{ api_key }}
application/json
Body
email
string
REQUIRED
referral_code
string
OPTIONAL
1
2
3
4
5
6
{
"data": {
"uuid": "cd183615-d1cb-402a-b618-6472d5e13890"
},
"meta": []
}
Code
Message
1003
60005
60000
Find or Create Contact
Find Contact by email address or – if no Contact exists yet for this email address – our API creates a new Contact for the email address you just supplied and returns the newly created Contact in the response.
https://api.piggy.eu/api//contacts/find-or-create
Bearer {{ api_key }}
application/json
email
string
REQUIRED
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
{
"data": {
"id": 22,
"uuid": "123",
"email": "john@doe.com",
"attributes": [
{
"value": "",
"attribute": {
"id": 2204,
"type": "media_upload",
"field_type": "media_upload",
"name": "avatar",
"label": "Avatar",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2205,
"type": "text",
"field_type": "text",
"name": "firstname",
"label": "First name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2206,
"type": "text",
"field_type": "text",
"name": "lastname",
"label": "Last name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "john@doe.com",
"attribute": {
"id": 2203,
"type": "email",
"field_type": "email",
"name": "email",
"label": "Email",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "1617",
"attribute": {
"id": 2220,
"type": "number",
"field_type": "number",
"name": "previous_loyalty_balance",
"label": "Previous credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1612",
"attribute": {
"id": 2219,
"type": "number",
"field_type": "number",
"name": "loyalty_balance",
"label": "Credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "55",
"attribute": {
"id": 2223,
"type": "number",
"field_type": "number",
"name": "loyalty_number_of_transactions",
"label": "Number of transactions",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-01-09T15:03:37+00:00",
"attribute": {
"id": 2221,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_first_transaction_date",
"label": "First credit reception date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "2023-11-06T11:32:00+00:00",
"attribute": {
"id": 2222,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_last_transaction_date",
"label": "Last transaction date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2207,
"type": "text",
"field_type": "text",
"name": "address",
"label": "Address",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2208,
"type": "phone",
"field_type": "phone",
"name": "phonenumber",
"label": "Telephone number",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2209,
"type": "birth_date",
"field_type": "birth_date",
"name": "birthdate",
"label": "Birth date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2210,
"type": "select",
"field_type": "select",
"name": "channel",
"label": "Channel",
"options": [
{
"value": "BUSINESS_APP",
"label": "BUSINESS_APP",
"description": null,
"media": null
},
{
"value": "API",
"label": "API",
"description": null,
"media": null
},
{
"value": "BUSINESS_DASHBOARD",
"label": "BUSINESS_DASHBOARD",
"description": null,
"media": null
},
{
"value": "CUSTOMER_APP",
"label": "CUSTOMER_APP",
"description": null,
"media": null
},
{
"value": "WEBSHOP_API",
"label": "WEBSHOP_API",
"description": null,
"media": null
},
{
"value": "IMPORT",
"label": "IMPORT",
"description": null,
"media": null
},
{
"value": "WEBSITE_FORM",
"label": "WEBSITE_FORM",
"description": null,
"media": null
},
{
"value": "REGISTER_API",
"label": "REGISTER_API",
"description": null,
"media": null
},
{
"value": "OAUTH_API",
"label": "OAUTH_API",
"description": null,
"media": null
},
{
"value": "SUBSCRIPTION_TYPE",
"label": "SUBSCRIPTION_TYPE",
"description": null,
"media": null
},
{
"value": "CUSTOM_APP",
"label": "CUSTOM_APP",
"description": null,
"media": null
},
{
"value": "AUTOMATIONS",
"label": "AUTOMATIONS",
"description": null,
"media": null
},
{
"value": "FORMS",
"label": "FORMS",
"description": null,
"media": null
},
{
"value": "WIDGET",
"label": "WIDGET",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2211,
"type": "number",
"field_type": "number",
"name": "age",
"label": "Age",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2212,
"type": "select",
"field_type": "select",
"name": "locale",
"label": "Preferred language",
"options": [
{
"value": "en",
"label": "English",
"description": null,
"media": null
},
{
"value": "nl",
"label": "Nederlands",
"description": null,
"media": null
},
{
"value": "de",
"label": "Deutsch",
"description": null,
"media": null
},
{
"value": "es",
"label": "Español",
"description": null,
"media": null
},
{
"value": "fr",
"label": "Francés",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "ACTIVE",
"attribute": {
"id": 2213,
"type": "select",
"field_type": "select",
"name": "status",
"label": "Status",
"options": [
{
"value": "ACTIVE",
"label": "Active",
"description": null,
"media": null
},
{
"value": "INACTIVE",
"label": "Inactive",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-06T16:47:00+00:00",
"attribute": {
"id": 2214,
"type": "date_time",
"field_type": "date_time",
"name": "updated_at",
"label": "Updated at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2021-10-20T18:06:09+00:00",
"attribute": {
"id": 2215,
"type": "date_time",
"field_type": "date_time",
"name": "created_at",
"label": "Created at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2216,
"type": "boolean",
"field_type": "boolean",
"name": "is_anonymous",
"label": "Anonymous",
"options": [
{
"value": "true",
"label": "True",
"description": null,
"media": null
},
{
"value": "false",
"label": "False",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "20",
"attribute": {
"id": 2217,
"type": "float",
"field_type": "float",
"name": "prepaid_balance",
"label": "Prepaid balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"attribute": {
"id": 2218,
"type": "multi_select",
"field_type": "multi_select",
"name": "loyalty_associated_shops",
"label": "Associated shops",
"options": [
{
"value": "123123",
"label": "Amsterdam Pop-up Store",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
{
"value": "12312312312312",
"label": "Web Shop",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/webshop.svg"
}
},
{
"value": "2222e1242t3324535",
"label": "Sesame Street",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1697",
"attribute": {
"id": 2224,
"type": "number",
"field_type": "number",
"name": "loyalty_total_credits_received",
"label": "Total credits received",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1",
"attribute": {
"id": 2225,
"type": "select",
"field_type": "select",
"name": "tier",
"label": "Tier",
"options": [
{
"value": "1",
"label": "Gold",
"description": "VIP Members only",
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2226,
"type": "select",
"field_type": "select",
"name": "subscription_status_3",
"label": "Subscription status: Monthly offers",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2227,
"type": "select",
"field_type": "select",
"name": "subscription_status_1",
"label": "Subscription status: Marketing",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2228,
"type": "select",
"field_type": "select",
"name": "subscription_status_5",
"label": "Subscription status: Product updates",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2229,
"type": "select",
"field_type": "select",
"name": "subscription_status_4",
"label": "Subscription status: Events",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
}
],
"tier": {
"uuid": "ea77edd4-5a5e-4a6e-aeda-55038c43c839",
"name": "Gold",
"description": "VIP Members only",
"position": 1,
"media": null
},
"subscriptions": [
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Monthly offers",
"description": "A monthly email blast with our best offers!",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": null,
"id": 3
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Events",
"description": "Stay in the loop for all our special events",
"active": true,
"strategy": "OPT_IN",
"uuid": null,
"id": 4
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Product updates",
"description": "Never miss out on any of our newest features",
"active": true,
"strategy": "OPT_OUT",
"uuid": null,
"id": 5
}
}
],
"credit_balance": {
"balance": 1612,
"id": 2625740
},
"prepaid_balance": {
"balance_in_cents": 2000
},
"current_values": {
"age": null,
"city": "Duckburg",
"dier": null,
"tier": "1",
"uuid": "123",
"email": "john@doe.com",
"avatar": "",
"locale": null,
"status": "ACTIVE",
"address": "",
"channel": null,
"lastname": "",
"birthdate": null,
"firstname": "",
"created_at": "2021-10-20T18:06:09+00:00",
"postalcode": "9999YZ",
"updated_at": "2023-11-06T16:47:00+00:00",
"housenumber": 12,
"phonenumber": "",
"is_anonymous": false,
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": null,
"loyalty_balance": 1612,
"prepaid_balance": 20,
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Ikh3ZW8yRW9pSU9Gc25SYmxRUFVVWUE9PSIsInZhbHVlIjoianhuYncxVHBlK0dqMTN4RHhXNzdZNVJ3aGJqcERFdmVWQlcxYjFNZVZYSVdoWVVMWk54K1UvQ2lFek1nMmtGaTJZNGRNOG1rUUxwRGNnU25JcitpN0d5RWVKN21kS1gvSmMvNTA2bmxqU0Z0cmxoR2pPT0Ewc1hXeEJsMkVJNGFDQlNlSWpHRXVpWndyd3g3eTVXck90Z0tlL3J2RHNRKzRjRkNGb0tmVmVzPSIsIm1hYyI6ImZlMzc0ZDYzZDVjNTNjOTc3YTc1ZTMxN2RmMzM4MDFkZWQ2YWI2MDkwNDY4OWQ1MDk0ZWRkN2Y2ZTdhZjY5ZmEiLCJ0YWciOiIifQ==",
"custom_app_login_code": 198169,
"subscription_status_1": "UNSUBSCRIBED",
"subscription_status_3": "UNSUBSCRIBED",
"subscription_status_4": "UNSUBSCRIBED",
"subscription_status_5": "UNSUBSCRIBED",
"loyalty_associated_shops": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"previous_loyalty_balance": 1617,
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06T11:32:00+00:00",
"loyalty_first_transaction_date": "2023-01-09T15:03:37+00:00",
"loyalty_number_of_transactions": 55,
"loyalty_total_credits_received": 1697,
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
},
"current_display_values": {
"age": "",
"city": "",
"dier": "False",
"tier": "Gold",
"uuid": "",
"email": "john@doe.com",
"avatar": "",
"locale": "",
"status": "Active",
"address": "",
"channel": "",
"lastname": "",
"birthdate": "",
"firstname": "",
"created_at": "2021-10-20, 20:06",
"postalcode": "",
"updated_at": "2023-11-06, 17:47",
"housenumber": "",
"phonenumber": "",
"is_anonymous": "False",
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": "",
"loyalty_balance": "1612",
"prepaid_balance": "20",
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Imx6TzJVV1ZwNlBRd3VkQmV1NnhKbnc9PSIsInZhbHVlIjoiVnlKZWM4OG5Vdjl0QmNEY242YmZ3OFNpWjQwQXkwRThmMCttWHlwQmNSTFluNzdpVkQwY0ZEcVo5TktvUXRHSVBYUE43S2dscFpyMUJnazFrWWZWVHI3cDNLTVJsZDcwWU9zQWdIejh5YjRQOGx4RjV6aDJjR3FTWlI1RTNlQlRrZEVNcURZeFlaZlYvQ2R2STdSU1RDdFdZT0RRdkxNN01vOXhLQnhaZkNVPSIsIm1hYyI6ImJjMzczNWQ2NGEwNzZlNjZhZTU0OTk3MzIxOTczODYzZjMxZjYwNzM2MjY5ZWJkODRkMTEzODU0NmQxMDU4OTQiLCJ0YWciOiIifQ==",
"custom_app_login_code": "198169",
"subscription_status_1": "Unsubscribed",
"subscription_status_3": "Unsubscribed",
"subscription_status_4": "Unsubscribed",
"subscription_status_5": "Unsubscribed",
"loyalty_associated_shops": "Amsterdam Pop-up Store and Sesame Street",
"previous_loyalty_balance": "1617",
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06, 12:32",
"loyalty_first_transaction_date": "2023-01-09, 16:03",
"loyalty_number_of_transactions": "55",
"loyalty_total_credits_received": "1697",
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
}
},
"meta": []
}
Code
Message
1003
60000
Find or Create Contact Async
If a Contact needs to be retrieved or created quickly and any system values that are normally created upon contact creation aren't relevant, this can be used. This API call is much faster than the 'regular' find or create API call; only the Contact's UUID will be returned on the response in this instance.
https://api.piggy.eu/api//contacts/find-or-create/async
Bearer {{ api_key }}
application/json
Body
email
string
REQUIRED
1
2
3
4
5
6
{
"data": {
"uuid": "cd183615-d1cb-402a-b618-6472d5e13890"
},
"meta": []
}
Code
Message
1003
60000
Create Anonymous Contact
Creates an anonymous Contact with a fictitious email address. This can be used whenever a new Contact cannot (yet) be identified by their email address, but some actions are already desired (e.g. creation of Credit Receptions). The Contact in question can later create a Contact with their actual email address, and subsequently 'claim' the anonymous Contact, which is then merged with the new Contact.
https://api.piggy.eu/api//contacts/anonymous
Bearer {{ api_key }}
application/json
Body
contact_identifier_value
string
OPTIONAL
1
2
3
4
5
6
{
"data": {
"uuid": "cd183615-d1cb-402a-b618-6472d5e13890"
},
"meta": []
}
Code
Message
1003
60005
60014
60003
60000
Claim Anonymous Contact
This function enables the conversion of an anonymous Contact (registered with a fictional email address) into a recognized Contact with a real email address. If a Contact already exists with the provided real email address, the anonymous and existing Contacts will be merged.
https://api.piggy.eu/api//contacts/{{anonymous_contact_uuid}}/claim
Bearer {{ api_key }}
application/json
anonymous_contact_uuid
string
OPTIONAL
Body
email
string
OPTIONAL
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
{
"data": {
"id": 45842,
"uuid": "999",
"email": "henkvandenvelden@hotmail.com",
"attributes": [
{
"value": "",
"attribute": {
"id": 2204,
"type": "media_upload",
"field_type": "media_upload",
"name": "avatar",
"label": "Avatar",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2205,
"type": "text",
"field_type": "text",
"name": "firstname",
"label": "First name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2206,
"type": "text",
"field_type": "text",
"name": "lastname",
"label": "Last name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "new_contac6@piggy.eu",
"attribute": {
"id": 2203,
"type": "email",
"field_type": "email",
"name": "email",
"label": "Email",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "0",
"attribute": {
"id": 2220,
"type": "number",
"field_type": "number",
"name": "previous_loyalty_balance",
"label": "Previous credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "0",
"attribute": {
"id": 2219,
"type": "number",
"field_type": "number",
"name": "loyalty_balance",
"label": "Credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "0",
"attribute": {
"id": 2223,
"type": "number",
"field_type": "number",
"name": "loyalty_number_of_transactions",
"label": "Number of transactions",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2221,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_first_transaction_date",
"label": "First credit reception date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2222,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_last_transaction_date",
"label": "Last transaction date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2207,
"type": "text",
"field_type": "text",
"name": "address",
"label": "Address",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2208,
"type": "phone",
"field_type": "phone",
"name": "phonenumber",
"label": "Telephone number",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2209,
"type": "birth_date",
"field_type": "birth_date",
"name": "birthdate",
"label": "Birth date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "OAUTH_API",
"attribute": {
"id": 2210,
"type": "select",
"field_type": "select",
"name": "channel",
"label": "Channel",
"options": [
{
"value": "BUSINESS_APP",
"label": "BUSINESS_APP",
"description": null,
"media": null
},
{
"value": "API",
"label": "API",
"description": null,
"media": null
},
{
"value": "BUSINESS_DASHBOARD",
"label": "BUSINESS_DASHBOARD",
"description": null,
"media": null
},
{
"value": "CUSTOMER_APP",
"label": "CUSTOMER_APP",
"description": null,
"media": null
},
{
"value": "WEBSHOP_API",
"label": "WEBSHOP_API",
"description": null,
"media": null
},
{
"value": "IMPORT",
"label": "IMPORT",
"description": null,
"media": null
},
{
"value": "WEBSITE_FORM",
"label": "WEBSITE_FORM",
"description": null,
"media": null
},
{
"value": "REGISTER_API",
"label": "REGISTER_API",
"description": null,
"media": null
},
{
"value": "OAUTH_API",
"label": "OAUTH_API",
"description": null,
"media": null
},
{
"value": "SUBSCRIPTION_TYPE",
"label": "SUBSCRIPTION_TYPE",
"description": null,
"media": null
},
{
"value": "CUSTOM_APP",
"label": "CUSTOM_APP",
"description": null,
"media": null
},
{
"value": "AUTOMATIONS",
"label": "AUTOMATIONS",
"description": null,
"media": null
},
{
"value": "FORMS",
"label": "FORMS",
"description": null,
"media": null
},
{
"value": "WIDGET",
"label": "WIDGET",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2211,
"type": "number",
"field_type": "number",
"name": "age",
"label": "Age",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2212,
"type": "select",
"field_type": "select",
"name": "locale",
"label": "Preferred language",
"options": [
{
"value": "en",
"label": "English",
"description": null,
"media": null
},
{
"value": "nl",
"label": "Nederlands",
"description": null,
"media": null
},
{
"value": "de",
"label": "Deutsch",
"description": null,
"media": null
},
{
"value": "es",
"label": "Español",
"description": null,
"media": null
},
{
"value": "fr",
"label": "Francés",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "ACTIVE",
"attribute": {
"id": 2213,
"type": "select",
"field_type": "select",
"name": "status",
"label": "Status",
"options": [
{
"value": "ACTIVE",
"label": "Active",
"description": null,
"media": null
},
{
"value": "INACTIVE",
"label": "Inactive",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-01T15:05:00+00:00",
"attribute": {
"id": 2214,
"type": "date_time",
"field_type": "date_time",
"name": "updated_at",
"label": "Updated at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-01T14:59:14+00:00",
"attribute": {
"id": 2215,
"type": "date_time",
"field_type": "date_time",
"name": "created_at",
"label": "Created at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "1",
"attribute": {
"id": 2216,
"type": "boolean",
"field_type": "boolean",
"name": "is_anonymous",
"label": "Anonymous",
"options": [
{
"value": "true",
"label": "True",
"description": null,
"media": null
},
{
"value": "false",
"label": "False",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "0",
"attribute": {
"id": 2217,
"type": "float",
"field_type": "float",
"name": "prepaid_balance",
"label": "Prepaid balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2218,
"type": "multi_select",
"field_type": "multi_select",
"name": "loyalty_associated_shops",
"label": "Associated shops",
"options": [
{
"value": "123123",
"label": "Amsterdam Pop-up Store",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
{
"value": "12312312312312",
"label": "Web Shop",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/webshop.svg"
}
},
{
"value": "2222e1242t3324535",
"label": "Sesame Street",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "0",
"attribute": {
"id": 2224,
"type": "number",
"field_type": "number",
"name": "loyalty_total_credits_received",
"label": "Total credits received",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2225,
"type": "select",
"field_type": "select",
"name": "tier",
"label": "Tier",
"options": [
{
"value": "1",
"label": "Gold",
"description": "VIP Members only",
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2226,
"type": "select",
"field_type": "select",
"name": "subscription_status_3",
"label": "Subscription status: Monthly offers",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2227,
"type": "select",
"field_type": "select",
"name": "subscription_status_1",
"label": "Subscription status: Marketing",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2228,
"type": "select",
"field_type": "select",
"name": "subscription_status_5",
"label": "Product updates",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2229,
"type": "select",
"field_type": "select",
"name": "subscription_status_4",
"label": "Subscription status: Events",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
],
"tier": null,
"subscriptions": [
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Monthly offers",
"description": "A monthly email blast with our best offers!",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": null,
"id": 3
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Events",
"description": "Stay in the loop for all our special events",
"active": true,
"strategy": "OPT_IN",
"uuid": null,
"id": 4
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Product updates",
"description": "Never miss out on any of our newest features",
"active": true,
"strategy": "OPT_OUT",
"uuid": null,
"id": 5
}
}
],
"credit_balance": {
"balance": 0,
"id": 2625795
},
"prepaid_balance": {
"balance_in_cents": 0
},
"current_values": {
"age": null,
"city": "Duckburg",
"dier": "false",
"tier": null,
"uuid": "3a685add-1711-425d-9184-fc6db18e0e1d",
"email": "new_contac6@piggy.eu",
"avatar": "",
"locale": null,
"status": "ACTIVE",
"address": "",
"channel": "OAUTH_API",
"lastname": "",
"birthdate": null,
"firstname": "",
"created_at": "2023-11-01T14:59:14+00:00",
"postalcode": "9999YZ",
"updated_at": "2023-11-01T15:05:00+00:00",
"housenumber": 12,
"phonenumber": "",
"is_anonymous": true,
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=3a685add-1711-425d-9184-fc6db18e0e1d",
"a_custom_attribute": null,
"loyalty_balance": 0,
"prepaid_balance": 0,
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Ikx2dDRqSTF4U3phV21PL1BIcG1STWc9PSIsInZhbHVlIjoiVnc0dUdhblAzZDdod29NQnhmVDlqbFdxYkF3S041WnhlN3hJQ3hrYklaa3BVVzhGbkIrM2R3citUWDVRQnRFL0IrSFJtY1JoQ09WRmR4N3hrZGFzdXBUL2pQVDF4aW9nWFEwQTFUcmliQk5EYXVBaEVpODZiMzh6Qm9Kb0E5QjZaOXM4bjQ3bFhIVEY3SVovRzRnejJZZlVYZUp0ZnA2RUNlUHVYYWlYNytucER5QndxYVNUSnRYVm9na1FrempOTDBmRFE0QkhJOFFIYTM2SnMvcTJ2QT09IiwibWFjIjoiN2JiZTQ5ZDVjMjgyMjY3NDkzYjE2ZTQ0ZTc5M2UyNjUyZWU3ODdiYmFlNzg2N2FjZjJjMDg3MDcxMGUzNTcxNSIsInRhZyI6IiJ9",
"custom_app_login_code": 184014,
"subscription_status_1": "UNSUBSCRIBED",
"subscription_status_3": "UNSUBSCRIBED",
"subscription_status_4": "UNSUBSCRIBED",
"subscription_status_5": "UNSUBSCRIBED",
"loyalty_associated_shops": "",
"previous_loyalty_balance": 0,
"default_contact_identifier": null,
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/3a685add-1711-425d-9184-fc6db18e0e1d",
"loyalty_last_transaction_date": null,
"loyalty_first_transaction_date": null,
"loyalty_number_of_transactions": 0,
"loyalty_total_credits_received": 0,
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=3a685add-1711-425d-9184-fc6db18e0e1d&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=3a685add-1711-425d-9184-fc6db18e0e1d&subscription_type=3"
},
"current_display_values": {
"age": "",
"city": "",
"dier": "False",
"tier": "",
"uuid": "",
"email": "new_contac6@piggy.eu",
"avatar": "",
"locale": "",
"status": "Active",
"address": "",
"channel": "Oauth API",
"lastname": "",
"birthdate": "",
"firstname": "",
"created_at": "2023-11-01, 15:59",
"postalcode": "",
"updated_at": "2023-11-01, 16:05",
"housenumber": "",
"phonenumber": "",
"is_anonymous": "True",
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=3a685add-1711-425d-9184-fc6db18e0e1d",
"a_custom_attribute": "",
"loyalty_balance": "0",
"prepaid_balance": "0",
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6ImhWRlZWek8vUDBFWHpGUFRqaXVuQ1E9PSIsInZhbHVlIjoiRFU4WHF4bitIOFVuMHZvdEdFcjZYSlJOZFFxMHJ6bVpNVW4yZVRCZktna3ZXTExZb3d5RnRYNEVIU2FWM3RrMThOamZlUWRXRTdhdCtxazgvQjRyVEJrREwrNDFsSkhpUERWTTJLTTRkbDMrd1kzM3d5KzdLMXMvbVFZcGVFaHFSR0p4aG5WMUJlRHg0UFB6NllINTdYMURhMzMxY1FuVVZZeGdrcmRGaWIrQytxdXBveVZHampsbUdpUlowWktDbEpzbFlHTzBQSWFyWHo0N2ErbWFzZz09IiwibWFjIjoiOTQ4ZmExZGM2YWU4NTAwYjIxZTY4ZmI5YzhhZDFiYTQzMDQ5ZTdmNWNlNGQyNmU3Yjk3MmZkNDI5ZjJmYzE3NSIsInRhZyI6IiJ9",
"custom_app_login_code": "184014",
"subscription_status_1": "Unsubscribed",
"subscription_status_3": "Unsubscribed",
"subscription_status_4": "Unsubscribed",
"subscription_status_5": "Unsubscribed",
"loyalty_associated_shops": "",
"previous_loyalty_balance": "0",
"default_contact_identifier": "",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/3a685add-1711-425d-9184-fc6db18e0e1d",
"loyalty_last_transaction_date": "",
"loyalty_first_transaction_date": "",
"loyalty_number_of_transactions": "0",
"loyalty_total_credits_received": "0",
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=3a685add-1711-425d-9184-fc6db18e0e1d&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=3a685add-1711-425d-9184-fc6db18e0e1d&subscription_type=3"
}
},
"meta": []
}
Code
Message
1003
55031
60016
Update Contact
Contact's attributes. Please note that system values or Piggy defined attributes, such as 'credit balance' or 'created at', cannot be updated.
Example payload:
1
2
3
4
5
6
{
"attributes": {
"firstname": "John",
"lastname": "Doe"
}
}
https://api.piggy.eu/api//contacts/{{contact_uuid}}
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
Body
attributes
array
REQUIRED
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
{
"data": {
"id": 22,
"uuid": "123",
"email": "john@doe.com",
"attributes": [
{
"value": "",
"attribute": {
"id": 2204,
"type": "media_upload",
"field_type": "media_upload",
"name": "avatar",
"label": "Avatar",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2205,
"type": "text",
"field_type": "text",
"name": "firstname",
"label": "First name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2206,
"type": "text",
"field_type": "text",
"name": "lastname",
"label": "Last name",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "john@doe.com",
"attribute": {
"id": 2203,
"type": "email",
"field_type": "email",
"name": "email",
"label": "Email",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "1617",
"attribute": {
"id": 2220,
"type": "number",
"field_type": "number",
"name": "previous_loyalty_balance",
"label": "Previous credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1612",
"attribute": {
"id": 2219,
"type": "number",
"field_type": "number",
"name": "loyalty_balance",
"label": "Credit balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "55",
"attribute": {
"id": 2223,
"type": "number",
"field_type": "number",
"name": "loyalty_number_of_transactions",
"label": "Number of transactions",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-01-09T15:03:37+00:00",
"attribute": {
"id": 2221,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_first_transaction_date",
"label": "First credit reception date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "2023-11-06T11:32:00+00:00",
"attribute": {
"id": 2222,
"type": "date_time",
"field_type": "date_time",
"name": "loyalty_last_transaction_date",
"label": "Last transaction date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2207,
"type": "text",
"field_type": "text",
"name": "address",
"label": "Address",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2208,
"type": "phone",
"field_type": "phone",
"name": "phonenumber",
"label": "Telephone number",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2209,
"type": "birth_date",
"field_type": "birth_date",
"name": "birthdate",
"label": "Birth date",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2210,
"type": "select",
"field_type": "select",
"name": "channel",
"label": "Channel",
"options": [
{
"value": "BUSINESS_APP",
"label": "BUSINESS_APP",
"description": null,
"media": null
},
{
"value": "API",
"label": "API",
"description": null,
"media": null
},
{
"value": "BUSINESS_DASHBOARD",
"label": "BUSINESS_DASHBOARD",
"description": null,
"media": null
},
{
"value": "CUSTOMER_APP",
"label": "CUSTOMER_APP",
"description": null,
"media": null
},
{
"value": "WEBSHOP_API",
"label": "WEBSHOP_API",
"description": null,
"media": null
},
{
"value": "IMPORT",
"label": "IMPORT",
"description": null,
"media": null
},
{
"value": "WEBSITE_FORM",
"label": "WEBSITE_FORM",
"description": null,
"media": null
},
{
"value": "REGISTER_API",
"label": "REGISTER_API",
"description": null,
"media": null
},
{
"value": "OAUTH_API",
"label": "OAUTH_API",
"description": null,
"media": null
},
{
"value": "SUBSCRIPTION_TYPE",
"label": "SUBSCRIPTION_TYPE",
"description": null,
"media": null
},
{
"value": "CUSTOM_APP",
"label": "CUSTOM_APP",
"description": null,
"media": null
},
{
"value": "AUTOMATIONS",
"label": "AUTOMATIONS",
"description": null,
"media": null
},
{
"value": "FORMS",
"label": "FORMS",
"description": null,
"media": null
},
{
"value": "WIDGET",
"label": "WIDGET",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2211,
"type": "number",
"field_type": "number",
"name": "age",
"label": "Age",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "",
"attribute": {
"id": 2212,
"type": "select",
"field_type": "select",
"name": "locale",
"label": "Preferred language",
"options": [
{
"value": "en",
"label": "English",
"description": null,
"media": null
},
{
"value": "nl",
"label": "Nederlands",
"description": null,
"media": null
},
{
"value": "de",
"label": "Deutsch",
"description": null,
"media": null
},
{
"value": "es",
"label": "Español",
"description": null,
"media": null
},
{
"value": "fr",
"label": "Francés",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": false,
"is_hard_read_only": false
}
},
{
"value": "ACTIVE",
"attribute": {
"id": 2213,
"type": "select",
"field_type": "select",
"name": "status",
"label": "Status",
"options": [
{
"value": "ACTIVE",
"label": "Active",
"description": null,
"media": null
},
{
"value": "INACTIVE",
"label": "Inactive",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2023-11-06T16:47:00+00:00",
"attribute": {
"id": 2214,
"type": "date_time",
"field_type": "date_time",
"name": "updated_at",
"label": "Updated at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "2021-10-20T18:06:09+00:00",
"attribute": {
"id": 2215,
"type": "date_time",
"field_type": "date_time",
"name": "created_at",
"label": "Created at",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "",
"attribute": {
"id": 2216,
"type": "boolean",
"field_type": "boolean",
"name": "is_anonymous",
"label": "Anonymous",
"options": [
{
"value": "true",
"label": "True",
"description": null,
"media": null
},
{
"value": "false",
"label": "False",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "20",
"attribute": {
"id": 2217,
"type": "float",
"field_type": "float",
"name": "prepaid_balance",
"label": "Prepaid balance",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"attribute": {
"id": 2218,
"type": "multi_select",
"field_type": "multi_select",
"name": "loyalty_associated_shops",
"label": "Associated shops",
"options": [
{
"value": "123123",
"label": "Amsterdam Pop-up Store",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
{
"value": "12312312312312",
"label": "Web Shop",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/webshop.svg"
}
},
{
"value": "2222e1242t3324535",
"label": "Sesame Street",
"description": null,
"media": {
"type": "image",
"value": "https://static.piggy.nl/business/profile_types/on_site.svg"
}
},
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1697",
"attribute": {
"id": 2224,
"type": "number",
"field_type": "number",
"name": "loyalty_total_credits_received",
"label": "Total credits received",
"options": [],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "1",
"attribute": {
"id": 2225,
"type": "select",
"field_type": "select",
"name": "tier",
"label": "Tier",
"options": [
{
"value": "1",
"label": "Gold",
"description": "VIP Members only",
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": true
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2226,
"type": "select",
"field_type": "select",
"name": "subscription_status_3",
"label": "Subscription status: Monthly offers",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2227,
"type": "select",
"field_type": "select",
"name": "subscription_status_1",
"label": "Subscription status: Marketing",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2228,
"type": "select",
"field_type": "select",
"name": "subscription_status_5",
"label": "Product updates",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
},
{
"value": "UNSUBSCRIBED",
"attribute": {
"id": 2229,
"type": "select",
"field_type": "select",
"name": "subscription_status_4",
"label": "Subscription status: Events",
"options": [
{
"value": "UNSUBSCRIBED",
"label": "Unsubscribed",
"description": null,
"media": null
},
{
"value": "PENDING_CONFIRMATION",
"label": "Pending confirmation",
"description": null,
"media": null
},
{
"value": "SUBSCRIBED",
"label": "Subscribed",
"description": null,
"media": null
}
],
"is_piggy_defined": true,
"is_soft_read_only": true,
"is_hard_read_only": false
}
}
],
"tier": {
"uuid": "ea77edd4-5a5e-4a6e-aeda-55038c43c839",
"name": "Gold",
"description": "VIP Members only",
"position": 1,
"media": null
},
"subscriptions": [
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Monthly offers",
"description": "A monthly email blast with our best offers!",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": null,
"id": 3
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Events",
"description": "Stay in the loop for all our special events",
"active": true,
"strategy": "OPT_IN",
"uuid": null,
"id": 4
}
},
{
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Product updates",
"description": "Never miss out on any of our newest features",
"active": true,
"strategy": "OPT_OUT",
"uuid": null,
"id": 5
}
}
],
"credit_balance": {
"balance": 1612,
"id": 2625740
},
"prepaid_balance": {
"balance_in_cents": 2000
},
"current_values": {
"age": null,
"city": "Duckburg",
"dier": null,
"tier": "1",
"uuid": "123",
"email": "john@doe.com",
"avatar": "",
"locale": null,
"status": "ACTIVE",
"address": "",
"channel": null,
"lastname": "",
"birthdate": null,
"firstname": "",
"created_at": "2021-10-20T18:06:09+00:00",
"postalcode": "9999YZ",
"updated_at": "2023-11-06T16:47:00+00:00",
"housenumber": 12,
"phonenumber": "",
"is_anonymous": false,
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": null,
"loyalty_balance": 1612,
"prepaid_balance": 20,
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Ikh3ZW8yRW9pSU9Gc25SYmxRUFVVWUE9PSIsInZhbHVlIjoianhuYncxVHBlK0dqMTN4RHhXNzdZNVJ3aGJqcERFdmVWQlcxYjFNZVZYSVdoWVVMWk54K1UvQ2lFek1nMmtGaTJZNGRNOG1rUUxwRGNnU25JcitpN0d5RWVKN21kS1gvSmMvNTA2bmxqU0Z0cmxoR2pPT0Ewc1hXeEJsMkVJNGFDQlNlSWpHRXVpWndyd3g3eTVXck90Z0tlL3J2RHNRKzRjRkNGb0tmVmVzPSIsIm1hYyI6ImZlMzc0ZDYzZDVjNTNjOTc3YTc1ZTMxN2RmMzM4MDFkZWQ2YWI2MDkwNDY4OWQ1MDk0ZWRkN2Y2ZTdhZjY5ZmEiLCJ0YWciOiIifQ==",
"custom_app_login_code": 198169,
"subscription_status_1": "UNSUBSCRIBED",
"subscription_status_3": "UNSUBSCRIBED",
"subscription_status_4": "UNSUBSCRIBED",
"subscription_status_5": "UNSUBSCRIBED",
"loyalty_associated_shops": "123123;5fd3322e-671e-430f-aa38-5ed02e600ff7",
"previous_loyalty_balance": 1617,
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06T11:32:00+00:00",
"loyalty_first_transaction_date": "2023-01-09T15:03:37+00:00",
"loyalty_number_of_transactions": 55,
"loyalty_total_credits_received": 1697,
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
},
"current_display_values": {
"age": "",
"city": "",
"dier": "False",
"tier": "Gold",
"uuid": "",
"email": "john@doe.com",
"avatar": "",
"locale": "",
"status": "Active",
"address": "",
"channel": "",
"lastname": "",
"birthdate": "",
"firstname": "",
"created_at": "2021-10-20, 20:06",
"postalcode": "",
"updated_at": "2023-11-06, 17:47",
"housenumber": "",
"phonenumber": "",
"is_anonymous": "False",
"add_to_wallet": "https://piggy.eu/add-to-wallet/loyalty?uuid=123",
"a_custom_attribute": "",
"loyalty_balance": "1612",
"prepaid_balance": "20",
"custom_app_login_url": "https://piggy.eu/home?token=eyJpdiI6Imx6TzJVV1ZwNlBRd3VkQmV1NnhKbnc9PSIsInZhbHVlIjoiVnlKZWM4OG5Vdjl0QmNEY242YmZ3OFNpWjQwQXkwRThmMCttWHlwQmNSTFluNzdpVkQwY0ZEcVo5TktvUXRHSVBYUE43S2dscFpyMUJnazFrWWZWVHI3cDNLTVJsZDcwWU9zQWdIejh5YjRQOGx4RjV6aDJjR3FTWlI1RTNlQlRrZEVNcURZeFlaZlYvQ2R2STdSU1RDdFdZT0RRdkxNN01vOXhLQnhaZkNVPSIsIm1hYyI6ImJjMzczNWQ2NGEwNzZlNjZhZTU0OTk3MzIxOTczODYzZjMxZjYwNzM2MjY5ZWJkODRkMTEzODU0NmQxMDU4OTQiLCJ0YWciOiIifQ==",
"custom_app_login_code": "198169",
"subscription_status_1": "Unsubscribed",
"subscription_status_3": "Unsubscribed",
"subscription_status_4": "Unsubscribed",
"subscription_status_5": "Unsubscribed",
"loyalty_associated_shops": "Amsterdam Pop-up Store and Sesame Street",
"previous_loyalty_balance": "1617",
"default_contact_identifier": "hash123456",
"subscription_preferences_url": "http://piggy.eu/subscription-preferences/123",
"loyalty_last_transaction_date": "2023-11-06, 12:32",
"loyalty_first_transaction_date": "2023-01-09, 16:03",
"loyalty_number_of_transactions": "55",
"loyalty_total_credits_received": "1697",
"double_opt_in_confirmation_url_1": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=1",
"double_opt_in_confirmation_url_3": "http://piggy.eu/double-opt-in-confirmation?contact_uuid=123&subscription_type=3"
}
},
"meta": []
}
Code
Message
1003
55031
Delete Contact
Deletes a Contact. This action is irreversible, the Contact's Credit Balance and any relation to other entities within the system will be removed, although the entities themselves may remain. When using 'DEFAULT' as the deletion type, a log is created containing detailed information. If 'GDPR' is used as the deletion type, any reference to personal data is removed.
Note: This API call schedules the removal of the Contact, this may take a few minutes.
https://api.piggy.eu/api//contacts/{{contact_uuid}}/delete
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
Body
type
string
REQUIRED
1
2
3
4
{
"data": null,
"meta": {}
}
Code
Message
55031
Get Credit Balance
Retrieve the current Credit Balance of a specific Contact, identified through their UUID.
https://api.piggy.eu/api//contacts/{{contact_uuid}}/credit-balance
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
1
2
3
4
5
6
{
"data": {
"balance": 49
},
"meta": []
}
Code
Message
1003
55031
Get Prepaid Balance
https://api.piggy.eu/api//contacts/{{contact_uuid}}/prepaid/balance
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
1
2
3
4
5
6
7
{
"data": {
"balance_in_cents": 5000,
"balance": "€50.00"
},
"meta": []
}
Code
Message
1003
55031
List Loyalty Transactions
By default, returns the last 10 transactions for a loyalty program. The results can be filtered by loyalty transaction type.
https://api.piggy.eu/api//contacts/{{contact_uuid}}/loyalty-transactions
Bearer {{ api_key }}
application/json
contact_uuid
string
REQUIRED
limit
string
OPTIONAL
page
number
OPTIONAL
type
number
OPTIONAL
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
{
"data": [
{
"uuid": "daa78841-b321-4564-9dd3-91c6ccd9d600",
"credits": 1177,
"created_at": "2023-11-12T19:27:49+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": 1.15,
"unit": {
"id": 298,
"name": "test2",
"label": "Calories",
"prefix": "t",
"is_default": true
}
},
{
"uuid": "9423bcfa-c2b1-41e6-998b-5c4182d1e259",
"credits": 20,
"created_at": "2023-11-12T17:37:41+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "57589e9f-0107-4cdc-afb6-03b8c89d892e",
"credits": 0,
"created_at": "2023-11-10T16:47:40+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "a45f1a18-bed8-4451-aba5-1a9e83fa5ea4",
"credits": 0,
"created_at": "2023-11-10T16:46:12+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123abc-def789-qwerty-34567",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "a06e0546-48d4-4faf-91c6-f66989f5a49f",
"credits": 0,
"created_at": "2023-11-10T16:23:38+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "e64ad300-668b-428d-850d-f4eb9b37268b",
"credits": 10,
"created_at": "2023-11-09T19:24:58+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123abc-def789-qwerty-34567",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "8630aa53-0097-4beb-8504-4938f4ef724e",
"credits": 10,
"created_at": "2023-11-09T14:13:36+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123abc-def789-qwerty-34567",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "ec2e9f1f-2573-4937-90f7-b610e881059b",
"credits": 10,
"created_at": "2023-11-09T14:12:44+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123abc-def789-qwerty-34567",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "e075a8a4-6d50-4b30-a62b-142fb8a91a30",
"credits": 10,
"created_at": "2023-11-09T14:12:29+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123abc-def789-qwerty-34567",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123abc-def789-qwerty-34567",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
},
{
"uuid": "13d3f57a-5566-42d0-8a63-328958f49144",
"credits": 10,
"created_at": "2023-11-09T14:11:32+00:00",
"type": "credit_reception",
"contact_identifier": null,
"contact": {
"uuid": "123",
"email": "john@doe.com",
"credit_balance": {
"id": 2625740,
"balance": 2929
}
},
"shop": {
"id": 15,
"uuid": "123123",
"type": "physical",
"name": "Amsterdam Pop-up Store",
"address": {
"id": 59,
"shop_id": 15,
"street": "Sesame Street",
"housenumber": 12,
"postalcode": "9999YZ",
"city": "Duckburg",
"state": "NH",
"country": "NL",
"latitude": null,
"longitude": null,
"house_number": null,
"postal_code": null
}
},
"unit_value": null,
"unit": {
"id": 112,
"name": "test",
"label": "Calories",
"prefix": "",
"is_default": true
}
}
],
"meta": {
"page": 1,
"limit": 10,
"viewing_from": 1,
"viewing_to": 10,
"last_page": 6,
"total": 57
}
}
Code
Message
1003
55031
1008