Return a list of all events

Learn how to return a list of all events.

Setting Event parameters

When you get a list of events, you'll need to provide the required parameters listed in the following table. The remaining parameters are optional:

Parameter

Required/Optional

Description

createdTime

Optional

A filter on the list based on the createdTime field. The value can be a string with an ISO-601 UTC format datetime or it can be a dictionary with the following options:

  • gt–return values where the createdTime field is after this timestamp

  • gte–return values where the createdTime field is after or equal to this timestamp

  • lt–return values where the createdTime field is before this timestamp

  • lte–return values where the createdTime field is before or equal to this timestamp

endingBefore

Optional

A cursor for use in pagination. The endingBefore parameter is an object identifier that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz to fetch the previous page of the list.

startingAfter

Optional

A cursor for use in pagination. The startingAfter parameter is an object identifier that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz to fetch the next page of the list.

limit

Optional

A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.

type

Optional

A string containing a specific event name, or a group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.

types

Optional

An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either type or types, but not both.

Example get request and response

Return a list of events with a GET request:

cURL
cURL
curl https://api.digitalriver.com/events

‌A 200 OK response returns the Event object:

JSON
JSON
{
"hasMore": true,
"data": [
{
"id": "evt_d290f1ee-6c54-4b01-90e6-d701748f0851",
"createdTime": "2020-05-12T13:23:06Z",
"apiVersion": "2020-05-12",
"data": {
"object": {},
"previousAttributes": {}
},
"liveMode": true,
"request": {
"id": "_43ef187f-634e-4b9f-8dc4-082c352525ee"
},
"type": "charge.succeeded"
}
]
}