Explore Borrowing Capacity API
In your browser, navigate to the
Borrowing CapacityAPI documentation:http://localhost:3000/hexyback-workshop/docs/hexy/get-an-estimate-of-your-borrowing-capacityModify the sample request parameters:

Copy the
curlrequest, replacinghttp://localhost:3000with the URL of your deployed API endpoint -apiEndpoint:✔ Deployed:
ConfigStack
# Use the URL shown below
apiEndpoint: https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/Paste the
curlrequest into your terminal and hitEnter:curl -L -X GET 'https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/borrowingCapacity?borrowerEmail=rami@rolo.polo&grossAnnualIncome=50000&employmentStatus=SELF_EMPLOYED' \
-H 'Accept: application/json'Navigate to the AWS Lambda console and select the
CalculateBorrowingCapacitylambda
Navigate to the
Monitortab:
Click on the first entry in the
Tracestab:
Observe the traces shown. You'll notice two calls:
- A call to (attempt) to get the borrower profile
- A call to put the borrowing capacity calculation
Exercise:
- Attempt to calculate the borrowing capacity for a borrower that does not exist. What happens? Observe the traces to confirm your assumptions.