Events

Query events

Auth policies: ContactDataManagement,ReadContacts

Request

Uses the Search API (https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search.html)

Request playload must be in Elasticsearch Query DSL (https://www.elastic.co/guide/en/elasticsearch/reference/5.5/query-dsl.html)

At minimum it must include a query.bool.must array clause:

 {
     "query": {
         "bool": {
             "must": [{
                 "match": { 
                     "type": "11"
                 }
             }]
         }
     }
 }

EventTypes

EventTypetypeEventTypetypeEventTypetypeEventTypetype
EmailSent5SMSSent13PageClick25FlowBlockExecuted18
EmailSoftBounced6SMSFailed14SMSIncoming12FlowBlockExecutedTrue19
EmailHardBounced7SMSUnsubscribed15ReportSent32FlowBlockExecutedFalse20
EmailComplained8SMSLinkClicked16ContactImportStarted1FlowBlockExecutedDone21
EmailUnsubscribed9SMSPreviouslyUnsubscribed34ContactImportInProgress2FlowBlockExecutedError22
EmailOpened10PrintSent31ContactImportFinalized3SplitBlockExecuted26
EmailLinkClicked11PageFormSubmit23ContactImportCanceled4FlowJobCreated27
EmailFailed28PageVisit24SMSIncoming12SplitTestBlockExecuted29
EmailPreviouslyUnsubscribed33PrintQRCodeScanned17PrintFailed35FlowActivated30
EmailSuppressed36SMSSuppressed37CouponRedeemed38FlowTestActivated39
FlowFrozen40FlowUnfrozen41FlowStopped42WebhookSucceeded43
PopupFormSubmit44

Response example

 {
     "took": 26,
     "timed_out": false,
     "_shards": {
         "total": 1,
         "successful": 1,
         "failed": 0
      },
      "hits": {
           "total": 1,
            "max_score": 3.57346,
            "hits": [
            {
                "_index": "events",
                "_type": "eventelastic",
                "_id": "AWC3DTu8Ebxu-FvCbf8Y",
                "_score": 3.57346,
                "_source": {
                    "accountId": 2,
                    "userId": 0,
                    "source": "mailgun-click",
                    "stamp": "2018-01-02T13:26:25.9740794Z",
                    "type": 11,
                    "data": {
                        "campaignId": "5a4b8848a122e5000516dbb0",
                        "externalMessageId": "20180102132544.1.E4E7834568022EA5BD@loopify.com",
                        "contactId": "59e49f7c5234534673746789584466d",
                        "email": "some@email.com",
                        "recipientData": {
                            "country": "MK",
                            "region": "38",
                            "city": "Skopje",
                            "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36",
                            "deviceType": "desktop",
                            "clientType": "browser",
                            "clientName": "Chrome",
                            "clientOS": "Windows"
                        }
                     }
                }
            }]
      }
 }
post/events/query

Request

  • Base URL: https://api.loopify.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.loopify.com/events/query
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://auth.loopify.com/connect/authorize, token URL https://auth.loopify.com/token, scopes: ContactDataManagement, ReadContacts)

Query parameters

collectionNamestring

Used to search in custom collections

Request body

unknown required

Response

Success

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.