Data Models API
This API allows managing data models in the system. It provides endpoints to create, read, update, and delete data models, as well as to perform queries with filtering and pagination options.
The DataModel Object
The DataModel object represents a data model in the system.
Attributes
| Attribute | Description | Type | Required |
|---|---|---|---|
| id | Unique identifier of the data model | String | Yes |
| path | Path of the data model | String | Yes |
| key | Unique key of the data model | String | Yes |
| label | Descriptive label of the model | String | Yes |
| entityType | Entity type of the model | String | Yes |
| priority | Priority of the model | Integer | No |
| order | Order of the model | Integer | No |
| allowedValues | Allowed values for the field | Array | No |
| createdAt | Creation date and time | String | Yes |
| updatedAt | Last update date and time | String | No |
| isSensitive | Marks an identity DataModel as sensitive (PII) | Boolean | No |
| metadata | Additional metadata of the model | Object | No |
Valid Entity Types
The entityType field must be one of the following values:
| Entity Type | Description |
|---|---|
identity | Identity records (national ID, passport, etc.) |
contact | Contact information fields |
document | Document type definitions |
borrower | Borrower entity configuration |
borrower_field | Custom fields for borrowers |
point_of_contact | Point of contact fields |
authorization | Authorization type definitions |
step | Workflow step definitions |
metric | Metric definitions |
deal_field | Custom fields for deals |
deal_step | Deal workflow step definitions |
deal_role | Deal role definitions |
decision | Decision type definitions |
accounting_document | Accounting document type definitions |
asset_field | Custom fields for assets |
asset_group | Asset group definitions for categorizing assets |
Available Operations
Create a New Data Model
Creates a new data model in the system.
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| path | Path of the data model | String | Yes |
| key | Unique key of the model | String | Yes |
| label | Descriptive label of the model | String | Yes |
| entityType | Entity type of the model | String | Yes |
| priority | Priority of the model | Integer | No* |
| order | Order of the model | Integer | No |
| allowedValues | Allowed values for the model | Array | No |
| metadata | Additional metadata of the model | Object | No |
| isSensitive | Marks an identity DataModel as sensitive (PII) | Boolean | No |
*For entityType: "identity", priority is required and must be greater than or equal to -1.
Request Example:
Successful Response:
Update a Data Model
Updates an existing data model.
Path Parameters:
| Parameter | Description |
|---|---|
| :data_model_id | ID of the data model to update |
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| path | New path of the data model | String | No |
| key | New key of the model | String | No |
| label | New label of the model | String | No |
| order | New order of the model | Integer | No |
| priority | New priority of the model | Integer | No |
| allowedValues | Allowed values for the model | Array | No |
| metadata | New metadata of the model | Object | No |
Note: isSensitive cannot be updated via PATCH. Use the dedicated make-sensitive endpoint below.
Request Example:
Successful Response:
The response will be the updated DataModel object.
Make an Identity Data Model Sensitive
Marks an existing identity DataModel as sensitive and encrypts existing identities for that key.
Path Parameters:
| Parameter | Description |
|---|---|
| :data_model_id | ID of the data model to update |
Successful Response:
The response will be the updated DataModel object (with isSensitive: true).
Get a Data Model
Retrieves the information of a specific data model.
Path Parameters:
| Parameter | Description |
|---|---|
| :data_model_id | ID of the data model to retrieve |
Successful Response:
The response will be a complete DataModel object.
Delete a Data Model
Deletes a data model from the system.
Path Parameters:
| Parameter | Description |
|---|---|
| :data_model_id | ID of the data model to delete |
Successful Response:
Status code 204 (No Content) if the deletion was successful.
List Data Models
Retrieves a paginated list of data models with filtering and sorting options.
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
| search | Text to search in data models | String |
| page | Page number (default: 1) | Integer |
| per-page | Items per page (default: 10) | Integer |
| entity-type | Filter by entity type | String |
| sort-by | Field to sort by | String |
| sort-direction | Sorting direction (asc or desc) | String |
Successful Response:
The response will be a paginated list of DataModel objects.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.