projects.apps.events
Overview
The Events API allows you to create lending events tied to existing app user accounts such as borrowers.
Fields
Field | Data Type | Description |
accountId | string | Required Unique id that identifies an account type and account id in the form For example a borrower with a Read-only after creation |
eventId | string | Required Used in responses only. UUID that identifies an event. It is generated from the accountId, eventType and timestamp. Used in responses only. Read-only after creation |
eventType | string ( ‘personal_data.captured’ ) | Required The type of event. Read-only |
timestamp | string ( Timestamp format ) | Required The event timestamp as captured on your lending app in ISO format. Example: Read-only after creation |
status | number | Event status. The values are described below. Used in responses only. The status descriptions are outlined below. 0: not processed 1: processed successfully 2: processed with errors Read-only |
data [ ] | object ( EntityValueSet ) | Array of data sets. Read-only after creation |
appVersionId | string | The lending app Example: Read-only |
category | string | null | The event's data category. Use this when sending homogeneous entity data that you would want to track later. For instance, if you wanted to search for the last time SMS data was captured for a borrower. Categories map to entity data types. Valid categories are as follows.
Added 04-September-2020. Read-only after creation |
List
GET
https://lending.wezaapis.com/v1/projects/{projectId}/apps/{appId}/events
List all lending events for a lending app.
Path Parameters
Name | Type | Description |
---|---|---|
projectId | string | Id of the weza.io project. |
appId | string | Id of the lending app. |
Query Parameters
Name | Type | Description |
---|---|---|
pageSize | string | Maximum events to return defaults to 1000. |
pageToken | string | The nextPageToken value from the previous list call. Remember to encode it. |
filter | string | An expression to filter the results of the request.
The eligible filter fields are.
- |
order | string | Describes how to order the results.
The value can be |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token |
Request Body
The request body should be empty.
Response Body
If successful, the response will contain data with the following structure.
Fields
Field | Data Type | Description |
events[] | object(LendingEvent) | A list of lending event instances. |
nextPageToken | string | Token to use to fetch the next page of data if any. |
Authorization
Requires any one of the following OAuth scopes:
platform
platform.lending
platform.lending:read
The authenticated user must have the lending.events.list
permission.
Create
POST
https://lending.wezaapis.com/v1/projects/{projectId}/apps/{appId}/events
Create an event if one doesn't exist. An event is uniquely identified by using its accountId
, eventType
and timestamp
.
This method will throw a 409 HTTP error if you try to create an already existing event resource based on the above criteria.
See the Errors section for more details.
Path Parameters
Name | Type | Description |
---|---|---|
projectId | string | Id of the weza.io project |
appId | string | Id of the lending app |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token |
Request Body
The request body contains an instance of LendingEvent.
Response Body
The response body contains a new instance of LendingEvent.
Authorization
Requires one of the following OAuth scopes:
platform.lending
platform.lending:write
The authenticated user must have the lending.events.create
permission.
Last updated