-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sitecore Send (Moosend) API Version 1.0.postman_collection.json
4516 lines (4516 loc) · 191 KB
/
Sitecore Send (Moosend) API Version 1.0.postman_collection.json
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
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"info": {
"_postman_id": "f380e9ea-3aca-4b6d-9abd-b59a96a42d75",
"name": "Sitecore Send (Moosend) API Version 1.0",
"description": "## Getting started with Moosend API\n\nBefore making use of our API, please read the following carefully to get you started.\n\n## Making API Requests\n\nBoth API requests and responses have a format the data is expected to be sent or returned.\n\nRequests consist of a URL that specifies which operation to also call, a query string and usually a request stream as well, which specify parameters for the call. For each request there is a syntax pattern for the URL that must be followed for the system to understand your intension. You may find the appropriate pattern for each call in the “Access URLs” sections in our API Documentation pages.\n\nParameters in the query string or the request stream should be specified in a format like:\n\nname1=value1&name2=value2&name3=value3&...\n\nAs you have probably noticed, each name-value pair is separated by a & character. Note also that special characters in values should be URL-encoded. There are built-in URL-encoding functions in all major programming languages like C# and PHP. Please refer to each language’s documentation for more information.\n\nThe request must also contain information about how you would like the response to be formatted. There are currently two available formats for getting a response: **xml** and **json**. You have to specify the format in every API call as an extension in the URL.\n\nSo let’s summarize all above with an example request URL and a couple of hypothetical parameters:\n\nExample requesting response in xml format:\n\n`http://api.moosend.com/v3/somepath/testmethod.xml?param1=value1&m2=value2+with+special+chars+like+%40`\n\nExample requesting response in json format:\n\n`http://api.moosend.com/v3/somepath/testmethod.json?param1=value1&m2=value2+with+special+chars+like+%40`\n\nNote also that you must set the correct accept header in your application’s request in order to retrieve the response data in the expected format.\n\nFor xml response you must set the accept header to: **application/xhtml+xml,application/xml**\n\nFor json response you must set the accept header to: **application/json**\n\n## Authentication\n\nAll API calls require authentication. This is essential for the API to identify which user is making the call so that appropriate results will be returned, as well as for security reasons.\n\nAuthentication is achieved through the use of an API key. This is a unique key for each account in our system. You can get your API key from the settings page in your account. Please keep your API key safe to prevent any unauthorized access. Once you obtain your API key, you will have to use it in every API call you make. The API key must always be specified as a parameter in the query string of the requesting URL, as in the example below:\n\n`http://api.moosend.com/v3/campaigns/create.xml?apikey=YOUR_API_KEY`\n\nYou may find your API Key or generate a new one in the respective section under the Settings Menu.\n\n## Request Methods\n\nThere are 3 request methods that you will have to use in order to make full use of our API: GET, POST and DELETE. You must set your application to make each API call using the appropriate request method, which is explicitly specified in our API documentation pages for each call. Let us explain how these methods should be used:\n\n**GET:** Used for retrieving data from your account in our system. All request parameters in this case are expected to be found in the request URL, in a format specified explicitly for each API call. You can find detailed information on how to specify parameters for each call in our API documentation pages. You may test a GET request in a web browser, by entering the URL in the address bar. Don't forget to include your API key parameter in the query string!\n\n**POST:** Used for sending information to our system in order to modify data in your account. In this case request parameters should be specified in the request stream. Only authentication and response format are usually expected to be found in the URL, unless differently specified in the “Access URLs” section of our API Documentation pages. Currently, the API accepts only URL-encoded data in the request stream, which is the same format as the one expected for parameter values in the query string. Note also that the content-type header of the request to be made should be “application/x-www-form-urlencoded”.\n\n**DELETE:** Used for deleting information from your account. No more different from POST regarding its use.\n\nBelow is an example of a *POST* request:\n\nRequest URL:\n\n`http://api.moosend.com/v3/campaigns/create.xml?apikey=YOUR_API_KEY`\n\nRequest Stream:\n\n*(assumes hypothetical parameters: Name = New campaign, Subject = Some cool subject, SenderEmail = [email protected], WebLocation = http://example.com/home/newsletter, MailingListID = 01234567-89ab-cdef-0123-456789abcdef)*\n\n`Name=New+campaign&Subject=Some+cool+subject&SenderEmail=info%40example.com& WebLocation=http%3a%2f%2fexample.com%2fhome%2fnewsletter&MailingListID=01234567-89ab-cdef-0123-456789abcdef`\n\n## Changelog\n\n+ Added HasExternalDoubleOptIn property in [Adding subscribers](https://jsapi.apiary.io/previews/moosendapp/reference/subscribers/add-or-update-subscribers/adding-subscribers)\n\n+ Added HasExternalDoubleOptIn property in [Adding multiple subscribers](https://jsapi.apiary.io/previews/moosendapp/reference/subscribers/add-or-update-subscribers/adding-multiple-subscribers)\n\n+ Added HasExternalDoubleOptIn property in [Updating a subscriber](https://jsapi.apiary.io/previews/moosendapp/reference/subscribers/add-or-update-subscribers/updating-a-subscriber)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "lists",
"item": [
{
"name": "{Mailing List ID}",
"item": [
{
"name": "customfields",
"item": [
{
"name": "{Custom Field ID}",
"item": [
{
"name": "Updating a custom field",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"City\",\n \"CustomFieldType\": \"SingleSelectDropdown\",\n \"Options\": \"Frankfurt,London,Paris,Rome\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/:CustomFieldID/update.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
":CustomFieldID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "bafe55f4-e53e-4651-8164-c6d6ff05081b",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "CustomFieldID",
"value": "b42b4e0f-ca2f-403d-8231-32a2405651af",
"description": "(Required) \nThe ID of the custom field to be updated.\n"
},
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field belongs.\n"
}
]
},
"description": "Updates the properties of an existing custom field in the specified mailing list."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error message. This will be null if successful.\n\n+ `Context` : The unique id for the updated custom field.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "e.g. application/json",
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"City\",\n \"CustomFieldType\": \"SingleSelectDropdown\",\n \"Options\": \"Frankfurt,London,Paris,Rome\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/:CustomFieldID/update.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
":CustomFieldID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "{{apiKey}}"
}
],
"variable": [
{
"key": "CustomFieldID",
"value": "b42b4e0f-ca2f-403d-8231-32a2405651af",
"description": "(Required) \nThe ID of the custom field to be updated.\n"
},
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field belongs.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": null\n}"
}
]
},
{
"name": "Removing a custom field",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/:CustomFieldID/delete.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
":CustomFieldID",
"delete.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "bafe55f4-e53e-4651-8164-c6d6ff05081b",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "CustomFieldID",
"value": "b42b4e0f-ca2f-403d-8231-32a2405651af",
"description": "(Required) \nThe ID of the custom field to be deleted.\n"
},
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field belongs.\n"
}
]
},
"description": "Removes a custom field definition from the specified mailing list."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error message. This will be null if successful.\n\n+ `Context` : Context will be null if successful.",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/:CustomFieldID/delete.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
":CustomFieldID",
"delete.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "{{apiKey}}"
}
],
"variable": [
{
"key": "CustomFieldID",
"value": "b42b4e0f-ca2f-403d-8231-32a2405651af",
"description": "(Required) \nThe ID of the custom field to be deleted.\n"
},
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field belongs.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": null\n}"
}
]
}
]
},
{
"name": "Creating a custom field",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"Town\",\n \"CustomFieldType\": \"SingleSelectDropdown\",\n \"Options\": \"Athens,London,New York\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/create.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
"create.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "bafe55f4-e53e-4651-8164-c6d6ff05081b",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field will belong.\n"
}
]
},
"description": "Creates a new custom field in the specified mailing list."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error message. This will be null if successful.\n\n+ `Context` : The unique id for the new custom field.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "e.g. application/json",
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"Town\",\n \"CustomFieldType\": \"SingleSelectDropdown\",\n \"Options\": \"Athens,London,New York\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/customfields/create.{{Format}}?apikey={{apiKey}}",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"customfields",
"create.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "{{apiKey}}"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list where the custom field will belong.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": \"b42b4e0f-ca2f-403d-8231-32a2405651af\"\n}"
}
]
}
]
},
{
"name": "segments",
"item": [
{
"name": "{Segment ID}",
"item": [
{
"name": "criteria",
"item": [
{
"name": "Adding criteria to segments",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Field\": \"DateAdded\",\n \"DateFunction\": \"Year\",\n \"Comparer\": \"Is\",\n \"Value\": \"2020\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/criteria/add.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"criteria",
"add.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
}
]
},
"description": "Adds a new criterion (a rule) to the specified segment."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error for this call. This will be null if successful.\n\n+ `Context` : Contains the new criteriaID.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "e.g. application/json",
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Field\": \"DateAdded\",\n \"DateFunction\": \"Year\",\n \"Comparer\": \"Is\",\n \"Value\": \"2020\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/criteria/add.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"criteria",
"add.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": 15783\n}"
}
]
},
{
"name": "Updating segment criteria",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Field\": \"LinkURL\",\n \"Comparer\": \"is\",\n \"Value\": \"https://www.moosend.com/\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/criteria/:CriteriaID/update.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"criteria",
":CriteriaID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
},
{
"key": "CriteriaID",
"value": "41186157.58060956",
"description": "(Required) \nThe ID of the criterion to process.\n"
}
]
},
"description": "Updates an existing criterion in the specified segment."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error for this call. This will be null if successful.\n\n+ `Context` : Contains the updated criteriaID.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "e.g. application/json",
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Field\": \"LinkURL\",\n \"Comparer\": \"is\",\n \"Value\": \"https://www.moosend.com/\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/criteria/:CriteriaID/update.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"criteria",
":CriteriaID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
},
{
"key": "CriteriaID",
"value": "41186157.58060956",
"description": "(Required) \nThe ID of the criterion to process.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": 15783\n}"
}
]
}
]
},
{
"name": "Getting segment details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/details.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"details.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
},
{
"key": "SegmentID",
"value": "10198",
"description": "(Required) \nThe ID of the segment to fetch results for.\n"
}
]
},
"description": "Gets detailed information on a specific segment and its criteria. However, it does not include the subscribers returned by the segment."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful\n\n+ `Error` : The response error message. This will be null if successful\n\n+ `Context` : The response context. Contains all the following information:\n - `Paging` : A list with all",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/details.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"details.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
},
{
"key": "SegmentID",
"value": "10198",
"description": "(Required) \nThe ID of the segment to fetch results for.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": {\n \"ID\": 10198,\n \"Name\": \"test\",\n \"MatchType\": 0,\n \"Criteria\": [\n {\n \"ID\": 15778,\n \"SegmentID\": 10198,\n \"Field\": 2,\n \"CustomFieldID\": null,\n \"Comparer\": 0,\n \"Value\": \"Paul\",\n \"DateFrom\": null,\n \"DateTo\": null,\n \"Properties\": null,\n \"Subscriteria\": null\n },\n {\n \"ID\": 15779,\n \"SegmentID\": 10198,\n \"Field\": 4,\n \"CustomFieldID\": null,\n \"Comparer\": 8,\n \"Value\": \"5\",\n \"DateFrom\": \"/Date(1465167600000+0100)/\",\n \"DateTo\": \"/Date(1465945200000+0100)/\",\n \"Properties\": null,\n \"Subscriteria\": null\n }\n ],\n \"CreatedBy\": \"212.123.123.112\",\n \"CreatedOn\": \"/Date(1465806037033+0100)/\",\n \"UpdatedBy\": \"212.123.123.112\",\n \"UpdatedOn\": \"/Date(1465806269980+0100)/\",\n \"FetchType\": 0,\n \"FetchValue\": 0,\n \"Description\": \"Fetch all where \\\"Recipient Name\\\" is \\\"Paul\\\" and \\\"Campaigns Opened\\\" is greater than \\\"5\\\"\"\n }\n}"
}
]
},
{
"name": "Getting segment subscribers",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/members.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"members.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
},
{
"key": "SegmentID",
"value": "10198",
"description": "(Required) \nThe ID of the segment to fetch results for.\n"
}
]
},
"description": "Gets a list of the subscribers that the specified segment returns according to its criteria. Because the results for this call could be quite big, paging information is required as input."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful\n\n+ `Error` : The response error message. This will be null if successful\n\n+ `Context` : The response context. Contains all the following information:\n - `Paging` : A list with all",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/members.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"members.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
},
{
"key": "SegmentID",
"value": "10198",
"description": "(Required) \nThe ID of the segment to fetch results for.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": {\n \"Paging\": {\n \"PageSize\": 500,\n \"CurrentPage\": 1,\n \"TotalResults\": 2,\n \"TotalPageCount\": 1,\n \"SortExpression\": null,\n \"SortIsAscending\": false\n },\n \"Subscribers\": [\n {\n \"ID\": \"07111755-8ee4-1111-ad2b-1111899c6f\",\n \"Name\": \"Paul\",\n \"Email\": \"[email protected]\",\n \"CreatedOn\": \"/Date(1461777177393+0100)/\",\n \"UpdatedOn\": \"/Date(1461777177393+0100)/\",\n \"UnsubscribedOn\": null,\n \"UnsubscribedFromID\": null,\n \"SubscribeType\": 1,\n \"SubscribeMethod\": 2,\n \"CustomFields\": [\n {\n \"CustomFieldID\": \"63705cf2-7cbb-4ac1-a246-1a8c1b416026\",\n \"Name\": \"CheckBox\",\n \"Value\": \"True\"\n },\n {\n \"CustomFieldID\": \"63705cf2-7cbb-4ac1-a246-1a8c1b416026\",\n \"Name\": \"Date\",\n \"Value\": \"4/12/2016 12:00:00 AM\"\n },\n {\n \"CustomFieldID\": \"9df6dcc4-bef2-47e7-93af-86889b6b6d6a\",\n \"Name\": \"Age\",\n \"Value\": \"25\"\n },\n {\n \"CustomFieldID\": \"0d2199aa-65fc-448c-b9fe-199e3b72ebc5\",\n \"Name\": \"Some custom field\",\n \"Value\": \"Something2\"\n },\n {\n \"CustomFieldID\": \"46721a6b-09aa-46ff-bab1-a0b75dea24cf\",\n \"Name\": \"Some custom field 2\",\n \"Value\": \"Text2\"\n }\n ],\n \"RemovedOn\": null\n },\n {\n \"ID\": \"0bb00735-7ec7-41de-ab04-d622f67340c4\",\n \"Name\": \"John\",\n \"Email\": \"[email protected]\",\n \"CreatedOn\": \"/Date(1461777334373+0100)/\",\n \"UpdatedOn\": \"/Date(1461783253670+0100)/\",\n \"UnsubscribedOn\": null,\n \"UnsubscribedFromID\": null,\n \"SubscribeType\": 1,\n \"SubscribeMethod\": 0,\n \"CustomFields\": [\n {\n \"CustomFieldID\": \"0bb00735-7ec7-41de-ab04-d622f67340c4\",\n \"Name\": \"Country\",\n \"Value\": \"UK\"\n },\n {\n \"CustomFieldID\": \"46721a6b-09aa-46ff-bab1-a0b75dea24cf\",\n \"Name\": \"Status\",\n \"Value\": \"single\"\n }\n ],\n \"RemovedOn\": null\n }\n ]\n }\n}"
}
]
},
{
"name": "Updating a segment",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"Customer Tracking and Opener\",\n \"MatchType\": \"Any\",\n \"FetchType\": \"All\",\n \"Criteria\": [\n {\n \"Field\": \"AddedAnythingToCart\",\n \"Comparer\": \"IsTrue\",\n \"Times\": 2,\n \"ProductCode\": \"123\",\n \"LastXMinutes\": 4320,\n \"WebsiteId\": \"12345678-1234-abdc-efgh-1231bc456efg789hij\"\n },\n {\n \"Field\": \"OpenedAnyCampaign\",\n \"Comparer\": \"IsTrue\",\n \"DateFrom\": \"2019-09-01\",\n \"DateTo\": \"2020-12-01\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/update.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
}
]
},
"description": "Updates the properties and criteria of an existing segment. You may update the name and match type of the segment. If criteria are included these will also be updated. You may update only the criteria. In that case, the existing name and settings will be retained."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response message. This will be null if successful.\n\n+ `Context` : The response context for this call. This will be null if successful.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "e.g. application/json",
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"Name\": \"Customer Tracking and Opener\",\n \"MatchType\": \"Any\",\n \"FetchType\": \"All\",\n \"Criteria\": [\n {\n \"Field\": \"AddedAnythingToCart\",\n \"Comparer\": \"IsTrue\",\n \"Times\": 2,\n \"ProductCode\": \"123\",\n \"LastXMinutes\": 4320,\n \"WebsiteId\": \"12345678-1234-abdc-efgh-1231bc456efg789hij\"\n },\n {\n \"Field\": \"OpenedAnyCampaign\",\n \"Comparer\": \"IsTrue\",\n \"DateFrom\": \"2019-09-01\",\n \"DateTo\": \"2020-12-01\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/update.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"update.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": null\n}"
}
]
},
{
"name": "Deleting A Segment",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/delete.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"delete.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"description": "(Required) \nYou may find your API Key or generate a new one in your account settings.\n"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
}
]
},
"description": "Deletes a segment along with its criteria from the mailing list. The subscribers of the mailing list that the segment returned are not deleted or affected in any way."
},
"response": [
{
"name": "+ `Code` : The response code for this call. This will be 0 if successful.\n\n+ `Error` : The response error for this call. This will be null if successful.\n\n+ `Context` : The response context for this call. This will be null if successful.",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/lists/:MailingListID/segments/:SegmentID/delete.{{Format}}?apikey=13cffeee-0b8c-4610-8e0d-efa7bd44be32",
"host": [
"{{baseUrl}}"
],
"path": [
"lists",
":MailingListID",
"segments",
":SegmentID",
"delete.{{Format}}"
],
"query": [
{
"key": "apikey",
"value": "13cffeee-0b8c-4610-8e0d-efa7bd44be32"
}
],
"variable": [
{
"key": "MailingListID",
"value": "a589366a-1a34-4965-ac50-f1299fe5979e",
"description": "(Required) \nThe ID of the mailing list the specified segment belongs.\n"
},
{
"key": "SegmentID",
"value": "10199",
"description": "(Required) \nThe ID of the segment to update.\n"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"Code\": 0,\n \"Error\": null,\n \"Context\": null\n}"
}
]
}
]
},
{
"name": "Creating a new segment",
"request": {
"method": "POST",
"header": [