Events

An event tracks what happened with a lead at a particular step in a flow. An event is a self-contained snapshot of the state of the lead at the time the lead visited the step. It contains a full copy of all lead data, along with all data that was appended before that step. Every event contains the below properties.

List all events

The /events resource is used to query events generated while handling leads. For each lead, one event is generated for each configured flow step that handles the lead. After lead processing completes, a source event is also recorded.

Request
query Parameters
after_id
string (ID) ^[0-9a-fA-F]{24}$

Return only events that were created after the one with this ID (exclusive)

before_id
string (ID) ^[0-9a-fA-F]{24}$

Return only events that were created before the one with this ID (exclusive)

start
string <date-time> (Timestamp)

Return only events that were created at or after this time

end
string <date-time> (Timestamp)

Return only events that were created at or before this time

Array of BinaryRule (object) or UnaryRule (object) or (RuleSet (object or null)) (Rule)

Rules to select matching events

include
string

A field to include. Can be used multiple times to include multiple fields. Cannot be used with exclude.

exclude
string

A field to exclude. Can be used multiple times to exclude multiple fields. Cannot be used with include.

limit
integer [ 1 .. 1000 ]

The maximum number of events to return (maximum limit is 1000, default 100)

sort
string

The results are sorted by date. Use asc to sort by oldest first or desc to sort by newest first. Defaults to desc.

Responses
200

OK

401

Authorization information is missing or invalid.

get/events
Request samples
curl -i -X GET \
  'https://app.leadconduit.com/events?after_id=string&before_id=string&start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z&rules=%5Bobject%20Object%5D&include=string&exclude=string&limit=1&sort=string'
Response samples
application/json
[
  • {
    • "id": "string",
    • "type": "source",
    • "outcome": "failure",
    • "reason": "NREL failure",
    • "vars": {
      • "vars": { }
      },
    • "module_id": "string",
    • "acceptance_criteria": {
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "outcome": "string",
      • "reason": "string"
      },
    • "flow_acceptance_criteria": {
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        },
      • "outcome": "string",
      • "reason": "string"
      },
    • "pricing": {
      • "override": true,
      • "prices": [
        • {
          • "id": { },
          • "amount": 0,
          • "rule_set": {
            • "id": "string",
            • "op": "and",
            • "rules": [
              • {
                • "id": null,
                • "lhv": null,
                • "op": null,
                • "rhv": null,
                • "rule_set": null
                }
              ]
            }
          }
        ]
      },
    • "flow_pricing": {
      • "override": true,
      • "prices": [
        • {
          • "id": { },
          • "amount": 0,
          • "rule_set": {
            • "id": "string",
            • "op": "and",
            • "rules": [
              • {
                • "id": null,
                • "lhv": null,
                • "op": null,
                • "rhv": null,
                • "rule_set": null
                }
              ]
            }
          }
        ]
      },
    • "cost": 0,
    • "purchase_price": 0,
    • "recipient_revenue": 0,
    • "step_count": 0,
    • "disabled_step_count": 0,
    • "package_version": "string",
    • "handler_version": "string",
    • "request": { },
    • "response": { },
    • "flow_caps": [
      • {
        • "id": "string",
        • "cap_ids": [
          • "string"
          ],
        • "caps": [
          • { }
          ],
        • "count": 0,
        • "duration": 1,
        • "duration_units": "month",
        • "expires_at": "2020-11-23T11:41:52Z",
        • "failed_count": 0,
        • "flow_id": "string",
        • "maximum": 1200,
        • "name": "Monthly leads from TX",
        • "source_id": "string",
        • "started_at": "2020-11-23T11:41:52Z",
        • "step_id": "string",
        • "time_zone": "America/New_York",
        • "type": "volume",
        • "updated_at": "2020-11-23T11:41:52Z"
        }
      ],
    • "source_caps": [
      • {
        • "id": "string",
        • "cap_ids": [
          • "string"
          ],
        • "caps": [
          • { }
          ],
        • "count": 0,
        • "duration": 1,
        • "duration_units": "month",
        • "expires_at": "2020-11-23T11:41:52Z",
        • "failed_count": 0,
        • "flow_id": "string",
        • "maximum": 1200,
        • "name": "Monthly leads from TX",
        • "source_id": "string",
        • "started_at": "2020-11-23T11:41:52Z",
        • "step_id": "string",
        • "time_zone": "America/New_York",
        • "type": "volume",
        • "updated_at": "2020-11-23T11:41:52Z"
        }
      ],
    • "start_timestamp": 0,
    • "end_timestamp": 0,
    • "firehose": {
      • "credential_id": "string",
      • "bucket": "string",
      • "enabled": true,
      • "prefix": "string"
      },
    • "ms": 0,
    • "wait_ms": 0,
    • "overhead_ms": 0,
    • "lag_ms": 0,
    • "host": "string",
    • "cap_reached": true,
    • "flow_ping_limits": {
      • "id": "string",
      • "name": "string",
      • "maximum": 0,
      • "duration": 0,
      • "duration_units": "string",
      • "time_zone": "string",
      • "created_at": "2019-08-24T14:15:22Z"
      },
    • "source_ping_limits": {
      • "id": "string",
      • "name": "string",
      • "maximum": 0,
      • "duration": 0,
      • "duration_units": "string",
      • "time_zone": "string",
      • "created_at": "2019-08-24T14:15:22Z"
      },
    • "ping_limit_reached": true,
    • "expires_at": "2019-08-24T14:15:22Z"
    }
]

Fetch a single event

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the event to get

Responses
200

OK

401

Authorization information is missing or invalid.

get/events/{id}
Request samples
curl -i -X GET \
  https://app.leadconduit.com/events/:id
Response samples
application/json
{
  • "id": "string",
  • "type": "source",
  • "outcome": "failure",
  • "reason": "NREL failure",
  • "vars": {
    • "vars": { }
    },
  • "module_id": "string",
  • "acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "flow_acceptance_criteria": {
    • "rule_set": {
      • "id": "string",
      • "op": "and",
      • "rules": [
        • {
          • "id": "string",
          • "lhv": "lead.state",
          • "op": "is equal to",
          • "rhv": "TX",
          • "rule_set": { }
          }
        ]
      },
    • "outcome": "string",
    • "reason": "string"
    },
  • "pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "flow_pricing": {
    • "override": true,
    • "prices": [
      • {
        • "id": { },
        • "amount": 0,
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ]
    },
  • "cost": 0,
  • "purchase_price": 0,
  • "recipient_revenue": 0,
  • "step_count": 0,
  • "disabled_step_count": 0,
  • "package_version": "string",
  • "handler_version": "string",
  • "request": { },
  • "response": { },
  • "flow_caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "source_caps": [
    • {
      • "id": "string",
      • "cap_ids": [
        • "string"
        ],
      • "caps": [
        • { }
        ],
      • "count": 0,
      • "duration": 1,
      • "duration_units": "month",
      • "expires_at": "2020-11-23T11:41:52Z",
      • "failed_count": 0,
      • "flow_id": "string",
      • "maximum": 1200,
      • "name": "Monthly leads from TX",
      • "source_id": "string",
      • "started_at": "2020-11-23T11:41:52Z",
      • "step_id": "string",
      • "time_zone": "America/New_York",
      • "type": "volume",
      • "updated_at": "2020-11-23T11:41:52Z"
      }
    ],
  • "start_timestamp": 0,
  • "end_timestamp": 0,
  • "firehose": {
    • "credential_id": "string",
    • "bucket": "string",
    • "enabled": true,
    • "prefix": "string"
    },
  • "ms": 0,
  • "wait_ms": 0,
  • "overhead_ms": 0,
  • "lag_ms": 0,
  • "host": "string",
  • "cap_reached": true,
  • "flow_ping_limits": {
    • "id": "string",
    • "name": "string",
    • "maximum": 0,
    • "duration": 0,
    • "duration_units": "string",
    • "time_zone": "string",
    • "created_at": "2019-08-24T14:15:22Z"
    },
  • "source_ping_limits": {
    • "id": "string",
    • "name": "string",
    • "maximum": 0,
    • "duration": 0,
    • "duration_units": "string",
    • "time_zone": "string",
    • "created_at": "2019-08-24T14:15:22Z"
    },
  • "ping_limit_reached": true,
  • "expires_at": "2019-08-24T14:15:22Z"
}