NAV
Curl

Bank API Reference

Introduction

This Api documentation works as a reference to help bank’s developers to create the necessary api for Pilon to submit funding request.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request  
-H "apiKey: f8b78ec2-d6e9-4b7f-8c4c-1770f4e733fd"
-H 'Content-Type: application/json'

Bank is required to generate API keys to allow Pilon to access the Bank’s API.

apiKey: GENERATED-API-KEY

Fund Request

Create Fund Request

Pilon will send funding request on the selected date of supplier.

curl --location --request POST 'https://API-URL/fundingRequest' --header 'apiKey: f8b78ec2-d6e9-4b7f-8c4c-1770f4e733fd'  --header 'Content-Type: application/json'

Sample Request:


{
"requestId": "abCD1234",
"buyer": "202007772R",
"supplier": "201511444H",
"invoices": [
{
"referenceId": "abCD1234",
"invoiceId": "abCD1234",
"invoiceAmount": 2000.00,
"deductAmount": {
"discountCharge": 20.00,
"platformFee": 1.00
},
"invoiceDate": "2022-12-01T00:00:00+08:00",
"invoiceDueDate": "2023-01-31T00:00:00+08:00",
"buyerDueDate": "2023-01-31T00:00:00+08:00"
}
]
}

POST /fundingRequest

Request Body

Parameter Type Required Description In
apiKey string true Unique ID of the buyer Header
Body [FundingRequest] true Unique ID of the buyer Body



FundingRequest

Parameter Type Required Description
requestId string true Caller’s unique identifer for this request
buyer string true Unique ID of the buyer
supplier string true Unique ID of the supplier company
invoices [RequestInvoiceDetails] true Details of the funding request / invoices



RequestInvoiceDetails

Parameter Type Required Description
referenceId string true Unique identifier from caller.
This will be used to check for duplicate within each supplier. Request will fail if this ID is duplicated.
invoiceId string true Actual invoice ID or number issued by the supplier
invoiceAmount string true 2 decimal places only
deductAmount string true 2 decimal places only
invoiceDate string false Format: invoiceDueDate + any approved credit extension for the buyer.
ISO_8601_FORMAT_DATE_TIME = “YYYY-MM-DD’T’hh:mm:ss±hh:mm”
invoiceDueDate string true Format: invoiceDueDate + any approved credit extension for the buyer.
ISO_8601_FORMAT_DATE_TIME = “YYYY-MM-DD’T’hh:mm:ss±hh:mm”
buyerDueDate string true Format: invoiceDueDate + any approved credit extension for the buyer.
ISO_8601_FORMAT_DATE_TIME = “YYYY-MM-DD’T’hh:mm:ss±hh:mm”



Response Body

Status Code Meaning Schema Description
202 OK None Request has been accepted for processing
400 Bad Request None Validation of the request payload failed, e.g. missing required data
401 Unauthorized None Authentication failed or bad credentials

Enquire Fund Status

Pilon will enquire funding about the status of funding request on disbursement or repayment.

curl --location --request GET 'https://API-URL/queryStatus' --header 'apiKey: f8b78ec2-d6e9-4b7f-8c4c-1770f4e733fd' --header 'Content-Type: application/json'

Sample Request:


[
{
"supplier": "201511444H",
"referenceId": "abCD1234"
}
]

Response:

[
{
"referenceId": "abCD1234",
"supplier": "201511444H",
"accountId": "SCWXYZ1234",
"status": "Processing"
}
]

POST /queryStatus

Request Body

Parameter Type Required Description In
apiKey string true Unique ID of the buyer Header
Body [EnquireInvoiceDetails] true Unique ID of the buyer Body



EnquireInvoiceDetails

Parameter Type Required Description
supplier string true Caller’s unique identifer for this request
referenceId string true Unique ID of the buyer



Response Body

Status Code Meaning Schema Description
202 OK [InvoiceDetailsWithStatus] Request has been accepted for processing
400 Bad Request None Validation of the request payload failed, e.g. missing required data
401 Unauthorized None Authentication failed or bad credentials



InvoiceDetailsWithStatus

Parameter Type Required Description
supplier string true Caller’s unique identifer for this request
referenceId string true Unique ID of the buyer
accountId string true Bank’ unique identifier, e.g. SCWXZY1234
status string true Processing - Request has been accepted but not completed processing (still in queue)
Pending Disbursement - Processed and waiting for fund disbursement / transfer to supplier
Unsuccessful - Completed processing but failed.
Funded - Completed processed and invoice funded.
Paid - Invoice fully paid.