Subscriber

In this Article:

View in Postman collection

GET /apiv2/subscriber/{ecal_id}

Get a single subscriber and its full details.

Parameter Required Description
apiKey YES The apiKey provided by ECAL and is found under Options in Publisher Management Portal
apiSign YES MD5 string of all parameters signed by the SECRET

GET /apiv2/subscriber/{email_address}

Get an existing subscription of a publisher’s calendar.

Parameter Required Description
apiKey YES The apiKey provided by ECAL and is found under Options in Publisher Management Portal
apiSign YES MD5 string of all parameters signed by the SECRET
  • Note: The email_address refers to the email used to subscribe to ECAL. For more information, please refer to the detailed Webhook Notifications.

POST /apiv2/subscriber/{ecal_id}/subscriptions/{action}

Add a new calendar to a subscriber. ecal_id is the unique subscriber id. action is either add or remove.

Parameter Required Description
apiKey YES The apiKey provided by ECAL and is found under Options in Publisher Management Portal
apiSign YES MD5 string of all parameters signed by the SECRET

Parameters

The data must be posted as a RAW JSON string.

The list below shows the fields available:

Field Type Required Description
calendarIds string array YES The ids of the calendar for the publisher.

Example POST Data

The data must be posted as a RAW JSON string. The list below shows the fields available:

Request
{
    "calendarIds": ["59506210aa8a3b4c428b4567","5eafaff6cfac145a6d0662d1"]
}
Response
{
    "data": {
        "id": "652375ab635fd36a5e6695fb",
        "publisherId": 12279,
        "publisherOrgId": 4191,
        "subscriptionWidgetId": "5e9e912475961e79708b4567",
        "standardWidgetId": "",
        "email": "test+6354@ecal.com",
        "first_name": "",
        "last_name": "",
        "age_group": "",
        "name": "",
        "applications": [
            {
                "name": "hotmail",
                "ip": "139.216.205.51",
                "fingerprint": "6958a5a79c8535cbcd76dac79d16c5f2",
                "os": "Windows",
                "device": "Desktop"
            }
        ],
        "data": {
            "application": "hotmail",
            "calIds": [
                "59506202aa8a3b56428b4567",
                "66cc0f7964b36a314725e151",
                "59506210aa8a3b4c428b4567",
                "5eafaff6cfac145a6d0662d1"
            ],
            "calNames": [
                "Alpha (Uncategorized)",
                "652375ab635fd36a5e6695fb_private",
                "Beta (Test 1 Parent, Test 1 child, Test 2 Parent)",
                "One Tag"
            ],
            "eventIds": [],
            "tags": [
                ""
            ],
            "privateCalIds": [
                "66cc0f7964b36a314725e151"
            ],
            "privateEventIds": [
                "66cc0f7da64cf7ee93658fbf"
            ],
            "mobileFull": "",
            "ip": "139.216.205.51",
            "os": "Windows",
            "device": "Desktop"
        },
        "location": {
            "city_name": "Epping",
            "country_name": "Australia",
            "country_code": "AU",
            "state_name": "Victoria",
            "state_code": "VIC",
            "timezone": "Australia/Melbourne",
            "zip_code": "3076",
            "latitude": -37.6407,
            "longitude": 145.0282
        },
        "custom_fields": [],
        "appName": "ECAL",
        "category": "Desktop",
        "country": "AU",
        "device": "Desktop",
        "fingerprint": "6958a5a79c8535cbcd76dac79d16c5f2",
        "gender": "",
        "icsFilename": "ECAL Test",
        "ip": "139.216.205.51",
        "mobile": "",
        "os": "Windows",
        "source": "API V3",
        "zip": "3076",
        "logged": "2020-05-01T04:28:51.773Z",
        "created": "2020-05-01T04:28:51.775Z",
        "modified": "2024-08-28T15:03:31.109008+10:00",
        "optin": false,
        "optin_id": 0,
        "secondary_optin_id": 0,
        "secondary_optin": false,
        "optin3_id": 0,
        "optin3": false,
        "optin4_id": 0,
        "optin4": false,
        "requiredAge": 0,
        "dob": "",
        "parentConsentAge": 0,
        "parentConsentOn": "",
        "parentEmail": "",
        "selectedAppcalTypes": [
            "hotmail"
        ],
        "reference": "",
        "totalActivity": 10,
        "lastActive": "2030-07-22T01:38:49.746Z",
        "calendarUrl": {
            "webCalUrl": "webcal://ics.ecal.com/ecal-sub/652375ab635fd36a5e6695fb/ECAL%20Test.ics",
            "appleCalUrl": "webcal://ics.ecal.com/ecal-sub/652375ab635fd36a5e6695fb/ECAL%20Test.ics",
            "webCalUrlNoIcs": "webcal://ics.ecal.com/ecal-sub/652375ab635fd36a5e6695fb/ECAL%20Test",
            "httpCalUrl": "http://ics.ecal.com/ecal-sub/652375ab635fd36a5e6695fb/ECAL%20Test.ics",
            "httpsCalUrl": "https://ics.ecal.com/ecal-sub/652375ab635fd36a5e6695fb/ECAL%20Test.ics",
            "googleUrl": "https://www.google.com/calendar/render?cid=webcal:%2F%2Fics.ecal.com%2Fecal-sub%2F652375ab635fd36a5e6695fb%2FECAL%2520Test.ics",
            "outlookcomUrl": "https://calendar.live.com/calendar/calendar.aspx?rru=addsubscription&url=webcal:%2F%2Fics.ecal.com%2Fecal-sub%2F652375ab635fd36a5e6695fb%2FECAL%2520Test.ics"
        },
        "IsActive": true
    },
    "status": "200",
    "statusLong": "OK"
}

POST /apiv2/subscriber/{ecal_id}/unsubscribe

Unsubscribe the subscriber. ecal_id is the unique subscriber id.

Parameter Required Description
apiKey YES The apiKey provided by ECAL and is found under Options in Publisher Management Portal
apiSign YES MD5 string of all parameters signed by the SECRET

After unsubscribed, this user cannot be made active again and hence their ECAL ID will not be usable for any API calls. The user will need to go through the widget flow again to re-subscribe.
For ICS users, the calendar cannot be removed from their application, only the content will be removed. This is true for any unsubscription in an ICS calendar environment.

Example POST Data

Response
{
    "status": "200",
    "statusLong": "OK"
}