Events are designed as a way to track changes to individual resources throughout the OmniFund application. Resources can be thought of as the different type of objects/records that are created/updated/deleted within the app. Some examples of a resource would be: Transaction, Customer, PaymentAccount, or Invoice. Each one of this may have one or more events happen to it during its lifetime.
End-Point | Methods | Description |
---|---|---|
/api/events | GET | Return a collection of events. |
/api/events/{id} | GET | Return a single event by its ID. |
Info | ||
---|---|---|
| ||
All API end-points require an authentication header to included with the request. See Authentication |
The Event Object
Field | Type | Description |
---|---|---|
id | string | Unique identifier for the event. |
owner | string | Account owner of the resource |
resource | string | Identifier for the application resource that the event applies to |
location | string | Location where the event was initiated |
type | string | Type of event |
eventData | object | Object containing the information associated with the resource. |
createdAt | int | Time at which the object was created. Measured in seconds since the Unix epoch. UTC |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "id": "025a161c5863e5645e8e997a4", "owner": "merch_123456", "resource": "cust_5c991e6774567", "source": "test-user", "location": "dashboard", "type": "customer.updated", "createdAt": 1553538663, "eventData": { "object": { "id": "5c991e6774567", "object": "customer", "customerRef": "123-7784", "displayName": "Test Customer", "company": "", "firstName": "Test", "lastName": "Customer", "displayAs": "contact", "address1": "123 main st.", "address2": "", "city": "Somewhere", "state": "CO", "zip": "12345", "country": "US", "phone": "1-555-123-34567", "phoneExt": "", "email": "test-customer@omnifund.com", "dateAdded": "2019-03-25", "notes": "", "active": "1" }, "previousAttributes": { "phone": "" } } } |
List All Events
Argument | Type | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | string | Name of the event type to filter by. Optionally, multiple events can be filtered by using type[] |
| |||||||||||||||||||||
createdAt | string | Unix timestamp to filter based on the createdAt Event field. The value can be a string with an integer timestamp, or it can be a represented with the following options:
|
| page | int | For paginated results, the page number of the result set to retrieve. |
Code Block | ||||
---|---|---|---|---|
| ||||
# Return page 2 of a collection
GET /api/events?page=2 |
language | xml |
---|---|
theme | RDark |
Related
Retrieve an Event
Retrieves the details of a single event based on the supplied unique identifier.
Argument | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
id | string | Required. The event identifier to be retrieved. |
|
Event Types
Event | Description | Event Objects |
---|---|---|
account.autoupdate | Details an event involving the auto-update of a payment account based on information received from the processing bank. |