question

Fredrick Esedo avatar image
Fredrick Esedo asked ·

Where can I find API Documentation for working with Curl Request

Good day everyone.
We have registered for the app contest. We have obtained Finastra API Client Id and Secret.

1.) Now we want to create loan by making API Call but the API does not have

Curl Request Payload

https://developer.fusionfabric.cloud/api/retail-banking-loans-v1-601a9386-13e7-4777-98d3-0d41c56538f4/docs#tag/Loan-Creation

2.) To create a Loan, it seems theAPI also requires Oauth2 flow authentication. where can I get Curl Request sample for this as well. Thanks


API - Lending
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

jkabuya avatar image
jkabuya answered ·

1. Request token using curl: In this step, replace the right client_id and the client_secret

curl -X POST https://api.fusionfabric.cloud/login/v1/sandbox/oidc/token
 -H "Content-Type: application/x-www-form-urlencoded" 
 -d "grant_type=client_credentials&client_id=60498660...&client_secret=f49..."

2. Response Body of the curl request: You will receive a json response with your token:

{

 "access_token": "tokenvalue",
 "expires_in": 300,
 "refresh_token": " tokenvalue ",
 "refresh_expires_in": 1800,
 "scope": "loan...",
 "token_type": "bearer",
 "id_token": null
}


3. Use the token adding it in the request headers: Due to the token length, I replaced the token by "tokenvalue"


curl -X GET https://api.fusionfabric.cloud/retail-banking/loans/v1/loans/{customerId}/accounts

 -H "Content-Type: application/json" 
 -H "Authorization:  Bearer tokenvalue"


10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.