Create a Baseline Data Dictionary using Schema APIs

Guide Table of Contents


Perform the following steps to create a baseline data dictionary using Schema APIs:

Step 1 - Retrieve Loan Schema using the V3 Get Loan Schema API

Using the V3 Get Loan Schema API, you can retrieve a JSON schema for loans. The payload response can be filtered by specified entities and whether the schema includes field extensions by passing the respective query parameters. The Loan Schema for your environment will include all standard and custom fields. The Loan Schema is your baseline dictionary for all fields in the loan file.

curl --location 'https://{{API_SERVER}}}}/encompass/v3/schemas/loan' \ 
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' 

The following attributes are included in the response payload:

Attribute
JSON Contract definition / ObjectExample: AdditionalLoanContract
JSON Field NameExample: borrowerType
Data TypeExample: String
Enum valuesExample: Borrower, CoBorrower, Both

🚧

Calling the Loan Schema API should be treated as a one-time event for setting up and maintaining your Encompass data dictionary. A call to the Loan Schema API should not be included as part of your integration code to retrieve loan data.

Step 2 - Enrich your Data Dictionary with Additional Field Metadata

Standard Fields - V3 Get Field Schema API

To enrich your data dictionary with additional field metadata from Encompass such as the fieldId, JSON Path, Description and other attributes, you can use the V3 Get Field Schema API to retrieve those details. You can use the JSON Path as your unique identifier when parsing out the field value from the V3 Get Loan API response. Here is an example of the jsonPath format:

$.applications[0].borrower.firstName 

📘

The max payload size for the response payload is 6MB. You must use the start and limit parameters to retrieve the data for all standard and/or custom fields that you need to add to your data dictionary.

curl --location 'https://{{API_SERVER}}/encompass/v3/schemas/loan/standardFields?start=0&limit=10000' \ 

--header 'Authorization: Bearer{{ACCESS_TOKEN}}' 

The following attributes are included in the response payload:

AttributeDescription
IdThe Encompass field ID that is mapped to the field name.
DescriptionDescription of the Encompass field.
FormatData format of the field. Possible values are:

STRING, YN, X, ZIPCODE, STATE, PHONE, SSN, INTEGER, DECIMAL_1, DECIMAL_2, DECIMAL_3, DECIMAL_4, DECIMAL_5, DECIMAL_6, DECIMAL_7, DECIMAL_10, DECIMAL, RA_STRING, RA_INTEGER, RA_DECIMAL_2, RA_DECIMAL_3, MONTHDAY, DATE, DATETIME, DROPDOWNLIST, DROPDOWN, AUDIT, COMMENT, and UNDEFINED.
readOnlyIndicates whether the field is editable.
NullableIndicates whether the field is nullable.
CategoryThe field category. Possible values are:
- Borrower - if the field is under Borrower entity
- Coborrower - if the field is under Coborrower entity
- * Common - if the field is outside of borrower and coborrower entities
dataTypeExample: Decimal
maxLengthThe maximum length allowed for the field.
multiInstanceIndicates whether the field is repeatable within the entity.
contractPathContract path of the field ID. For example loan.baseLoanAmount
jsonPathJSON path of the field in the loan object. For example $.baseLoanAmount.

Custom Fields - V3 Get Custom Fields API

To enrich your data dictionary with additional metadata for your custom fields, you can use the V3 Get Custom Fields API. The response payload for this API is limited and does not include all the attributes of the standard fields. However, the payload does include the jsonPath that you can use as your unique identifier when parsing out the custom field value from the V3 Get Loan API response.

📘

The max payload size for the response payload is 6MB. You must use the start and limit parameters to retrieve the data for all standard and/or custom fields that you need to add to your data dictionary.

curl --location 'https://{{API_SERVER}}/encompass/v3/settings/loan/customFields' \ 

--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \ 

The following attributes are included in the response payload:

AttributeDescription
IdLoan custom field id.
DescriptionDescription for loan custom field.
FormatIndicates the range and format of values the custom field can store. For example, a custom field defined as a ZIPCODE field can store up to 10 characters in the format XXXXX-XXXX.

NONE is the default.

Possible values are:
AUDIT, CHECK BOX, DATE, DECIMAL, DECIMAL_1, DECIMAL2, DECIMAL3, DECIMAL4, DECIMAL6, DECIMAL7, DECIMAL10, DROPDOWN, DROPDOWN - Editable, INTEGER, MONTHDAY, PHONE, SSN, STATE, STRING, Y/N, * ZIPCODE

Note: These values are case-sensitive.
maxLengthIndicates the maximum length of the value for the custom field. Example: If the format is STRING, provide the maximum number of characters allowed.
contractPathContract path for loan custom field.
jsonPathJSON path for loan custom field.
isCalculatedFieldA value of true indicates the field has an associated calculation.