In this example we will review how to fetch the loan contract headerId parameter that is required for the further calls.
Searching for the contracts created for the person ID-3392.
...persons/ID-3392/contracts...
Requesting to display the search results on the first page; the page size is 10.
...?pageNumber=1&pageSize=10
To find person loan contracts, make the following call.
https://loan-api.sandbox.tuumplatform.com/api/v2/persons/{personId}/contracts
Below is the sample request of the API call for finding person contracts.
https://loan-api.sandbox.tuumplatform.com/api/v2/persons/ID-3392/contracts?pageNumber=1&pageSize=10
curl -L -g 'https://loan-api.{{env}}.{{domain}}/api/v2/persons/ID-3392/contracts?pageNumber=1&pageSize=10' \
-H 'x-channel-code: system' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMDZUMTU6MzE6MjEiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODg2NTc0ODF9.ZIKui9W5EmhGDUDWHVuprKcZNcWx7V_ZfqbbzLHEWx8' \
-d ''
Below you find an example response body to the API call above.
An existing contract with the number BL1000
was found. And the contract headerId ID-1664282474
was fetched.