How to retrieve ID of a list in Mailjet? -


please how can retrieve id of list add contact in , same contact how can know id of contact add list . can please answer me fastly . best regards ,

to retrieve id of contactlists in system, send http request to:

https://api.mailjet.com/v3/rest/contactslist/

curl -x --user "$mj_apikey_public:$mj_apikey_private" https://api.mailjet.com/v3/rest/contactslist 

the json returned server contain lists, including id in format:

{   "address": "",   "createdat": "2014-06-10t09:11:15z",   "id": 2,   "isdeleted": false,   "name": "testlist",   "subscribercount": 1 }, 

to id of contact, can use contact endpoint of api , specify email:

https://api.mailjet.com/v3/rest/contact/johnsmith@example.com

curl -x --user "$mj_apikey_public:$mj_apikey_private" https://api.mailjet.com/v3/rest/contact/johnsmith@example.com 

this return following:

{"count": 1,"data": [ {   "createdat": "2014-06-10t13:24:05z",   "deliveredcount": 24,   "email": "johnsmith@example.com",   "id": 3,   "isoptinpending": false,   "isspamcomplaining": false,   "lastactivityat": "2015-02-06t10:01:17z",   "lastupdateat": "2014-06-10t13:24:05z",   "name": "",   "unsubscribedat": "",   "unsubscribedby": "" }], "total": 1 } 

you can find developer documentation @ http://dev.mailjet.com

hope helps!


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -