FORMAT: 1A HOST: https://listamester.hu # listamester ListaMester rest API allows developers obtaining, modifying and deleting basic objects of ListaMester (groups, members of groups, emails, etc.) ## Ping [/restApi/pub/Ping] ### Test reply [GET] Connection testing with authenticated request. No parameters required, only the authentication headers. + Response 200 (application/json) { "status": "OK" } ## Overview of groups [/restApi/pub/Groups] ### List All Groups [GET] + Response 200 (application/json) [ { "id": "46809", "name": "api test 1" }, { "id": "48657", "name": "api test 2" } ] ## Datafields of a group [/restApi/pub/FieldsOfGroup/{groupId}] + Parameters + groupId (required, String) - ID of the group (e.g. obtained from List All Groups) ### List fields of a group [GET] Obtain custom data fields of a given group. + Response 200 (application/json) [ { "id": "email", "name": "Your email", "orderIndex": 0, "required": true, "selectable": false, "multipleAnswersAllowed": false }, { "id": "name", "name": "Your name", "orderIndex": 1, "required": false, "selectable": false, "multipleAnswersAllowed": false }, { "id": "field89980", "name": "Year of birth", "orderIndex": 2, "required": false, "selectable": false, "multipleAnswersAllowed": false }, { "id": "field90012", "name": "Favorite car type", "orderIndex": 3, "required": false, "selectable": true, "multipleAnswersAllowed": false, "availableAnswers": [ { "id": "228321", "orderIndex": 0, "isSelectedByDefault": false, "label": "Ferrari" }, { "id": "228322", "orderIndex": 1, "isSelectedByDefault": false, "label": "Lamborghini" }, { "id": "228323", "orderIndex": 2, "isSelectedByDefault": false, "label": "Porsche" }, { "id": "228324", "orderIndex": 3, "isSelectedByDefault": false, "label": "Tesla" } ] } ] ## Group manipulation [/restApi/pub/Group/{groupId}{?countMembers}] + Parameters + groupId (required, String) - group ID ### Get group [GET] Obtain a given group with all of its data fields. + Parameters + countMembers (optional, Boolean) - count members. Default: false. + Response 200 (application/json) { "id": "46809", "name": "API test", "memberCount": 42, "dataFields": [ { "id": "field89980", "name": "Year of birth", "orderIndex": 0, "required": false, "selectable": false, "multipleAnswersAllowed": false }, { "id": "field90012", "name": "Favorite car type", "orderIndex": 1, "required": false, "selectable": true, "multipleAnswersAllowed": false, "availableAnswers": [ { "id": "228321", "orderIndex": 0, "isSelectedByDefault": false, "label": "Ferrari" }, { "id": "228322", "orderIndex": 1, "isSelectedByDefault": false, "label": "Lamborghini" }, { "id": "228323", "orderIndex": 2, "isSelectedByDefault": false, "label": "Porsche" }, { "id": "228324", "orderIndex": 3, "isSelectedByDefault": false, "label": "Tesla" } ] } ] } ### Delete group [DELETE] Delete the given group with all of its members and all data. + Response 200 (application/json) { "status": "OK", } ### Create group [POST] Create a new group by copying the given group. The input json parameter class contains the name of the new group and additional parameters. The response returns the new group. + Request (application/json) { "name" : "new group from API", "copyMembers" : true, "copyAutoresponders" : false; } + Response 200 (application/json) { "id": "46909", "name": "new group from API", "dataFields": [ { "id": "field90380", "name": "Year of birth", "orderIndex": 0, "required": false, "selectable": false, "multipleAnswersAllowed": false }, { "id": "field90512", "name": "Favorite car type", "orderIndex": 1, "required": false, "selectable": true, "multipleAnswersAllowed": false, "availableAnswers": [ { "id": "238324", "orderIndex": 0, "isSelectedByDefault": false, "label": "Ferrari" }, { "id": "238325", "orderIndex": 1, "isSelectedByDefault": false, "label": "Lamborghini" }, { "id": "238326", "orderIndex": 2, "isSelectedByDefault": false, "label": "Porsche" }, { "id": "238327", "orderIndex": 3, "isSelectedByDefault": false, "label": "Tesla" } ] } ] } ## Listing members [/restApi/pub/MembersOfGroup/{groupId}{?showSubscriptionParams,showCustomData,page,pageSize}] + Parameters + groupId (required, String) - Group ID + pageSize (optional, Integer) - Maximal number of member per request. Default: 50. + page (optional) - The page index. Default: 1. ### Get members of group [GET] Obtain all members of a group optionally with all of their data. Long result lists are paged. + Parameters + showSubscriptionParams (optional, Boolean) - display extra subscription related data. Default: false. + showCustomData (optional, Boolean) - display values of user defined data fields. Default: false. + Response 200 (application/json) [ { "id": "34443651", "email": "eblond42@gmail.com", "name": "Edmund Blond", "subscribedAt": "2017-10-06T19:14:07.000 UTC", "subscribedFromIP": "37.58.1.0", "deliveryDisabled": "false", "bounced": "false", "field89980": "1985", "field90012": "Tesla" }, { "id": "34443643", "email": "jsmith@gmail.com", "name": "John Smith", "subscribedAt": "2017-10-06T19:12:45.000 UTC", "subscribedFromIP": "37.58.1.0", "deliveryDisabled": "false", "bounced": "false", "field89980": "1977", "field90012": "Lamborghini" } ] ## Member manipulation [/restApi/pub/Member/{memberId}{?saveDeletionInfo,inAllGroups,deleteMissing}] + Parameters + memberId (required, String) - member ID ### Get member data [GET] Obtain a given member. Member data comes as string value with key of data field. If there are multiple values for a data field then their values are separated by '_|_'. + Response 200 (application/json) { "id": "34443643", "email": "jsmith@gmail.com", "name": "John Smith", "groupId": "46809", "subscribedAt": "2017-10-06T19:12:45.000 UTC", "subscribedFromIP": "37.58.1.0", "deliveryDisabled": "false", "bounced": "false", "field89980": "1967", "field90012": "Lamborghini" } ### Delete member [DELETE] Delete a given member. + Parameters + saveDeletionInfo (optional, boolean) - Save the member into deleted members list. Default: false. + unsubscribe (optional, boolean) - Unsubscribe the member from its group instead of deleting. Default: false. + fromAllGroups (optional, boolean) - Unsubscribe the member from all groups. Works with unsubscribe only (not with delete). Default: false. + Response 200 (application/json) { "status": "OK", } ### Modify member [PUT] Modify data of a given member. + Parameters + inAllGroups (optional, Boolean) - Modify data in all groups, not only this current member instance. Default: false. + deleteMissing (optional, Boolean) - Erase data not provided in input. Default: false. + Request (application/json) { "field89980" : "1977" } + Response 200 (application/json) { "status": "OK", } ## Subscribe [/restApi/pub/SubscribeToGroup/{groupId}] + Parameters + groupId (required, String) - The ID of group subscribe to. ### Subscribe to group [POST] Create a new member from json input data. Fields with multiple values has to be merged and concatenated to a single value separated by "_|_". + Request (application/json) { "email": "mrose42@gmail.com", "name": "Mary Rose", "field89980": "1993", "field90012": "Ferrari" } + Response 200 (application/json) { "status" : "OK", "memberId" : "34519469" } ## Unsubscriptions [/restApi/pub/Unsubscriptions{?groupId,pageSize,page}] ### Unsubscriptions [GET] List recently unsubscribed members in reverse time order. Result is paged. + Parameters + pageSize (optional, Integer) - Maximal number of items per request. Default: 50. + page (optional) - The page index. Default: 1. + groupId (optional, String) - List unsubscription only from a given group. + Response 200 (application/json) [ { "id": "719947", "email": "maci1@bithuszarok.hu", "name": "maci1", "subscribedAt": "2017-07-18T19:52:07.000 UTC", "unsubscribedAt": "2017-08-02T05:23:09.000 UTC", "wasInGroup": "37771", "unsubscribeMode": "FromGroupOnly" }, { "id": "719946", "email": "maci2@bithuszarok.hu", "name": "maci2", "subscribedAt": "2017-07-19T19:05:12.000 UTC", "unsubscribedAt": "2017-08-02T05:22:27.000 UTC", "wasInGroup": "37771", "unsubscribeMode": "FromGroupOnly" }, { "id": "719938", "email": "maci3@bithuszarok.hu", "name": "Laci3", "subscribedAt": "2015-03-11T21:02:20.000 UTC", "unsubscribedAt": "2017-08-02T05:10:49.000 UTC", "wasInGroup": "17424", "unsubscribeMode": "FromGroupOnly" } ] ## Searching members [/restApi/pub/SearchMember{?searchType,searchPhrase,groupId}] ### Search members [GET] Find members with given email address or name. Result set is limited to max. 100 hits. + Parameters + searchType (required, String) - Valid values: 'byName' or 'byEmail'. + searchPhrase (required, String) - Can contain wildcard, e.g. '*john*@*mail.com'. + groupId (optional, String) - Restrict search to a given group. + Response 200 (application/json) [ { "id": "34443643", "email": "jsmith@gmail.com", "name": "John Smith", "groupId": "46809", "subscribedAt": "2017-10-06T19:12:45.000 UTC" } ] ## Mail openings [/restApi/pub/OpenStat{?groupId,emailId}] ### Open details [GET] Show the mail opens of an email sent to a group. Result is a list of mail opens, one per member. Date means the first opening time, opens means the overall number of opens. + Parameters + groupId (required, String) - The ID of group where the email was sent to. + emailId (required, String) - The ID of email. + Response 200 (application/json) [ { "email": "test1@bithuszarok.hu", "opens": 3, "date": "2015-10-28T20:24:17.000 UTC" }, { "email": "test2@bithuszarok.hu", "opens": 1, "date": "2015-10-28T20:35:06.000 UTC" }, { "email": "test3@bithuszarok.hu", "opens": 1, "date": "2015-10-28T23:12:26.000 UTC" } ] ## Content page click details [/restApi/pub/ClickStat{?groupId,pageId}] ### Clicks on a content page link [GET] Show the clicks on a content page link placed in any emails sent to a group. Result is a list of link clicks, one per member. Date means the first click time, clicks means the overall number of clicks. + Parameters + groupId (required, String) - The ID of group. + pageId (required, String) - The ID of email. + Response 200 (application/json) [ { "email": "test1@bithuszarok.hu", "clicks": 2, "date": "2015-10-28T21:14:25.000 UTC" }, { "email": "test2@bithuszarok.hu", "opens": 3, "date": "2015-10-28T21:23:17.000 UTC" }, { "email": "test3@bithuszarok.hu", "opens": 1, "date": "2015-10-28T22:27:46.000 UTC" } ] ## Emails [/restApi/pub/Emails] ### List of all emails [GET] Returns the ID, name, subject and send counter of all emails. + Response 200 (application/json) [ { "id": "123987", "name": "welcome", "subject": "Welcome to car fun club", "sentOut": 49 }, { "id": "118979", "name": "autoresponder 1", "subject": "The world of super cars", "sentOut": 21 }, { "id": "122425", "name": "autoresponder 2", "subject": "Your dream cars", "sentOut": 6 } ] ### Create email [POST] Create a new email message. Parameter is in json, containing the following properties + Parameters + name (required, String) - The name of the email. + subject (required, String) - The subject of the email. + message (required, String) - The body of the email. + isHtml (optional, String) - "True" if the body is in html format (default: False). + inlineImages (optional, String) - "True" if references has to be converted to inline attachments (default: False). + followLinks (optional, String) - "True" if URLs has to be followed in order to gather click statistics (default: False). + openImageAlt (optional, String) - The "alt" attribute of open measuring image. + attachments - json array of class instances {name, mimeType, dataBase64} + Response 200 (application/json) { "status": "OK", "id": 137002 } ## Content pages [/restApi/pub/ContentPages] ### List of all content pages [GET] Returns the ID, name, and redirect URL of all content pages. + Response 200 (application/json) [ { "id": "3451", "name": "Car club events", "url": "http://supercarclub.com/events" }, { "id": "4532", "name": "Car club gallery", "url": "http://supercarclub.com/gallery" } ] ## Filters [/restApi/pub/Filters{?groupId}] ### List of all member filters [GET] Returns member filters. + Parameters + groupId (optional, String) - Restrict filters to a given group. + Response 200 (application/json) [ { "id": "424", "name": "Members who opened welcome email", "groupId": "29460" }, { "id": "453", "name": "Ferrari funs", "groupId": "29460" } ] ## Posts [/restApi/pub/Posts{?groupId}] ### List of all posts [GET] Returns list of posts. + Parameters + groupId (optional, String) - Restrict filters to a given group. + Response 200 (application/json) [ { "postId": "268409", "groupId": "175", "emailId": "123987", "sendToTotal": 10, "sentOut": 9, "bounced": 1 }, { "postId": "268408", "groupId": "35918", "emailId": "123987", "email2Id": "118979", "startedAt": "2017-08-11T09:41:00.000 UTC", "sendToTotal": 97, "sentOut": 97, "bounced": 0 }, { "postId": "268407", "groupId": "2", "emailId": "1180", "email2Id": "1253", "startedAt": "2017-08-10T20:20:51.000 UTC", "sendToTotal": 6129, "sentOut": 6129, "bounced": 6 } ] ## Sending emails [/restApi/pub/SendMail{?target,emailId,groupId,memberId,filterId,speed,time}] ### Send email [POST] Send or schedule an email to a group or to a member. PostID is returned if target=group. + Parameters + target (required, String) - Has to be either "group" or "member". + emailId (required, String) - The ID of email. + groupId (optional, String) - The ID of group where the email is targeted. Required if target="group". + filterId (optional, String) - The ID of the member filter applied on the group. + speed (optional, Integer) - The sending speed (emails/minute) when target="group". Default: 20, max. value: 200. + time (optional, Integer) - Scheduling time in UTC integer value (number of seconds since the epoch). + memberId (optional, String) - The ID of recipient member. Required if target="member". + Response 200 (application/json) { "status": "OK" "postId" : "453432" } ## Send single email [/restApi/pub/SendSingleMail] ### Send casual email [POST] Send a single email message to a given address. Parameters are in json. + Parameters + from (required, String) - Sender email address, format "[name] ". + to (required, String) - Destination email address (recipient), format "[name] ". + cc (optional, String[]) - List of additional carbon copy recipients (bcc). + bcc (optional, String[]) - List of additional blind carbon copy recipients (bcc). + subject (required, String) - The subject of the email. + message (required, String) - The body of the email. + isHtml (optional, String) - "True" if the body is in html format (default: False). + inlineImages (optional, String) - "True" if references has to be converted to inline attachments (default: False). + attachments - json array of class instances {name, mimeType, dataBase64} + Response 200 (application/json) { "status": "OK" } ## Send SMS [/restApi/pub/SendSingleSms] ### Send casual SMS [POST] Send a single SMS message to a given phone number. Parameters are in json. + Parameters + phoneNumber (required, String) - phone number to send". + message (required, String) - the text of the short message". + Response 200 (application/json) { "status": "OK" } ## Invoice creation [/restApi/pub/CreateInvoice/{invoiceId}/{memberId}{?amount}] ### Create and send invoice to a member [POST] Create and send invoice to member. Consumes json as input. + Parameters + invoiceId (required, String) - Invoice ID as shown on UI. + memberId (required, String) - The ID of member. + amount (optional, Float) - The price of first item on the invoice. + Response 200 (application/json) { "status": "OK", } ## Mass manipulation of members [/restApi/pub/CsvIO/{groupId}] CSV export and import. + Parameters + groupId (required, String) - Group ID for export or import. ### Export detailed member data in CSV format [GET] Exporting member data from a group. Returns an UTF-8 encoded CSV payload in response body. + Response 200 (text/plain) "test1@bithuszarok.hu","maci1",,"22534005","--.--.--.--","","2016. 03. 17. 23:30:15","0","","0",,,,, "test4@bithuszarok.hu","maci4",,"22534006","--.--.--.--","","2016. 03. 17. 23:30:15","0","","0",,,,, "test2@bithuszarok.hu","maci2",,"22534008","--.--.--.--","","2016. 03. 17. 23:30:15","0","","0",,,,, ### Import data from CSV format [POST] Importing member data from CSV. Request body has to contain raw UTF-8 encoded CSV file content. Members (identified by their email addess) are updated if they are already present in the group. Notice: when using curl to post data from file, use --data-binary @path/to/file. + Response 200 (application/json) { "status": "OK", } ## Webhooks of a group [/restApi/pub/WebhooksOfGroup/{groupId}] + Parameters + groupId (required, String) - group ID ### Get hooks [GET] List the webhooks of group. + Response 200 (application/json) [ { "active": true, "command": "subscribe", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": "ujdMTsLoijXYZABC", "postUrl": null }, "groupId": "523175", "id": "4", "isOutputHook": false, "mapping": [ { "fieldId": "599573", "id": "10", "name": "address" }, { "fieldId": "624933", "id": "11", "name": "coupon_code" }, { "fieldId": "60544", "id": "12", "name": "Choose" } ], "name": "test hook on my test group", "nameFieldName": "name" }, { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "id": "653", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": "book" } ] ### Create new webhook for group [POST] Create a new webhook for the group. The input json has to be valid webhook object similar to ones returned by the list command. The id of the new webhook will be returned in the hook object of the answer. + Request (application/json) { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": "book" } + Response 200 (application/json) { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "id": "653", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": "book" } ## Webhook [/restApi/pub/Webhook/{id}] + Parameters + id (required, String) - the id of the webhook ### Get hook [GET] Obtain the hook object in json. + Response 200 (application/json) { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "id": "653", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": book } ### Delete webhook [DELETE] Delete the given group with all of its members and all data. + Response 200 (application/json) { "status": "OK", } ### Update webhook [PUT] Update (modify) a webhook. The input json has to be valid webhook object similar to ones returned by the list command, containing all of its properties (id can be omitted because it is passed as path parameter). The result of modify operation will be returned as a json object. + Request (application/json) { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": "Book of Roses" } + Response 200 (application/json) { "active": false, "command": "paymentFinished", "emailFieldName": "email", "extraParams": { "extraValues": [ ], "hookKey": null, "postUrl": "https://example.com/postMe" }, "groupId": "54175", "id": "653", "isOutputHook": true, "mapping": [ { "fieldId": "460544", "id": "15", "name": "FORM_ID" } ], "name": "product", "nameFieldName": "Book of Roses" } ## Activity information [/restApi/pub/MemberActivities{?groupId,begin,end}] + Parameters + groupId (required, Integer) - Groupd ID + begin (optional, Long) - Begin timestamp (UTC in seconds). Default: NOW - 1 month. + end (optional, Long) - End timestamp (UTC in seconds). Default: NOW. ### Get member activities [GET] Obtain the activities from all members in a group. + Response 200 (application/json) { "status": "OK", "results": [ { "email": "test4@nomail.hu", "activities": [ { "at": 1700762836, "type": "bounce" }, { "at": 1687096937, "type": "mailSend", "emailId": 137012 }, { "at": 1687105107, "type": "mailSend", "emailId": 137016 } ] }, { "email": "test3@nomail.hu", "activities": [ { "at": 1700768124, "type": "mailOpen", "emailId": 137047 }, { "at": 1700938677, "type": "click", "urlId": 3, "emailId": 137052, "message": "LT: CP" }, { "at": 1687094848, "type": "mailSend", "emailId": 137012 } ] }, { "email": "test1@nomail.hu", "activities": [ { "at": 1687086223, "type": "mailOpen", "emailId": 137012 }, { "at": 1692563775, "type": "mailOpen", "emailId": 137052 }, { "at": 1687086223, "type": "click", "urlId": 0, "emailId": 137012, "message": "LT: CP" }, { "at": 1687086235, "type": "click", "urlId": 4, "emailId": 137012, "message": "LT: AF" }, { "at": 1695492165, "type": "mailSend", "emailId": 137073 }, { "at": 1695548259, "type": "mailSend", "emailId": 137049 } ] }, { "email": "test2@nomail.hu", "activities": [ { "at": 1700766593, "type": "unsubscribe", "mode": "FromGroupOnly" }, { "at": 1687094805, "type": "mailSend", "emailId": 137012 } ] } ], "urls": [ { "id": 0, "url": "https://lev-lista.hu" }, { "id": 1, "url": "http://zsiday.hu" }, { "id": 2, "url": "https://lev-lista.hu/?p\u003dlistpage\u0026l\u003d[adat 1]" }, { "id": 3, "url": "LM_INTERNAL" }, { "id": 4, "url": "https://hmpg.net/" } ], "emails": [ { "id": 137012, "name": "teszt1", "subject": "próba levelecske" }, { "id": 137047, "name": "Chamaileon próba - másolat", "subject": "Hali [név]!, Ez egy Chamaileon próbalevél." }, { "id": 137049, "name": "emojis", "subject": "convert teszt" }, { "id": 137052, "name": "link teszt", "subject": "teszt levelecske linkekkel" }, { "id": 137057, "name": "sok link", "subject": "teszt levelecske tele linkekkel" }, { "id": 137073, "name": "újra kiküldős", "subject": "eredeti levél, amit újra kell majd küldeni" } ] }