openapi: 3.0.3
info:
title: Trade Finance API Specification - Seller Loans
description: |
Guidance on Message Encryption and Message Content
The API specification generally provides two definitions for request and responses messages - Unencrypted
and Encrypted
using a oneOf
structure.
Guidance on Authentication/ Authorisation
- All our APIs confirm the identity of all requesters, this is Authentication.
- All our APIs are called and activated only by trusted systems, this is Authorisation.
- Both of the above are handled during the initial exchange between the Client Application and HSBC's API Gateway.
- Find out more from API Security at HSBC
Authentication
Your Digital Identity
, which is a private-key-signed bearer token
generated per request, must be sent via Authorization
in the request header
.
View details
Authorisation
It is required to specify customer's identity in all request in the request body
.
View details
Customer Identity:
extnlCustomerId
must be sent in all requests, which represent the identity of a customer on partner's platform, agreed during on-boarding with HSBC.
To perform testing in Sandbox Environment, you may specify any customer id.
Customer's transaction account:
Corresponding customer's HSBC transaction account, i.e. accountNumber
must be sent in all requests.
To perform testing in Sandbox Environment, you may specify any number which matches the specified string pattern.
Guidance on Request Structure
- Parameter(s) which are non-mandatory are specified with
minLength: 0
, e.g. "paramKey001": ""
.
- Array List(s) which are non-mandatory are specified with
minItems: 0
, e.g. "arrayKey001": []
.
termsOfService: https://www.hsbc.co.uk
contact:
name: develop.hsbc
url: https://develop.hsbc.com/contact-us
license:
name: develop.hsbc
url: https://develop.hsbc.com/terms-and-conditions#Access
version: '1.0.0'
servers:
- url: https://sandbox.corporate-api.hsbc.com/mock/twc/v1
- url: https://sandbox.corporate-api.hsbc.com/twc/v1
externalDocs:
description: Trade Finance - Seller Loans API Doucmentation
url: https://develop.hsbc.com/node/668
tags:
- name: Seller Loans
description: Request Trade loan for sellers
- name: Document Management
description: Submit supporting documents
- name: Common Services
description: General Purpose APIs
paths:
/seller-loans/standard:
post:
tags:
- Seller Loans
summary: Submit Seller Loan Application
description: >-
Enables a seller to directly submit a standard loan request to HSBC.
View Pre-requisites:
-
API Connection Profile has been created.
What is an API Connection Profile?
-
For testing in the Sandbox Environment, create your test project and API Connection Profile via
Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
-
(Optional) Supporting documents have been submitted successfully via
Submit Supporting Documents API
. View Endpoint
View Post-conditions:
loanNumber
and applicationId
are generated for the loan application Submitted
to HSBC.
-
It is possible to perform the following for this loan:
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
operationId: create-standard-seller-loan-applications
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/CreateStandardSellerLoanRequest'
responses:
'200':
$ref: '#/components/responses/CreateLoanApplicationResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
# /seller-loans/advanced:
# post:
# tags:
# - Seller Loans
# summary: Submit seller loan application (Advanced)
# description: >-
# Enables a seller to directly submit a standard loan request to HSBC.
#
# View Pre-requisites:
#
# - API Connection Profile has been created. What is an API Connection Profile?
#
# - For testing in the Sandbox Environment, create your test project and API Connection Profile via Dev Hub.
# How to generate test API Connection Profile?
#
#
#
# - Loan applicant possesses valid transaction account in HSBC.
# - (Optional) Supporting documents have been submitted successfully via
Submit Supporting Documents API
. View Endpoint
#
#
#
# View Post-conditions:
#
# loanNumber
and applicationId
are generated for the loan application Submitted
to HSBC.
# - It is possible to perform the following for this loan:
#
# - Extends it's duration via
Submit Seller Loan Extension Request API
. View Endpoint
# - Performs settlement via
Submit Seller Loan Settlement Request API
. View Endpoint
# - Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
# - Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
#
#
#
#
# operationId: create-advanced-seller-loan-applications
# security:
# - BearerTokenJWS: []
# parameters:
# - $ref: '#/components/parameters/Authorization'
# - $ref: '#/components/parameters/requestTime'
# - $ref: '#/components/parameters/requestId'
# - $ref: '#/components/parameters/countryCode'
# - $ref: '#/components/parameters/Content-Type'
# - $ref: '#/components/parameters/schemaVersion'
# requestBody:
# $ref: '#/components/requestBodies/CreateAdvancedSellerLoanRequest'
# responses:
# '200':
# $ref: '#/components/responses/CreateLoanApplicationResponse'
# '400':
# $ref: '#/components/responses/RESPONSE_400_TAAS'
# '401':
# $ref: '#/components/responses/RESPONSE_401_TAAS'
# '403':
# $ref: '#/components/responses/RESPONSE_403_TAAS'
# '404':
# $ref: '#/components/responses/RESPONSE_404_TAAS'
# '500':
# $ref: '#/components/responses/RESPONSE_500_TAAS'
# '502':
# $ref: '#/components/responses/RESPONSE_500_TAAS'
# '503':
# $ref: '#/components/responses/RESPONSE_503_TAAS'
/seller-loans/standard/extension:
post:
tags:
- Seller Loans
summary: Submit Seller Loan Extension Request
description: >-
Enables a seller to directly submit a loan extension request.
View Pre-requisites:
-
API Connection Profile has been created.
What is an API Connection Profile?
-
For testing in the Sandbox Environment, create your test project and API Connection Profile via
Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
- Corresponding loan's status is
Disbursed
.
View Post-conditions:
- Corresponding loan
status
changed to Extension Submitted
.
Status
will be updated to Disbursed
upon the extension is approved, along with the updated loanMaturityDate
.
-
It is possible to perform the following for this loan:
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
operationId: extend-standard-seller-loans
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/ExtendTradeLoanRequest'
responses:
'200':
$ref: '#/components/responses/ExtendTradeLoanResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/seller-loans/standard/settlement:
post:
tags:
- Seller Loans
summary: Submit Seller Loan Settlement Request
description: >-
Enables a seller to directly submit a loan settlement request.
View Pre-requisites:
-
API Connection Profile has been created.
What is an API Connection Profile?
-
For testing in the Sandbox Environment, create your test project and API Connection Profile via
Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
- Corresponding loan is valid for settlement.
View Post-conditions:
- Corresponding loan
status
changed to Settlement Submitted
.
Status
will be updated to Disbursed
upon the settlement is completed, along with the updated outStadningAmount
.
-
It is possible to perform the following for this loan:
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
.
View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
.
View Endpoint
operationId: settle-standard-seller-loans
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/SettleTradeLoanRequest'
responses:
'200':
$ref: '#/components/responses/SettleTradeLoanResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/trade-loans/list:
post:
tags:
- Seller Loans
summary: Request Trade Loan Status
description: >-
Request a status update on one or many trade loans.
View Pre-requisites:
-
API Connection Profile has been created. What is an API Connection Profile?
-
For testing in the Sandbox Environment, create your test project and API Connection Profile via
Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
- Loan requests that have been processed/ updated via following APIs, with corresponding
loanNumber
generated.
-
Submit seller loan Application Request API
. View Endpoint
-
Submit seller loan Extension Request API
. View Endpoint
-
Submit seller loan Settlement Request API
. View Endpoint
View Post-conditions:
- A list of loans matches specified filtering criteria is retrieved.
operationId: list-trade-loan-status
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/ListTradeLoanStatusRequest'
responses:
'200':
$ref: '#/components/responses/ListTradeLoanStatusResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/trade-loans/detail:
post:
tags:
- Seller Loans
summary: Request Trade Loan Details
description: >-
Request full details on a specific Seller Loan in real-time.
View Pre-requisites:
-
API Connection Profile has been created.
What is an API Connection Profile?
-
For testing in the Sandbox Environment, create your test project and API Connection Profile via
Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
- Loan requests that have been processed/ updated via following APIs, with corresponding
loanNumber
generated.
-
Submit seller loan Application Request API
. View Endpoint
-
Submit seller loan Extension Request API
. View Endpoint
-
Submit seller loan Settlement Request API
. View Endpoint
operationId: get-trade-loan-details
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/GetTradeLoanDetailRequest'
responses:
'200':
$ref: '#/components/responses/GetTradeLoanDetailResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/documents:
post:
tags:
- Document Management
summary: Submit Supporting documents
description: >-
Enables an applicant to directly submit one or many supporting documents.
View Pre-requisites:
- API Connection Profile has been created. What is an API Connection Profile?
- For testing in the Sandbox Environment, create your test project and API Connection Profile via Dev Hub.
How to generate test API Connection Profile?
- Loan applicant possesses valid transaction account in HSBC.
View Post-conditions:
- Supporting documents are being uploaded. Status shall be enquired via
Request Supporting Document Status API
. View Endpoint
operationId: upload-supporting-documents
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/UploadSupportingDocumentRequest'
responses:
'200':
$ref: '#/components/responses/UploadSupportingDocumentResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/documents/details:
post:
tags:
- Document Management
summary: Request Supporting Document Status
description: >-
Request a status update on one or many supporting documents.
View Pre-requisites:
- API Connection Profile has been created. What is an API Connection Profile?
- For testing in the Sandbox Environment, create your test project and API Connection Profile via Dev Hub.
How to generate test API Connection Profile?
- Supporting documents submitted via
Submit Supporting Documents API
. View Endpoint
View Post-conditions:
- Document with associated details are responded.
- It is possible to perform the following:
- Submit Loan Application via
Submit Seller Loan Application Request API
with the supporting documents information retrieved. View Endpoint
operationId: list-supporting-document-status
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
requestBody:
$ref: '#/components/requestBodies/ListSupportingDocumentStatusRequest'
responses:
'200':
$ref: '#/components/responses/ListSupportingDocumentStatusResponse'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'502':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
/probe/health:
get:
tags:
- Common Services
summary: Trade Finance API Health Status
description: Enquire Trade Finance API Health Status
operationId: get-health
security:
- BearerTokenJWS: []
parameters:
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/requestTime'
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/countryCode'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/schemaVersion'
responses:
'200':
$ref: '#/components/responses/GetHealth_RESPONSE_200_TAAS'
'400':
$ref: '#/components/responses/RESPONSE_400_TAAS'
'401':
$ref: '#/components/responses/RESPONSE_401_TAAS'
'403':
$ref: '#/components/responses/RESPONSE_403_TAAS'
'404':
$ref: '#/components/responses/RESPONSE_404_TAAS'
'500':
$ref: '#/components/responses/RESPONSE_500_TAAS'
'503':
$ref: '#/components/responses/RESPONSE_503_TAAS'
components:
schemas:
# TAAS_ APIs Common Payload Parameters
# TAAS_ Reusable payload parameters
BankSwiftCode_TAAS:
description: Bank swift code (First 8 characters)
type: string
minLength: 8
maxLength: 8
pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}$
ISOCountryCode:
description: "[ISO 3166 Alpha-2 Country Code](https://www.iso.org/obp/ui/#search)"
type: string
maxLength: 2
pattern: ^$|^(A(D|E|F|G|I|L|M|N|O|R|S|T|Q|U|W|X|Z)|B(A|B|D|E|F|G|H|I|J|L|M|N|O|R|S|T|V|W|Y|Z)|C(A|C|D|F|G|H|I|K|L|M|N|O|R|U|V|X|Y|Z)|D(E|J|K|M|O|Z)|E(C|E|G|H|R|S|T)|F(I|J|K|M|O|R)|G(A|B|D|E|F|G|H|I|L|M|N|P|Q|R|S|T|U|W|Y)|H(K|M|N|R|T|U)|I(D|E|Q|L|M|N|O|R|S|T)|J(E|M|O|P)|K(E|G|H|I|M|N|P|R|W|Y|Z)|L(A|B|C|I|K|R|S|T|U|V|Y)|M(A|C|D|E|F|G|H|K|L|M|N|O|Q|P|R|S|T|U|V|W|X|Y|Z)|N(A|C|E|F|G|I|L|O|P|R|U|Z)|OM|P(A|E|F|G|H|K|L|M|N|R|S|T|W|Y)|QA|R(E|O|S|U|W)|S(A|B|C|D|E|G|H|I|J|K|L|M|N|O|R|T|V|Y|Z)|T(C|D|F|G|H|J|K|L|M|N|O|R|T|V|W|Z)|U(A|G|M|S|Y|Z)|V(A|C|E|G|I|N|U)|W(F|S)|Y(E|T)|Z(A|M|W))$
ISOCurrencyCode:
description: "[ISO 4217 Currency Code](https://en.wikipedia.org/wiki/ISO_4217)"
type: string
maxLength: 3
pattern: ^$|^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VES|VND|VUV|WST|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWL)$
ISODate:
description: "Full-date notation as defined by RFC 3339, section 5.6"
type: string
format: date
ISODateTime:
description: "The date-time notation as defined by RFC 3339, section 5.6"
type: string
format: date-time
ISOEmail:
description: "Email Address"
type: string
maxLength: 255
format: email
ISOHostName:
description: "Host name"
type: string
maxLength: 255
format: hostname
ISOIpv4:
description: "IP Address v4"
type: string
maxLength: 255
format: ipv4
ISOIpv6:
description: "IP Address v6"
type: string
maxLength: 255
format: ipv6
ISOUri:
description: "Resource URI"
type: string
maxLength: 255
format: uri
ISOUuid:
description: >
[Universal Unique Identifier] (https://en.wikipedia.org/wiki/Universally_unique_identifier)
type: string
format: uuid
Date_TAAS:
description: "Date, UTC, (YYYY-MM-DD)"
type: string
maxLength: 10
pattern: ^$|^202[0-9]{1}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$
AddtionalRemark_TAAS:
description: "Additional Remark"
type: string
maxLength: 100
example: "Something"
DateTime_TAAS:
description: "DateTime, UTC, (YYYY-MM-DD hh:mm:ss)"
type: string
minLength: 19
maxLength: 19
pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]$
DateTime_TAAS_OPT:
oneOf:
- $ref: '#/components/schemas/DateTime_TAAS'
- $ref: '#/components/schemas/EmptyString_TAAS'
CustomerReference_TAAS:
description: >-
Reference number for tracing of transactions, specified by customer or generate by partner's platform, if required.
type: string
maxLength: 30
example: CRHK230101_01
EmptyArray_TAAS:
description: "Accepts empty array"
type: array
maxItems: 0
items:
type: string
EmptyString_TAAS:
description: '.'
type: string
minLength: 0
pattern: ^$
enum:
- ''
EmptyEnum_TAAS:
type: string
minLength: 0
enum:
- ''
ExtnlCustomerId_TAAS:
description: >-
Your customer's id on your platform, used for [**authorisation**](#authorisation).
- If you are making the request on-behalf of your customer, specify your customer's id on your platform.
- If you are making the request as a direct client, specify the
HSBC Profile ID
assigned by HSBC during on-boarding.
-
Note for sandbox testers:
To perform testing on Sandbox Environment, specify the HSBC Profile ID you retrieved from the dev hub project
type: string
minLength: 1
maxLength: 255
example: "PLT-CUSTID-001"
AccountNumberIBAN:
type: string
description: Account number of the Bank
maxLength: 35
pattern: ^([A-Z]{2}[ \-]?[0-9]{2})(?=(?:[ \-]?[A-Z0-9]){9,30}$)((?:[ \-]?[A-Z0-9]{3,5}){2,7})([ \-]?[A-Z0-9]{1,3})?$
FaxNumber_TAAS:
description: "Fax Number"
type: string
maxLength: 255
pattern: ^$|^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$
Amount_HUB:
description: "Numeric string, maximum 9 integer with optional decimal up to 3 places."
type: string
maxLength: 15
pattern: ^$|^(0|[1-9]\d{0,10})(\.\d{1,3})?$
example: '1000.00'
Amount_TRADE_TRACKER:
description: "Numeric string, maximum 17 integer with optional decimal up to 3 places."
type: string
minLength: 1
maxLength: 20
pattern: ^(([1-9]\d{0,16})|([1-9]\d{0,16}\.\d)|([1-9]\d{0,16}\.\d{2})|([1-9]\d{0,16}\.\d{3})|(0\.\d{2}[1-9])|(0\.\d[1-9])|(0\.[1-9]))$
MiscStates_TAAS:
description: >-
Leave **blank** unless other additional information needs to be specified. Must be in `stringify JSON`.
type: string
minLength: 0
maxLength: 4000
example: "{\"additionalInfo\":\"something\"}"
Percentage_TAAS:
description: "Percentage, 2 decimal places."
type: string
pattern: ^(0|[1-9]\d{0,1})(\.\d{1,3})?([%])$
PhoneNumber_TAAS:
description: "Phone Number"
type: string
maxLength: 255
pattern: ^$|^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$
TradeAccountNumber_TAAS:
description: >-
**HSBC** Trade Account Number of the customer (corporate).
Note for sandbox testers:
You may specify any account number which matches the specified string pattern
.
type: string
minLength: 18
maxLength: 18
pattern: ^([A-Z ]{6})([0-9]{12})$
example: 'SGHSBC123456789123'
TradeAccountNumbers_TAAS:
description: "List of HSBC Trade Account Number of the customer (corporate)."
type: array
maxItems: 10
items:
allOf:
- $ref: '#/components/schemas/TradeAccountNumber_TAAS'
- minLength: 0
TradeDcn_TAAS:
description: "HSBC Domestic Customer Number of the customer (corporate)."
type: string
minLength: 15
maxLength: 15
pattern: ^$|^([A-Z ]{6})([0-9]{9})$
example: 'HKHSBC123456789'
Uuid_TAAS:
title: Uuid_TAAS
description: "[UUID](https://www.rfc-editor.org/rfc/rfc4122#section-4) without hyphen"
type: string
maxLength: 32
pattern: ^[0-9a-fA-F]{8}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{12}$
example: "efbf054e8f9c477493bfb3d2a19781b2"
FileId_FileNet:
description: 'Document id, returned by File Net. Doc id for the file upload to HSBC'
type: string
minLength: 40
maxLength: 40
pattern: ^[a-zA-Z]{3}_[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$
example: 'idd_10349C86-0000-C515-AB9B-65B893B9744B'
EncryptedAndBase64Encoded_TAAS:
description: >-
Message body you **send** to/ **receive** from the `endpoint`. It is a `base64` encoded `string` consists of content **encrypted** by `Public Key` of the receiver. How to perform message level en/ decryption?.
type: string
format: byte
example: LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0t...
GetHealth_RESPONSE_200_TAAS:
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
PaginationModel_TAAS:
required:
- pageNumber
- pageSize
type: object
properties:
pageSize:
type: string
description: "Number of records to return per page. (1-1000)"
minLength: 1
maxLength: 4
pattern: ^([1-9]|[1-9][0-9]{1,2}|1000)$
example: 10
pageNumber:
type: string
description: "Page index of the first record to return. (1-1000000000)"
minLength: 1
maxLength: 10
pattern: ^([1-9]|[1-9][0-9]{1,8}|1000000000)$
example: 1
LIST_MODEL_REQUEST_TAAS:
allOf:
- $ref: '#/components/schemas/PaginationModel_TAAS'
- required:
- extnlCustomerId
type: object
properties:
extnlCustomerId:
allOf:
- minLength: 1
- $ref: '#/components/schemas/ExtnlCustomerId_TAAS'
LIST_MODEL_WITH_DATE_TIME_FILTER_REQUEST_TAAS:
allOf:
- $ref: '#/components/schemas/LIST_MODEL_RESPONSE_TAAS'
- $ref: '#/components/schemas/DATE_TIME_FILTER_MODEL'
UploadSupportingDocumentRequest:
required:
- attachDocument
type: object
properties:
attachDocument:
description: >-
Document the client want to upload to HSBC.
Formats supported:
- Total size of all uploaded documents less than `30MB`.
- Support document type: bmp, doc, docx, gif, htm, html, jpeg, jpg, msg, odp, ods, odt, oxps, pdf, png, ppt, pptx, rtf, tif, tiff, txt, vsd, xls, xlsx, xps, zip.
type: array
minItems: 1
maxItems: 2
items:
type: string
format: binary
example: '"\C":"\test.tiff'
ListSupportingDocumentStatusRequest:
allOf:
- $ref: '#/components/schemas/DocumentListModel'
- type: object
properties:
attachDocument:
readOnly: true
LIST_MODEL_RESPONSE_TAAS:
required:
- totalCount
allOf:
- type: object
properties:
totalCount:
type: string
minLength: 1
maxLength: 255
pattern: ^\d{1,255}$
description: Total number of records returned.
example: "3"
- $ref: '#/components/schemas/PaginationModel_TAAS'
DATE_TIME_FILTER_MODEL:
required:
- startDateAndTime
- endDateAndTime
type: object
properties:
startDateAndTime:
description: "Start DateTime of filtering range."
allOf:
- minLength: 0
- $ref: '#/components/schemas/DateTime_TAAS'
endDateAndTime:
description: "End DateTime of filtering range."
allOf:
- minLength: 0
- $ref: '#/components/schemas/DateTime_TAAS'
RESPONSE_200_TAAS:
required:
- code
- message
- repliedTime
- correlationId
- responseData
- errorDetails
type: object
properties:
code:
description: "HSBC Trade-Finance API Response Code."
type: string
minLength: 7
maxLength: 7
enum:
- "EMKT102"
- "EMKT103"
- "EMKT105"
- "EMKT106"
- "EMKT107"
- "EMKT123"
- "EMKT200"
- "EMKT400"
default: "EMKT200"
example: "EMKT200"
message:
type: string
description: HSBC Trade-Finance API Response Message.
minLength: 1
maxLength: 255
enum:
- "INTERNAL_SERVER_ERROR"
- "DECRYPTION FAILURE"
- "Authentication check failed!"
- "GATEWAY_TIMEOUT"
- "Bad request payload"
- "Success"
default: "Success"
example: "Success"
repliedTime:
allOf:
- $ref: '#/components/schemas/DateTime_TAAS'
description: "Time-stamp of HSBC Trade-Finance API responses."
example: "2023-04-01 00:00:43"
correlationId:
allOf:
- $ref: '#/components/schemas/Uuid_TAAS'
- minLength: 32
nullable: true
description: "UUID of the response instance."
responseData:
description: "Key Information responded from bank are contained in this object."
type: object
nullable: true
errorDetails:
description: "List of errors and details responded from bank."
type: array
nullable: true
default: null
items:
$ref: '#/components/schemas/RESPONSE_200_TAAS_ERRORS'
RESPONSE_200_TAAS_ERRORS:
type: object
required:
- code
- message
properties:
code:
description: "Fulfilment error codes."
type: string
pattern: ^EMKT(102|103|105|106|107|123|400)-(\d{3})$
enum:
- 'EMKT102'
- 'EMKT103'
- 'EMKT105'
- 'EMKT106'
- 'EMKT107'
- 'EMKT111'
- 'EMKT123'
- 'EMKT400'
message:
type: string
description: "Fulfilment error descriptions."
maxLength: 255
enum:
- 'INTERNAL_SERVER_ERROR'
- 'Capture a Non-MKT error!'
- 'DECRYPTION_FAILURE'
- 'Internal exchange failed!'
- 'GATEWAY_TIMEOUT'
- 'Unsupported Media Type'
- 'Bad request payload'
example: "The extnlCustomerId must not be blank."
LoanEntityContactText:
type: string
maxLength: 31
description: Address Line Text
example: 'Address Line 1'
LoanCurrency:
allOf:
- $ref: '#/components/schemas/ISOCurrencyCode'
description: 'Currency of loan.'
example: 'SGD'
LoanAmountLoanCurrency:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: >-
**Net Loan Amount** to borrow, in `loanCurrency`
example: '1000.00'
LoanAmountInPaymentCurrency:
allOf:
- $ref: '#/components/schemas/LoanAmountLoanCurrency'
SellerOrderCurrency:
allOf:
- $ref: '#/components/schemas/ISOCurrencyCode'
description: >-
Currency used in **seller's orders/ invoices/ supporting documents**.
example: 'USD'
SellerOrderAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: >-
Amount in Currency used in **seller's orders/ invoices/ supporting documents**
example: '750.00'
LoanRepaymentAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: >-
Amount to be settled, in `loanCurrency`.
example: '750.00'
LoanEntityName:
type: string
maxLength: 35
description: 'Name of Entity.'
example: Corporate Ltd.
BuyerName:
allOf:
- $ref: '#/components/schemas/LoanEntityName'
description: 'Name of buyer.'
example: 'BUY-US001 Holdings Plc.'
BuyerCountry:
allOf:
- $ref: '#/components/schemas/ISOCountryCode'
description: 'Country Code of buyer.'
example: 'US'
BuyerAddressLine1:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 1 of buyer.'
example: 'BUY-US001 Tower #01-01'
BuyerAddressLine2:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 2 of buyer. .'
example: '1 BUY-US001 Street'
BuyerAddressLine3:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 3 of buyer. .'
example: 'USA'
BeneficiaryName:
allOf:
- $ref: '#/components/schemas/LoanEntityName'
description: 'Name of beneficiary'
example: 'BEN-SG001 Holdings Plc.'
BeneficiaryReferenceNumber:
type: string
maxLength: 255
description: 'Reference Number of beneficiary.'
example: '12232322'
BeneficiaryCountry:
allOf:
- $ref: '#/components/schemas/ISOCountryCode'
description: 'Country/ market of beneficiary.'
example: 'SG'
BeneficiaryAddressLine1:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 1 of beneficiary.'
example: 'BEN-SG001 Tower #01-01'
BeneficiaryAddressLine2:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 2 of beneficiary. .'
example: '1 BEN-SG001 Street'
BeneficiaryAddressLine3:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: 'Address line 3 of beneficiary. .'
example: 'SINGAPORE 12345'
BeneficiaryBankAccount:
type: string
maxLength: 34
description: 'Bank account of beneficiary.'
example: AC-BEN-SG001
BeneficiaryBankName:
allOf:
- $ref: '#/components/schemas/LoanEntityName'
description: "Name of beneficiary's bank."
example: 'BANK-SG001 Holdings Plc.'
BeneficiaryBankBranchName:
type: string
maxLength: 35
example: ''
BeneficiaryBankCountry:
allOf:
- $ref: '#/components/schemas/ISOCountryCode'
description: "Country Code of beneficiary's bank."
example: 'SG'
BeneficiaryBankAddressLine1:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: "Address line 1 of beneficiary's bank."
example: 'BANK-SG001 Tower #01-01'
BeneficiaryBankAddressLine2:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: "Address line 2 of beneficiary's bank. ."
example: '1 BANK-SG001 Street'
BeneficiaryBankAddressLine3:
allOf:
- $ref: '#/components/schemas/LoanEntityContactText'
description: "Address line 3 of beneficiary's bank. ."
example: 'SINGAPORE 12345'
BeneficiaryBankSwiftBicBranchCode:
allOf:
- $ref: '#/components/schemas/LoanEntityBankSwiftBicBranchCode'
description: >-
`branch`/ `BIC` / `SWIFT` code of beneficiary's bank.
example: 'HSBCSGS2001'
LoanEntityBankSwiftBicBranchCode:
type: string
minLength: 8
maxLength: 11
pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}(?:[0-9]{3})?$
description: >-
`branch`/ `BIC` / `SWIFT` code of bank.
example: 'HSBCHKH2001'
LoanInterestCalculationPreference:
type: string
maxLength: 1
enum:
- 'S'
- 'N'
- 'D'
- 'W'
- 'M'
- ''
default: ''
description: >-
Interest calculation preference.
Possible values:
- `S`: **Reset-Half-yearly**
- `N`: **Fixed**
- `D`: **Floating**
- `W`: **Reset-Weekly**
- `M`: **Reset-Monthly**
LoanInterestCollectionFrequency:
type: string
maxLength: 1
enum:
- 'S'
- 'W'
- 'A'
- 'Q'
- 'Y'
- ''
default: ''
description: >-
Interest collection frequency.
Possible values:
- `S`: **Half-yearly**
- `W`: **Weekly**
- `A`: **Monthly**
- `Q`: **Quarterly**
- `Y`: **Yearly**
LoanOutstandingAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: >-
`outStadningAmount` = **Net Loan Amount** - sum of `repaymentAmount`.
example: '750.00'
LoanTypeOfGoods:
type: string
maxLength: 8
enum:
- 'GOODS'
- 'SERVICES'
- 'EXPENSES'
description: >-
Type of goods.
Possible values are `GOODS`, `SERVICE` and `EXPENSES`.
LoanRepaymentAccount:
type: string
maxLength: 255
description: Loan repayment Account
example: 'SGHSBC123456789123'
LoanInterestRepaymentAccount:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAccount'
description: >-
Bank account number used to pay interest.
example: 'SGHSBC123456789123'
LoanChargesRepaymentAccount:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAccount'
description: >-
Bank account number used to pay charges. Must be the same as `interestRepaymentAccount`.
example: 'SGHSBC123456789123'
TradeLoanDataModel:
allOf:
- required:
- extnlCustomerId
- tradeAccountNumber
- customerReference
- loanNumber
- applicationId
- productType
- typeOfGoods
- goodsShipped
- invoiceNumberBillReference
- loanStartDate
- tenor
- loanExtensionTenor
- loanMaturityDate
- loanExtensionMaturityDate
- reasonForLoanExtension
- loanCurrency
- repaymentDate
- paymentCurrency
- paymentAmount
- repaymentAmount
- totalSupportingDocumentCurrency
- totalSupportingDocumentAmount
- shortFallCurrency
- shortFallAmount
- shortFallDebitAccount
- status
- loanAmount
- loanAmountLoanCurrency
- loanAmountInPaymentCurrency
- outstandingCurrency
- outstandingAmount
- loanAmountOutstanding
- totalInterestPaid
- interestOutstanding
- fixedOrVariableRateLoan
- currentInterestRate
- interestCalculationPreferenceCode
- interestCollectionFrequencyCode
- interestCalculationPreference
- interestCollectionFrequency
- loanRepaymentAccount
- interestRepaymentAccount
- interestAccountNumber
- repaymentAccountNumber
- chargesRepaymentAccount
- chargesAccountNumber
- goodsDescription
- buyerDetails
- beneficiaryName
- beneficiaryDetail
- paymentDetails
- applicationOfFunds
- foreignExchangeDetails
- instructionsToBank
- supportingDocuments
- miscStates
- creationDateAndTime
- dateRecorded
type: object
properties:
extnlCustomerId:
allOf:
- $ref: '#/components/schemas/ExtnlCustomerId_TAAS'
writeOnly: true
tradeAccountNumber:
allOf:
- $ref: '#/components/schemas/TradeAccountNumber_TAAS'
example: 'SGHSBC123456789123'
productType:
type: string
minLength: 10
maxLength: 11
enum:
- Buyer Loan
- Seller Loan
description: Loan product type, include two values seller loan, Seller Loan
readOnly: true
loanNumber:
type: string
description: Loan Number
maxLength: 255
example: 'LNSG23040102'
applicationId:
type: string
minLength: 1
maxLength: 30
description: application ID, generated by HSBC system
example: 46338647WB6V
beneficiaryName:
allOf:
- $ref: '#/components/schemas/BeneficiaryName'
customerReference:
allOf:
- $ref: '#/components/schemas/CustomerReference_TAAS'
- minLength: 0
example: 'CRSG23040101'
status:
description: "Status of Loan."
type: string
minLength: 7
maxLength: 20
enum:
- 'Submitted'
- 'Cancelled'
- 'Disbursed'
- 'Extension Submitted'
- 'Settlement Submitted'
- 'Settled'
typeOfGoods:
type: string
minLength: 0
maxLength: 8
enum:
- 'GOODS'
- 'SERVICE'
- 'EXPENSES'
description: >-
Type of goods. Possible values are `GOODS`, `SERVICES` and `EXPENSES`.
example: 'GOODS'
goodsShipped:
type: string
minLength: 1
maxLength: 1
enum:
- Y
- N
description: Ship the Goods or not.
example: Y
writeOnly: true
invoiceNumberBillReference:
description: Invoice number or bill reference
type: string
minLength: 0
maxLength: 255
example: '81921021'
writeOnly: true
loanStartDate:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
description: Loan Start Date
example: '2023-04-01'
tenor:
type: string
minLength: 1
maxLength: 3
pattern: ^([1-9]|[1-9][0-9]|[12][0-9]{2}|3[0-5][0-9]|360)$
example: '30'
description: >-
Tenor days, only allow number from `1` to `360`.
loanMaturityDate:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
description: >-
Loan due date. If this value is not specified, system shall calculate the `loanMaturityDate` by `loanStartDate` + `tenor`.
example: '2023-04-30'
loanExtensionTenor:
type: string
description: >-
To-be tenor days. (Up to `999`)
minLength: 1
maxLength: 3
pattern: ^([1-9]|[1-9][0-9]{1,2})$
example: '30'
writeOnly: true
loanExtensionMaturityDate:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
- writeOnly: true
- minLength: 0
description: >-
Loan due date after extension. If this value is not specified, system shall caculate the `loanMaturityDate` by `loanStartDate` + `loanExtensionTenor`.
example: '2023-04-30'
reasonForLoanExtension:
type: string
minLength: 1
maxLength: 255
writeOnly: true
example: 'extend loan date'
repaymentDate:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
description: Loan Repayment date
example: '2023-03-30'
paymentCurrency:
allOf:
- $ref: '#/components/schemas/SellerOrderCurrency'
paymentAmount:
allOf:
- $ref: '#/components/schemas/SellerOrderAmount'
repaymentAmount:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAmount'
- writeOnly: true
loanAmountInPaymentCurrency:
allOf:
- $ref: '#/components/schemas/LoanAmountInPaymentCurrency'
totalSupportingDocumentCurrency:
allOf:
- $ref: '#/components/schemas/SellerOrderCurrency'
- writeOnly: true
description: >-
Currency of payment, can be different with `loanCurrency`.
totalSupportingDocumentAmount:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAmount'
- writeOnly: true
loanCurrency:
allOf:
- $ref: '#/components/schemas/LoanCurrency'
shortFallCurrency:
allOf:
- $ref: '#/components/schemas/SellerOrderCurrency'
- minLength: 0
- writeOnly: true
description: >-
Same currency as `paymentCurrency`. **Must not be empty** if `shortFallAmount` **=/=** `0`.
example: ''
shortFallAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
- minLength: 0
- writeOnly: true
description: >-
Shortfall amount, i.e.`paymentAmount` - `loanAmountInPaymentCurrency`. **Must not be empty** if this value **=/=** `0`.
example: ''
shortFallDebitAccount:
description: >-
Debit account to cover shortfall. **Must not be empty** if `shortFallAmount` **=/=** `0`.
type: string
minLength: 1
maxLength: 255
example: ''
writeOnly: true
loanAmount:
allOf:
- $ref: '#/components/schemas/LoanAmountLoanCurrency'
- writeOnly: true
loanAmountLoanCurrency:
allOf:
- $ref: '#/components/schemas/LoanAmountLoanCurrency'
outstandingCurrency:
allOf:
- $ref: '#/components/schemas/LoanCurrency'
- readOnly: true
outstandingAmount:
allOf:
- $ref: '#/components/schemas/LoanOutstandingAmount'
nullable: true
readOnly: true
loanAmountOutstanding:
allOf:
- $ref: '#/components/schemas/LoanOutstandingAmount'
nullable: true
example: '0.00'
readOnly: true
currentInterestRate:
allOf:
- $ref: '#/components/schemas/Percentage_TAAS'
description: Current interest rate
readOnly: true
fixedOrVariableRateLoan:
type: string
enum:
- Fixed
- Variable
description: Fixed or Variable Rate for the loan
example: Fixed
readOnly: true
interestOutstanding:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
- readOnly: true
totalInterestPaid:
type: string
pattern: ^(AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VES|VND|VUV|WST|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWL) (0|[1-9]\d{0,10})(\.\d{1,3})?$
description: 'Total paid interest '
readOnly: true
example: 'SGD 0.00'
interestCalculationPreferenceCode:
allOf:
- $ref: '#/components/schemas/LoanInterestCalculationPreference'
- minLength: 0
interestCollectionFrequencyCode:
allOf:
- $ref: '#/components/schemas/LoanInterestCollectionFrequency'
- minLength: 0
interestCalculationPreference:
allOf:
- $ref: '#/components/schemas/LoanInterestCalculationPreference'
- minLength: 0
- readOnly: true
interestCollectionFrequency:
allOf:
- $ref: '#/components/schemas/LoanInterestCollectionFrequency'
- minLength: 0
- readOnly: true
loanRepaymentAccount:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAccount'
- minLength: 0
example: ''
repaymentAccountNumber:
allOf:
- $ref: '#/components/schemas/LoanRepaymentAccount'
- writeOnly: true
example: 'SGHSBC123456789123'
interestRepaymentAccount:
allOf:
- $ref: '#/components/schemas/LoanInterestRepaymentAccount'
interestAccountNumber:
allOf:
- $ref: '#/components/schemas/LoanInterestRepaymentAccount'
chargesRepaymentAccount:
allOf:
- $ref: '#/components/schemas/LoanChargesRepaymentAccount'
chargesAccountNumber:
allOf:
- $ref: '#/components/schemas/LoanChargesRepaymentAccount'
goodsDescription:
maxLength: 255
minLength: 1
type: string
description: Description of the goods
example: T-shirt
buyerDetails:
type: array
items:
allOf:
- $ref: '#/components/schemas/BuyerDetailModel'
beneficiaryDetail:
type: array
minItems: 1
items:
allOf:
- $ref: '#/components/schemas/BeneficiaryDetailModel'
paymentDetails:
allOf:
- $ref: '#/components/schemas/PaymentDetailModel'
writeOnly: true
applicationOfFunds:
type: array
minItems: 0
items:
$ref: '#/components/schemas/FundApplicationModel'
writeOnly: true
foreignExchangeDetails:
type: array
minItems: 0
items:
$ref: '#/components/schemas/ForeignExchangeDetailsModel'
writeOnly: true
invoiceDetail:
type: array
minItems: 0
items:
$ref: '#/components/schemas/InvoiceDetailModel'
supportingDocuments:
description: >-
Specify documents that have been submitted prior to your application. Supports multiple documents.
Details of supporting documents
-
Required only if you have submitted supporting documents for this loan application via
Submit Supporting Documents API
. View Endpoint.
-
docId
and documentName
can be retrieved from Request Supporting Document Status API
. View Endpoint.
type: array
minItems: 0
items:
$ref: '#/components/schemas/SupportingDocumentModel'
writeOnly: true
nullable: true
instructionsToBank:
type: string
minLength: 0
maxLength: 255
example: "message for your bank"
writeOnly: true
miscStates:
allOf:
- $ref: '#/components/schemas/MiscStates_TAAS'
- minLength: 0
- writeOnly: true
dateRecorded:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
- readOnly: true
example: '2023-03-01'
creationDateAndTime:
allOf:
- $ref: '#/components/schemas/DateTime_TAAS_OPT'
- readOnly: true
example: ''
CreateSellerLoanRequest:
allOf:
- $ref: '#/components/schemas/TradeLoanDataModel'
- type: object
required:
- loanNumber
properties:
loanNumber:
minLength: 0
customerReference:
minLength: 0
loanStartDate:
minLength: 0
paymentCurrency:
minLength: 3
paymentAmount:
minLength: 1
loanCurrency:
minLength: 3
beneficiaryName:
readOnly: true
invoiceNumberBillReference:
readOnly: true
loanAmount:
minLength: 1
loanAmountInPaymentCurrency:
readOnly: true
interestRepaymentAccount:
minLength: 1
chargesRepaymentAccount:
minLength: 1
status:
readOnly: true
applicationId:
readOnly: true
loanExtensionTenor:
readOnly: true
loanMaturityDate:
minLength: 0
loanExtensionMaturityDate:
readOnly: true
reasonForLoanExtension:
readOnly: true
repaymentDate:
readOnly: true
repaymentAmount:
readOnly: true
shortFallCurrency:
readOnly: true
shortFallAmount:
readOnly: true
shortFallDebitAccount:
readOnly: true
outstandingCurrency:
readOnly: true
interestAccountNumber:
readOnly: true
repaymentAccountNumber:
readOnly: true
chargesAccountNumber:
readOnly: true
loanAmountLoanCurrency:
readOnly: true
interestCalculationPreference:
readOnly: true
interestCollectionFrequency:
readOnly: true
beneficiaryDetail:
readOnly: true
invoiceDetail:
readOnly: true
UpdateLoanRequest:
allOf:
- $ref: '#/components/schemas/TradeLoanDataModel'
- type: object
properties:
loanNumber:
minLength: 1
productType:
readOnly: true
typeOfGoods:
readOnly: true
goodsShipped:
readOnly: true
invoiceNumberBillReference:
readOnly: true
loanAmount:
readOnly: true
supportingDocuments:
readOnly: true
loanStartDate:
readOnly: true
tenor:
readOnly: true
loanMaturityDate:
readOnly: true
paymentCurrency:
readOnly: true
paymentAmount:
readOnly: true
loanAmountInPaymentCurrency:
readOnly: true
loanCurrency:
readOnly: true
loanAmountLoanCurrency:
readOnly: true
outstandingCurrency:
readOnly: true
outstandingAmount:
readOnly: true
creationDateAndTime:
readOnly: true
totalSupportingDocumentCurrency:
readOnly: true
totalSupportingDocumentAmount:
readOnly: true
shortFallCurrency:
readOnly: true
shortFallAmount:
readOnly: true
shortFallDebitAccount:
readOnly: true
loanAmountOutstanding:
readOnly: true
totalInterestPaid:
readOnly: true
interestOutstanding:
readOnly: true
fixedOrVariableRateLoan:
readOnly: true
currentInterestRate:
readOnly: true
interestCalculationPreferenceCode:
readOnly: true
interestCollectionFrequencyCode:
readOnly: true
interestCalculationPreference:
readOnly: true
interestCollectionFrequency:
readOnly: true
loanRepaymentAccount:
readOnly: true
interestRepaymentAccount:
readOnly: true
chargesRepaymentAccount:
readOnly: true
goodsDescription:
readOnly: true
buyerDetails:
readOnly: true
paymentDetails:
readOnly: true
beneficiaryDetail:
readOnly: true
applicationOfFunds:
readOnly: true
foreignExchangeDetails:
readOnly: true
invoiceDetail:
readOnly: true
UpdateLoanResponse:
allOf:
- $ref: '#/components/schemas/TradeLoanDataModel'
- type: object
required:
- loanNumber
properties:
loanNumber:
minLength: 1
nullable: true
status:
minLength: 7
nullable: true
tradeAccountNumber:
writeOnly: true
productType:
writeOnly: true
typeOfGoods:
writeOnly: true
loanStartDate:
writeOnly: true
tenor:
writeOnly: true
loanMaturityDate:
writeOnly: true
loanExtensionMaturityDate:
writeOnly: true
repaymentDate:
writeOnly: true
paymentCurrency:
writeOnly: true
paymentAmount:
writeOnly: true
loanCurrency:
writeOnly: true
loanAmountInPaymentCurrency:
writeOnly: true
outstandingCurrency:
writeOnly: true
outstandingAmount:
writeOnly: true
beneficiaryName:
writeOnly: true
creationDateAndTime:
writeOnly: true
totalSupportingDocumentCurrency:
writeOnly: true
totalSupportingDocumentAmount:
writeOnly: true
shortFallCurrency:
writeOnly: true
shortFallAmount:
writeOnly: true
shortFallDebitAccount:
writeOnly: true
loanAmountLoanCurrency:
writeOnly: true
loanAmountOutstanding:
writeOnly: true
totalInterestPaid:
writeOnly: true
interestOutstanding:
writeOnly: true
fixedOrVariableRateLoan:
writeOnly: true
currentInterestRate:
writeOnly: true
interestCalculationPreferenceCode:
writeOnly: true
interestCollectionFrequencyCode:
writeOnly: true
interestCalculationPreference:
writeOnly: true
interestCollectionFrequency:
writeOnly: true
loanRepaymentAccount:
writeOnly: true
interestRepaymentAccount:
writeOnly: true
chargesRepaymentAccount:
writeOnly: true
interestAccountNumber:
writeOnly: true
chargesAccountNumber:
writeOnly: true
goodsDescription:
writeOnly: true
buyerDetails:
writeOnly: true
beneficiaryDetail:
writeOnly: true
applicationOfFunds:
writeOnly: true
foreignExchangeDetails:
writeOnly: true
invoiceDetail:
writeOnly: true
dateRecorded:
writeOnly: true
EnquireLoanRequest:
allOf:
- $ref: '#/components/schemas/UpdateLoanRequest'
- type: object
properties:
loanExtensionTenor:
readOnly: true
loanExtensionMaturityDate:
readOnly: true
reasonForLoanExtension:
readOnly: true
repaymentDate:
readOnly: true
repaymentAmount:
readOnly: true
repaymentAccountNumber:
readOnly: true
interestAccountNumber:
readOnly: true
chargesAccountNumber:
readOnly: true
instructionsToBank:
readOnly: true
miscStates:
readOnly: true
BeneficiaryDetailModel:
allOf:
- required:
- paymentMethod
- amountCurrency
- amount
- beneficiaryName
- beneficiaryReferenceNumber
- beneficiaryCountry
- beneficiaryAddressLine1
- beneficiaryAddressLine2
- beneficiaryAddressLine3
- beneficiaryBankAccount
- beneficiaryBankSwiftBicBranchCode
- beneficiaryBankAddressLine1
- beneficiaryBankAddressLine2
- beneficiaryBankAddressLine3
- beneficiaryBankCountry
- beneficiaryBankName
- beneficiaryBankBranchName
type: object
properties:
paymentMethod:
type: string
minLength: 1
maxLength: 255
example: 'local payment'
amountCurrency:
allOf:
- $ref: '#/components/schemas/ISOCurrencyCode'
example: 'SGD'
amount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
beneficiaryName:
allOf:
- $ref: '#/components/schemas/BeneficiaryName'
- minLength: 1
beneficiaryReferenceNumber:
allOf:
- $ref: '#/components/schemas/BeneficiaryReferenceNumber'
- minLength: 1
beneficiaryCountry:
allOf:
- $ref: '#/components/schemas/BeneficiaryCountry'
- minLength: 2
beneficiaryAddressLine1:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine1'
- minLength: 1
beneficiaryAddressLine2:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine2'
- minLength: 0
beneficiaryAddressLine3:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine3'
- minLength: 0
beneficiaryBankAccount:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankAccount'
- minLength: 1
beneficiaryBankName:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankName'
- minLength: 1
beneficiaryBankSwiftBicBranchCode:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankSwiftBicBranchCode'
beneficiaryBankBranchName:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankBranchName'
- minLength: 0
beneficiaryBankCountry:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankCountry'
- minLength: 2
beneficiaryBankAddressLine1:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankAddressLine1'
- minLength: 1
beneficiaryBankAddressLine2:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankAddressLine2'
- minLength: 0
beneficiaryBankAddressLine3:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankAddressLine3'
- minLength: 0
PaymentDetailModel:
allOf:
- $ref: '#/components/schemas/BeneficiaryDetailModel'
- type: object
properties:
paymentMethod:
readOnly: true
beneficiaryReferenceNumber:
readOnly: true
amountCurrency:
readOnly: true
amount:
readOnly: true
BuyerInvoiceListModel:
title: BuyerInvoiceListModel
type: array
items:
allOf:
- $ref: '#/components/schemas/InvoiceDetailModel'
- properties:
buyerName:
readOnly: true
buyerCountry:
readOnly: true
buyerAddressLine1:
readOnly: true
buyerAddressLine2:
readOnly: true
buyerAddressLine3:
readOnly: true
InvoiceDetailModel:
title: InvoiceDetailModel
type: object
oneOf:
- title: BuyerInvoiceModel
not:
required:
- buyerName
- buyerCountry
- buyerAddressLine1
- buyerAddressLine2
- buyerAddressLine3
- $ref: '#/components/schemas/BuyerDetailModel'
required:
- invoiceAmount
- invoiceCurrency
- invoiceNumber
- invoiceDate
- lineItemDetails
properties:
invoiceNumber:
type: string
minLength: 1
maxLength: 255
description: Invoice number or bill reference
example: 'INV23030101'
invoiceCurrency:
allOf:
- $ref: '#/components/schemas/ISOCurrencyCode'
description: Currency of the invoice
example: 'SGD'
invoiceAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: 'Amount value of the invoice'
example: '1000.00'
invoiceDate:
allOf:
- $ref: '#/components/schemas/Date_TAAS'
description: 'Date of invoice'
example: '2023-03-01'
invoiceOutstandingAmount:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: 'outstanding amount of invoice.'
example: '1000.00'
invoiceTaxAmount:
description: Tax amount. Input 0 if not involved.
allOf:
- $ref: '#/components/schemas/Amount_HUB'
example: '0.00'
invoiceAdjustmentAmount:
type: string
description: 'Adjustment amount. Can be positive or negative.'
pattern: ^(0|([-])?[1-9]\d{0,10})(\.\d{1,3})?$
example: '0.00'
lineItemDetails:
type: array
minItems: 0
items:
$ref: '#/components/schemas/LineItemDetailModel'
LineItemDetailModel:
required:
- itemLineDescription
- itemLineName
- itemLineNumber
- itemLineQuantity
- itemLineUnitPrice
type: object
properties:
itemLineNumber:
type: string
description: Number of the item line, start from 1
minLength: 0
maxLength: 5
pattern: ^$|^([1-9]|[0-9]\d{1,4})$
example: '1'
itemLineName:
description: Name for the item
type: string
minLength: 0
maxLength: 255
example: 'T-shirt'
itemLineUnitPrice:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
description: Unit Price for the item
example: '100.00'
itemLineQuantity:
type: string
minLength: 0
maxLength: 255
pattern: ^$|^[1-9]\d{0,254}$
description: Quantity for the item
example: '10'
itemLineDescription:
type: string
minLength: 1
maxLength: 255
description: Description of the item line.
example: 'Made in Singapore'
typeOfItem:
allOf:
- $ref: '#/components/schemas/LoanTypeOfGoods'
itemLineTotal:
allOf:
- $ref: '#/components/schemas/Amount_HUB'
- minLength: 0
description: >-
The total value for the item. The value equal to `itemLineUnitPrice` * `itemLineQuantity`.
example: '1000.00'
TradeLoanDetailModel:
allOf:
- $ref: '#/components/schemas/TradeLoanDataModel'
- type: object
required:
- loanNumber
properties:
productType:
minLength: 10
status:
minLength: 7
loanNumber:
minLength: 1
loanStartDate:
minLength: 10
tenor:
minLength: 3
loanMaturityDate:
minLength: 10
loanCurrency:
minLength: 3
loanAmountLoanCurrency:
minLength: 0
outstandingCurrency:
minLength: 3
loanAmountOutstanding:
minLength: 1
loanAmountInPaymentCurrency:
minLength: 0
beneficiaryName:
minLength: 0
creationDateAndTime:
minLength: 0
paymentCurrency:
minLength: 0
paymentAmount:
minLength: 0
interestCalculationPreference:
minLength: 0
interestCollectionFrequency:
minLength: 0
loanRepaymentAccount:
minLength: 1
chargesRepaymentAccount:
minLength: 0
interestRepaymentAccount:
minLength: 0
applicationId:
writeOnly: true
loanExtensionMaturityDate:
writeOnly: true
invoiceDetail:
writeOnly: true
totalSupportingDocumentCurrency:
writeOnly: true
totalSupportingDocumentAmount:
writeOnly: true
shortFallCurrency:
writeOnly: true
shortFallAmount:
writeOnly: true
shortFallDebitAccount:
writeOnly: true
repaymentDate:
writeOnly: true
goodsDescription:
writeOnly: true
outstandingAmount:
minLength: 1
interestCalculationPreferenceCode:
writeOnly: true
interestCollectionFrequencyCode:
writeOnly: true
interestAccountNumber:
writeOnly: true
chargesAccountNumber:
writeOnly: true
buyerDetails:
writeOnly: true
applicationOfFunds:
writeOnly: true
foreignExchangeDetails:
writeOnly: true
BuyerDetailModel:
required:
- buyerName
- buyerCountry
- buyerAddressLine1
- buyerAddressLine2
- buyerAddressLine3
type: object
properties:
buyerName:
allOf:
- $ref: '#/components/schemas/BuyerName'
- minLength: 1
buyerCountry:
allOf:
- $ref: '#/components/schemas/BuyerCountry'
- minLength: 2
buyerAddressLine1:
allOf:
- $ref: '#/components/schemas/BuyerAddressLine1'
- minLength: 1
buyerAddressLine2:
allOf:
- $ref: '#/components/schemas/BuyerAddressLine2'
- minLength: 0
buyerAddressLine3:
allOf:
- $ref: '#/components/schemas/BuyerAddressLine3'
- minLength: 0
description: 'Details of buyer.'
FundApplicationModel:
required:
- accountNumberIBAN
- bankAddressLine1
- bankAddressLine2
- bankAddressLine3
- bankBranchName
- nameOfBank
- payeeBankCountryTerritory
- payeeBankSwiftBicBranchCode
- paymentCurrency
type: object
properties:
paymentCurrency:
allOf:
- $ref: '#/components/schemas/SellerOrderCurrency'
- minLength: 3
accountNumberIBAN:
allOf:
- $ref: '#/components/schemas/AccountNumberIBAN'
- minLength: 1
payeeBankCountryTerritory:
allOf:
- $ref: '#/components/schemas/BeneficiaryCountry'
- minLength: 2
payeeBankSwiftBicBranchCode:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankSwiftBicBranchCode'
nameOfBank:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankName'
- minLength: 0
- maxLength: 31
bankBranchName:
allOf:
- $ref: '#/components/schemas/BeneficiaryBankBranchName'
- minLength: 0
- maxLength: 31
bankAddressLine1:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine1'
- minLength: 1
bankAddressLine2:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine2'
- minLength: 0
bankAddressLine3:
allOf:
- $ref: '#/components/schemas/BeneficiaryAddressLine3'
- minLength: 0
ForeignExchangeDetailsModel:
required:
- amountToBeUtilised
- contractReferenceNumber
- currency
type: object
properties:
contractReferenceNumber:
type: string
minLength: 0
maxLength: 16
example: FXLNSG23040102
description: 'Contract Reference number for exchange rate that client and bank make an agreement.'
currency:
allOf:
- $ref: '#/components/schemas/LoanCurrency'
description: >-
Currency agreed in the contract, same as `loanCurrency`.
amountToBeUtilised:
allOf:
- $ref: '#/components/schemas/LoanAmountLoanCurrency'
- minLength: 0
description: >-
Amount in the contract defined to be exchanged. Less than `loanAmount`.
DocumentListModel:
type: object
required:
- accountNumber
- docUploadRequestId
- attachDocument
- docDetails
properties:
accountNumber:
type: string
description: >-
Customer's `tradeAccountNumber` used for loan applications.
example: 'SGHSBC123456789123'
docUploadRequestId:
description: 'Batch id of uploaded document(s)'
allOf:
- $ref: '#/components/schemas/Uuid_TAAS'
attachDocument:
description: >-
Select file(s) for submission to HSBC as supporting documents.
Formats supported:
- Total size of all uploaded documents less than
30MB
.
- Support document type: bmp, doc, docx, gif, htm, html, jpeg, jpg, msg, odp, ods, odt, oxps, pdf, png, ppt, pptx, rtf, tif, tiff, txt, vsd, xls, xlsx, xps, zip.
type: array
minItems: 1
maxItems: 10
items:
type: string
format: binary
example: '"\C":"\test.tiff'
writeOnly: true
docId:
type: array
minItems: 0
items:
$ref: '#/components/schemas/FileId_FileNet'
writeOnly: true
docDetails:
type: array
items:
$ref: '#/components/schemas/SupportingDocumentModel'
readOnly: true
SupportingDocumentModel:
required:
- formType
- docId
- documentName
- docName
- numPages
- imageFormat
- imageBytes
- hash
- docStatus
- docCategory
type: object
properties:
formType:
type: string
enum:
- p
example: 'P'
readOnly: true
docId:
allOf:
- $ref: '#/components/schemas/FileId_FileNet'
documentName:
description: 'Document Name the document uploaded by the client'
type: string
minLength: 0
maxLength: 255
example: 'test.tif'
readOnly: true
docName:
description: 'Document Name the document uploaded by the client'
type: string
minLength: 1
maxLength: 255
example: 'test.tif'
docCategory:
description: Document category
type: string
minLength: 3
maxLength: 3
enum:
- APP
- DCT
- INV
- OTH
- PCO
- PFM
- POE
- SCT
- SPD
- TRC
writeOnly: true
docStatus:
description: 'Document upload status when upload the SupportingDocument to FileNet API. For the uploaded document with Virus Scan failed, cannot search out.'
type: string
minLength: 6
maxLength: 11
enum:
- 'In Progress'
- 'Failed'
- 'Uploaded'
nullable: true
readOnly: true
example: 'In Progress'
numPages:
description: 'Number of the document page'
type: string
minLength: 1
maxLength: 255
pattern: ^[1-9]\d{0,254}$
nullable: true
readOnly: true
example: 1
imageFormat:
description: 'Document format for the uploaded document'
type: string
minLength: 3
maxLength: 4
enum:
- BMP
- DOC
- DOCX
- GIF
- HTM
- HTML
- JPEG
- JPG
- MSG
- ODP
- ODS
- ODT
- OXPS
- PDF
- PNG
- PPT
- PPTX
- RTF
- TIF
- TIFF
- TXT
- VSD
- XLS
- XLSX
- XPS
- ZIP
readOnly: true
imageBytes:
description: 'Document size within Bytes'
type: string
minLength: 0
maxLength: 255
pattern: ^\d{1,255}$
readOnly: true
example: 409844
hash:
description: 'Hash value for the uploaded document'
type: string
minLength: 0
maxLength: 255
readOnly: true
example: 'F4318B5E707877F3B1DC3BE48708E532'
requestBodies:
CreateStandardSellerLoanRequest:
description: >-
Linked Operations:
-
(Optional) Retrieves
docId
and docName
via Request Supporting Document Status API
if you have submitted supporting documents for this loan application. View Endpoint
content:
application/json:
schema:
oneOf:
- title: CreateStandardSellerLoanRequest
allOf:
- $ref: '#/components/schemas/CreateSellerLoanRequest'
- type: object
properties:
interestCalculationPreferenceCode:
readOnly: true
interestCollectionFrequencyCode:
readOnly: true
applicationOfFunds:
readOnly: true
foreignExchangeDetails:
readOnly: true
totalSupportingDocumentCurrency:
readOnly: true
totalSupportingDocumentAmount:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request a loan application valued SGD 1000.00
that will be due in 30
days.
- Loan applicant requested loan to be repaid, valued
USD 750.00
.
- Loan applicant possesses a transaction account in HSBC. e.g.
"tradeAccountNumber": "SGHSBC123456789123"
Full example - How to Submit Loan Application Request via API in Sandbox Environment?
value:
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: LNSG23040102
customerReference:
typeOfGoods: GOODS
goodsShipped: 'Y'
loanStartDate: '2023-04-01'
tenor: '30'
loanMaturityDate: '2023-04-30'
paymentCurrency: USD
paymentAmount: '750.00'
loanCurrency: SGD
loanAmount: '1000.00'
loanRepaymentAccount: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
goodsDescription: T-shirt
buyerDetails:
- buyerName: BUY-US001 Holdings Plc.
buyerCountry: US
buyerAddressLine1: 'BUY-US001 Tower #01-01'
buyerAddressLine2: 1 BUY-US001 Street
buyerAddressLine3: USA
paymentDetails:
beneficiaryName: BEN-SG001 Holdings Plc.
beneficiaryCountry: SG
beneficiaryAddressLine1: 'BEN-SG001 Tower #01-01'
beneficiaryAddressLine2: 1 BEN-SG001 Street
beneficiaryAddressLine3: SINGAPORE 12345
beneficiaryBankAccount: AC-BEN-SG001
beneficiaryBankName: BANK-SG001 Holdings Plc.
beneficiaryBankSwiftBicBranchCode: HSBCSGS2001
beneficiaryBankBranchName: ''
beneficiaryBankCountry: SG
beneficiaryBankAddressLine1: 'BANK-SG001 Tower #01-01'
beneficiaryBankAddressLine2: 1 BANK-SG001 Street
beneficiaryBankAddressLine3: SINGAPORE 12345
supportingDocuments:
- docId: idd_10349C86-0000-C515-AB9B-65B893B9744B
docName: test.tif
docCategory: APP
instructionsToBank: message for your bank
miscStates: '{"additionalInfo":"something"}'
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
CreateAdvancedSellerLoanRequest:
description: >-
Linked Operations:
-
Request Supporting Document Status API
if you have submitted supporting documents for this loan application. View Endpoint
content:
application/json:
schema:
oneOf:
- title: CreateAdvancedSellerLoanRequest
allOf:
- $ref: '#/components/schemas/CreateSellerLoanRequest'
- type: object
properties:
paymentCurrency:
readOnly: true
paymentAmount:
readOnly: true
paymentDetails:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request a loan application valued SGD 1000.00
that will be due in 30
days.
- Loan applicant requested loan to be repaid, valued
USD 750.00
.
- Loan applicant possesses a transaction account in HSBC. e.g.
"tradeAccountNumber": "SGHSBC123456789123"
Full example - How to Submit Loan Application Request via API in Sandbox Environment?
value:
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: LNSG23040102
customerReference:
typeOfGoods: GOODS
goodsShipped: 'Y'
loanStartDate: '2023-04-01'
tenor: '30'
loanMaturityDate: '2023-04-30'
totalSupportingDocumentCurrency: USD
totalSupportingDocumentAmount: '750.00'
loanCurrency: SGD
loanAmount: '1000.00'
interestCalculationPreferenceCode: ''
interestCollectionFrequencyCode: ''
loanRepaymentAccount: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
goodsDescription: T-shirt
buyerDetails:
- buyerName: BUY-US001 Holdings Plc.
buyerCountry: US
buyerAddressLine1: 'BUY-US001 Tower #01-01'
buyerAddressLine2: 1 BUY-US001 Street
buyerAddressLine3: USA
applicationOfFunds:
- paymentCurrency: USD
accountNumberIBAN: VF-43 699O-YBY7XT6VDD3Q08GK1X147DDX
payeeBankCountryTerritory: SG
payeeBankSwiftBicBranchCode: HSBCSGS2001
nameOfBank: BANK-SG001 Holdings Plc.
bankBranchName: ''
bankAddressLine1: 'BEN-SG001 Tower #01-01'
bankAddressLine2: 1 BEN-SG001 Street
bankAddressLine3: SINGAPORE 12345
foreignExchangeDetails:
- contractReferenceNumber: FXLNSG23040102
currency: SGD
amountToBeUtilised: '1000.00'
supportingDocuments:
- docId: idd_10349C86-0000-C515-AB9B-65B893B9744B
docName: test.tif
docCategory: APP
instructionsToBank: message for your bank
miscStates: '{"additionalInfo":"something"}'
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
ExtendTradeLoanRequest:
description: >-
Linked Operations:
- Corresponding
loanNumber
retrieved via Submit Seller Loan Application Request API
. View Endpoint.
- Corresponding loan's status is
Disbursed
.
content:
application/json:
schema:
oneOf:
- title: ExtendTradeLoanRequest
allOf:
- $ref: '#/components/schemas/UpdateLoanRequest'
- type: object
properties:
applicationId:
readOnly: true
customerReference:
readOnly: true
beneficiaryName:
readOnly: true
repaymentDate:
readOnly: true
repaymentAmount:
readOnly: true
interestAccountNumber:
readOnly: true
repaymentAccountNumber:
readOnly: true
chargesAccountNumber:
readOnly: true
status:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request for extension of LNSG23040102
from 30
days to 60
days. Hence, the new due date, i.e. loanExtensionMaturityDate
to be changed from 2023-04-15
to 2023-05-14
.
- Loans extension will only be processed if associated loan's
status
is Disbursed
and the original loanMaturityDate
is >=
Current Date
.
- Specify the Authroisation value pair per
LNSG23040102
, i.e."extnlCustomerId": "PLT-CUSTID-001"
and "tradeAccountNumber": "SGHSBC123456789012"
.
Full example - How to Submit Loan Extension Request via API in Sandbox Environment?
value:
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: LNSG23040102
loanExtensionTenor: '30'
loanExtensionMaturityDate: '2023-04-30'
reasonForLoanExtension: extend loan date
instructionsToBank: message for your bank
miscStates: '{"additionalInfo":"something"}'
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
SettleTradeLoanRequest:
description: >-
Linked Operations:
- Corresponding
loanNumber
retrieved via Submit Seller Loan Application Request API
. View Endpoint.
- Corresponding loan's
"status": "Disbursed"
.
content:
application/json:
schema:
oneOf:
- title: SettleTradeLoanRequest
allOf:
- $ref: '#/components/schemas/UpdateLoanRequest'
- type: object
properties:
repaymentDate:
minLength: 10
repaymentAmount:
minLength: 1
repaymentAccountNumber:
minLength: 1
interestAccountNumber:
minLength: 0
chargesAccountNumber:
minLength: 0
applicationId:
readOnly: true
customerReference:
readOnly: true
beneficiaryName:
readOnly: true
loanExtensionTenor:
readOnly: true
loanMaturityDate:
readOnly: true
loanExtensionMaturityDate:
readOnly: true
reasonForLoanExtension:
readOnly: true
status:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request for settlement of an existing loan.
- Loans settlement will only be processed if the loan's
status
is Disbursed
.
- Specify the Authroisation value pair per
LNSG23040102
, i.e."extnlCustomerId": "PLT-CUSTID-001"
and "tradeAccountNumber": "SGHSBC123456789012"
.
Full example - How to Submit Loan Settlement Request via API in Sandbox Environment?
value:
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: LNSG23040102
repaymentDate: '2023-03-30'
repaymentAmount: '750.00'
repaymentAccountNumber: SGHSBC123456789123
interestAccountNumber: SGHSBC123456789123
chargesAccountNumber: SGHSBC123456789123
instructionsToBank: message for your bank
miscStates: '{"additionalInfo":"something"}'
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
ListTradeLoanStatusRequest:
description: >-
Linked Operations:
Loan requests that have been processed/ updated via following APIs, with corresponding loanNumber
generated.
-
Submit seller loan Application Request API
. View Endpoint
-
Submit seller loan Extension Request API
. View Endpoint
-
Submit seller loan Settlement Request API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: ListTradeLoanStatusRequest
allOf:
- $ref: '#/components/schemas/PaginationModel_TAAS'
- $ref: '#/components/schemas/EnquireLoanRequest'
- type: object
properties:
applicationId:
readOnly: true
customerReference:
minLength: 0
status:
minLength: 0
beneficiaryName:
minLength: 0
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request status of one or many loans that have been submitted to HSBC
Authorisation:
Specify the value pair per LNSG23040102
, i.e."extnlCustomerId": "PLT-CUSTID-001"
and "tradeAccountNumber": "SGHSBC123456789012"
.
Paginations:
Specify how you would like transaction(s) matching filtering criteria to be retrieved.
- Assume that the enquiry page on your platform will be displaying up to 10 transactions (loans), set the
"pageSize": "10"
.
- Here, set
"pageNumber": "1"
so as to receive a response with the first 10 transactions matching all filtering criteria.
Filtering Criteria
It is optional to specify customerReference
, loanNumber
, status
and beneficiaryName
.
Full example - How to Request Trade Loan Status via API in Sandbox Environment?.
value:
pageSize: '10'
pageNumber: '1'
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: ''
beneficiaryName: ''
customerReference: ''
status: ''
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
GetTradeLoanDetailRequest:
description: >-
Linked Operations:
Loan requests that have been processed/ updated via following APIs, with corresponding loanNumber
generated.
-
Submit seller loan Application Request API
. View Endpoint
-
Submit seller loan Extension Request API
. View Endpoint
-
Submit seller loan Settlement Request API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: GetTradeLoanDetailRequest
allOf:
- $ref: '#/components/schemas/EnquireLoanRequest'
- type: object
properties:
customerReference:
readOnly: true
status:
readOnly: true
beneficiaryName:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
description: >-
You as a/ on-behalf of your customer PLT-CUSTID-001
, request details of a specific loans that have been submitted to HSBC
Authorisation:
- Specify the value pair per the specific loan, i.e.
"extnlCustomerId": "PLT-CUSTID-001"
and "tradeAccountNumber": "SGHSBC123456789012"
.
- Specify the specific loanNumber or applicationId, i.e.
"loanNumber": "LNSG23040102"
or "applicationId": "20230401SG02"
.
Full example - How to Request Trade Loan details via API in Sandbox Environment?
value:
extnlCustomerId: PLT-CUSTID-001
tradeAccountNumber: SGHSBC123456789123
loanNumber: LNSG23040102
applicationId: ''
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
UploadSupportingDocumentRequest:
description: >-
To make a request:
-
Prepares the
Unencrypted Request
body as per ListSupportingDocumentStatusRequest
schema.
- An example is available under
Request samples
/ Example
/ Unencrypted Request
.
-
You may try a
Mock Request
via Try it now
with the above example selected.
Making an API Request via Mock Sandbox
-
You may experience the full request journey via Smart Sandbox. Coming soon
- Encryption is not required.
content:
multipart/form-data:
schema:
title: UploadSupportingDocumentRequest
allOf:
- $ref: '#/components/schemas/DocumentListModel'
- type: object
properties:
accountNumber:
readOnly: true
docUploadRequestId:
readOnly: true
docId:
readOnly: true
examples:
Unencrypted Request:
value:
attachDocument:
- 'test.tif'
required: true
ListSupportingDocumentStatusRequest:
description: >-
Linked Operations:
- Retrieve the
docUploadRequestId
or docId
for documents submitted via Submit Supporting Documents API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: ListSupportingDocumentStatusRequest
allOf:
- $ref: '#/components/schemas/DocumentListModel'
- type: object
properties:
attachDocument:
readOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Request:
value:
accountNumber: SGHSBC123456789123
docUploadRequestId: efbf054e8f9c477493bfb3d2a19781b2
docId:
- idd_10349C86-0000-C515-AB9B-65B893B9744B
Encrypted Request (Base64):
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
required: true
responses:
## Trade Loan reusable responses
CreateLoanApplicationResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox.
How to Submit Seller Loan Application Request via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per CreateLoanApplicationResponse
schema.
- Upon a loan application is generated successfully, a
loanNumber
and applicationId
will be generated. These values are input for other linked operations
.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
-
Extends it's duration via
Submit Seller Loan Extension Request API
. View Endpoint
-
Performs settlement via
Submit Seller Loan Settlement Request API
. View Endpoint
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: CreateLoanApplicationResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/UpdateLoanResponse'
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:00:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
loanNumber: LNSG23040102
applicationId: 46338647WB6V
customerReference: CRSG23040101
status: Submitted
errorDetails: null
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Bad Request Payload - Business Logic:
summary: Unencrypted Response - Bad Request Payload (Business Logic)
value:
code: EMKT400
message: Bad request payload
repliedTime: "2023-04-01 00:00:43"
correlationId: null
responseData: null
errorDetails:
- code: EMKT400-007,
message: The loanStartDate should be equal or later than today and within the next 15 days of today.
- code: EMKT400-008,
message: tenor value less than or equal to 360 Days.
- code: EMKT400-016,
message: The interestRepaymentAccount must be equal to chargesRepaymentAccount.
- code: EMKT400-078,
message: The loanRepaymentAccount is invalid.
- code: EMKT400-079,
message: The interestRepaymentAccount or ChargesRepaymentAccount is invalid.
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
ExtendTradeLoanResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox.
How to Submit Loan Extension Request via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per ExtendTradeLoanResponse
schema.
- Upon a loan extension request is submitted successfully, a
status
is changed to Extension Submitted
.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: ExtendTradeLoanResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/UpdateLoanResponse'
- type: object
properties:
customerReference:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:10:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
applicationId: 20230401SG02
loanNumber: LNSG23040102
status: Extension Submitted
errorDetails: null
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Bad Request Payload - Business Logic:
summary: Unencrypted Response - Bad Request Payload (Business Logic)
value:
code: EMKT400
message: Bad request payload
repliedTime: "2023-04-01 00:10:43"
correlationId: null
responseData: null
errorDetails:
- code: EMKT400-049,
message: Unable to find this trade loan, please check the loan number you entered.
- code: EMKT400-050,
message: The Application still in progress, please try later or contact HSBC operations team for help.
- code: EMKT400-051,
message: The current loan product type is invalid.
- code: EMKT400-055,
message: The automatically calculated loan loanExtensionMaturityDate must be later than the loanMaturityDate.
- code: EMKT400-057,
message: The loan is expired.
- code: EMKT400-106,
message: The transaction does not existed or status is not allowed.
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
SettleTradeLoanResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox. How to Submit Loan Settlement Request via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per SettleTradeLoanResponse
schema.
- Upon a Loan Settlement Request is submitted successfully, a
status
is changed to Settlement Submitted
.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: SettleTradeLoanResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/UpdateLoanResponse'
- type: object
properties:
customerReference:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:20:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
applicationId: 20230401SG02
loanNumber: LNSG23040102
status: Settlement Submitted
errorDetails: null
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Bad Request Payload - Business Logic:
summary: Unencrypted Response - Bad Request Payload (Business Logic)
value:
code: EMKT400
message: Bad request payload
repliedTime: "2023-04-01 00:20:43"
correlationId: null
responseData: null
errorDetails:
- code: EMKT400-042,
message: The repaymentDate must be between today and the loanMaturityDate.
- code: EMKT400-043,
message: The current loan is expired, repaymentDate must be equal to today.
- code: EMKT400-045,
message: The repaymentAmount must be less than the loanAmountOutstanding.
- code: EMKT400-051,
message: The current loan product type is invalid.
- code: EMKT400-057,
message: The loan is expired.
- code: EMKT400-106,
message: The transaction does not existed or status is not allowed.
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
ListTradeLoanStatusResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox. How to Submit Loan Settlement Request via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per SettleTradeLoanResponse
schema.
- Upon successful enquiry, a list of loan transaction (up to specified
pageSize
is retrieved.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
-
Extends it's duration via
Submit Seller Loan Extension Request API
. View Endpoint
-
Performs settlement via
Submit Seller Loan Settlement Request API
. View Endpoint
-
Enquires details of this loan of it via
Request Trade Loan Details API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: ListTradeLoanStatusResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
required:
- records
allOf:
- $ref: '#/components/schemas/LIST_MODEL_RESPONSE_TAAS'
- type: object
nullable: true
properties:
records:
type: array
items:
allOf:
- $ref: '#/components/schemas/TradeLoanDetailModel'
- type: object
properties:
status:
minLength: 7
paymentAmount:
writeOnly: true
typeOfGoods:
writeOnly: true
loanAmountLoanCurrency:
writeOnly: true
loanAmountOutstanding:
writeOnly: true
totalInterestPaid:
writeOnly: true
interestOutstanding:
writeOnly: true
fixedOrVariableRateLoan:
writeOnly: true
currentInterestRate:
writeOnly: true
interestCalculationPreferenceCode:
writeOnly: true
interestCollectionFrequencyCode:
writeOnly: true
interestCalculationPreference:
writeOnly: true
interestCollectionFrequency:
writeOnly: true
loanRepaymentAccount:
writeOnly: true
interestRepaymentAccount:
writeOnly: true
chargesRepaymentAccount:
writeOnly: true
goodsDescription:
writeOnly: true
beneficiaryDetail:
writeOnly: true
invoiceDetail:
writeOnly: true
dateRecorded:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
pageSize: '10'
pageNumber: '1'
totalCount: '7'
records:
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23040102
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Settlement Submitted
loanStartDate: '2023-04-01'
loanMaturityDate: '2023-05-29'
tenor: '60'
outstandingCurrency: USD
outstandingAmount: '750.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23040101
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Submitted
loanStartDate: '2023-04-01'
loanMaturityDate: '2023-04-30'
tenor: '30'
outstandingCurrency: HKD
outstandingAmount: '5900.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23031502
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Extension Submitted
loanStartDate: '2023-03-15'
loanMaturityDate: '2023-05-14'
tenor: '60'
outstandingCurrency: USD
outstandingAmount: '750.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23031501
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Disbursed
loanStartDate: '2023-03-15'
loanMaturityDate: '2023-04-14'
tenor: '30'
outstandingCurrency: SGD
outstandingAmount: '1000.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23030103
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Cancelled
loanStartDate: '2023-03-01'
loanMaturityDate: '2023-03-30'
tenor: '30'
outstandingCurrency: HKD
outstandingAmount: '0.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23030102
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Settlement Submitted
loanStartDate: '2023-03-01'
loanMaturityDate: '2023-04-01'
tenor: '31'
outstandingCurrency: GBP
outstandingAmount: '610.00'
creationDateAndTime: ''
- tradeAccountNumber: SGHSBC12345678912
productType: Seller Loan
beneficiaryName: ''
customerReference: ''
loanNumber: LNSG23030101
paymentCurrency: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
status: Settled
loanStartDate: '2023-03-01'
loanMaturityDate: '2023-03-30'
tenor: '30'
outstandingCurrency: JPY
outstandingAmount: '0.00'
creationDateAndTime: ''
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
GetTradeLoanDetailResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox. How to Request Loan Details via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per SettleTradeLoanResponse
schema.
- Upon successful enquiry, the specified loan is retrieved.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
-
Extends it's duration via
Submit Seller Loan Extension Request API
. View Endpoint
-
Performs settlement via
Submit Seller Loan Settlement Request API
. View Endpoint
-
Enquires status of this and many other loans that have been submitted via
Request Trade Loan Status API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: GetTradeLoanDetailResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/TradeLoanDetailModel'
- type: object
properties:
beneficiaryName:
writeOnly: true
outstandingAmount:
writeOnly: true
outstandingCurrency:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Submitted:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23040101
status: Submitted
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-04-01'
tenor: '30'
loanMaturityDate: '2023-04-30'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '5900.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-04-01'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-HK001'
beneficiaryBankName: 'BANK-HK001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'HK'
beneficiaryBankAddressLine1: 'BANK-HK001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-HK001 Street'
beneficiaryBankAddressLine3: 'HONG KONG'
Unencrypted Response - Disbursed:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23031501
status: Disbursed
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-03-15'
tenor: '30'
loanMaturityDate: '2023-04-14'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '750.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-03-15'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-US001'
beneficiaryBankName: 'BANK-US001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'SG'
beneficiaryBankAddressLine1: 'BANK-US001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-SG001 Street'
beneficiaryBankAddressLine3: 'USA'
Unencrypted Response - Extension Submitted:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23031502
status: Extension Submitted
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-03-15'
tenor: '60'
loanMaturityDate: '2023-05-14'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '1000.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-04-01'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-SG001'
beneficiaryBankName: 'BANK-SG001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'SG'
beneficiaryBankAddressLine1: 'BANK-SG001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-SG001 Street'
beneficiaryBankAddressLine3: 'SINGAPORE 12345'
Unencrypted Response - Settlement Submitted:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23030102
status: Settlement Submitted
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-03-01'
tenor: '31'
loanMaturityDate: '2023-04-01'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: GBP
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '610.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-04-01'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-GB001'
beneficiaryBankName: 'BANK-GB001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'GB'
beneficiaryBankAddressLine1: 'BANK-GB001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-GB001 Street'
beneficiaryBankAddressLine3: 'UNITED KINGDOM'
Unencrypted Response - Settled:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23030101
status: Settled
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-03-01'
tenor: '30'
loanMaturityDate: '2023-03-30'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '0.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-03-30'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-JP001'
beneficiaryBankName: 'BANK-JP001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'SG'
beneficiaryBankAddressLine1: 'BANK-JP001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-JP001 Street'
beneficiaryBankAddressLine3: 'JAPAN'
Unencrypted Response - Cancelled:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:25:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
tradeAccountNumber: SGHSBC123456789123
productType: Seller Loan
loanNumber: LNSG23030103
status: Cancelled
typeOfGoods: ''
customerReference: ''
loanStartDate: '2023-03-01'
tenor: '30'
loanMaturityDate: '2023-03-30'
paymentCurrency: ''
paymentAmount: ''
loanAmountInPaymentCurrency: ''
loanCurrency: SGD
loanAmountLoanCurrency: '1000.00'
loanAmountOutstanding: '0.00'
creationDateAndTime: ''
loanRepaymentAccount: SGHSBC123456789123
interestCalculationPreference: ''
interestCollectionFrequency: ''
interestRepaymentAccount: SGHSBC123456789123
chargesRepaymentAccount: SGHSBC123456789123
currentInterestRate: '3.0566'
interestOutstanding: '0.00'
fixedOrVariableRateLoan: Fixed
dateRecorded: '2023-03-01'
totalInterestPaid: '0'
beneficiaryDetail:
- paymentMethod: ''
amountCurrency: ''
amount: ''
beneficiaryName: ''
beneficiaryReferenceNumber: ''
beneficiaryCountry: ''
beneficiaryAddressLine1: ''
beneficiaryAddressLine2: ''
beneficiaryAddressLine3: ''
beneficiaryBankAccount: 'AC-BEN-HK001'
beneficiaryBankName: 'BANK-HK001 Holdings Plc.'
beneficiaryBankSwiftBicBranchCode: 'HSBCSGS2001'
beneficiaryBankCountry: 'HK'
beneficiaryBankAddressLine1: 'BANK-HK001 Tower #01-01'
beneficiaryBankAddressLine2: '1 BANK-HK001 Street'
beneficiaryBankAddressLine3: 'HONG KONG'
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
## Trade Loan reusable responses
UploadSupportingDocumentResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox. How to Request Loan Details via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per SettleTradeLoanResponse
schema.
- Upon submitted documents are received for processing, a
docUploadRequestId
will be generated. These values are input for other linked operations
.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
- Enquire status of submitted document(s) via
Request Supporting Document Status API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: UnencryptedResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/DocumentListModel'
- type: object
properties:
accountNumber:
writeOnly: true
docDetails:
writeOnly: true
docId:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:00:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
docUploadRequestId: efbf054e8f9c477493bfb3d2a19781b2
errorDetails: null
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
ListSupportingDocumentStatusResponse:
description: >-
Success
To process the response:
-
Receives response as per
EncryptedAndBase64Encoded_TAAS
schema. Decodes and decrypts it.
View guidance on Message Level Encryption
- An example is available under
Response samples
/ Example
/ Encrypted Body - Base64 encoding
.
-
You may experience the full response journey via Smart Sandbox. How to Request Loan Details via API in Sandbox Environment?
-
Upon response is decrypted successful, you shall be able to obtain the
Unencrypted response
in JSON
structure, as per SettleTradeLoanResponse
schema.
- Upon successful enquiry, a list of
docId
and documentName
will be retrieved. These values are inputs for other linked operations
.
- An example is available under
Response samples
/ Example
/ Unencrypted Response
.
Linked Operations:
- Submit Buyer Loan Application Request via
Submit Buyer Loan Application Request API
. View Endpoint
- Submit Seller Loan Application Request via
Submit Seller Loan Application Request API
. View Endpoint
content:
application/json:
schema:
oneOf:
- title: ListSupportingDocumentStatusResponse
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- type: object
properties:
responseData:
allOf:
- $ref: '#/components/schemas/SupportingDocumentModel'
- type: object
properties:
accountNumber:
writeOnly: true
docName:
writeOnly: true
- $ref: '#/components/schemas/EncryptedAndBase64Encoded_TAAS'
examples:
Unencrypted Response - Success:
value:
code: EMKT200
message: Success
repliedTime: '2023-04-01 00:00:43'
correlationId: efbf054e8f9c477493bfb3d2a19781b2
responseData:
formType: P
docId: idd_10349C86-0000-C515-AB9B-65B893B9744B
documentName: test.tif
docStatus: In Progress
numPages: '1'
imageFormat: BMP
imageBytes: '409844'
hash: F4318B5E707877F3B1DC3BE48708E532
errorDetails: null
Unencrypted Response - Bad Request Payload - Format:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS'
Unencrypted Response - Internal Server Error:
$ref: '#/components/examples/RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS'
Unencrypted Response - Decryption Failure:
$ref: '#/components/examples/RESPONSE_200_DECRYPTION_FAILURE_TAAS'
Unencrypted Response - Bad Request Header:
$ref: '#/components/examples/RESPONSE_200_BAD_REQUEST_HEADER_TAAS'
Unencrypted Response - Auth Error:
$ref: '#/components/examples/RESPONSE_200_AUTH_ERROR_TAAS'
Unencrypted Response - Gateway Timeout:
$ref: '#/components/examples/RESPONSE_200_GATEWAY_TIMEOUT_TAAS'
Encrypted Response:
$ref: '#/components/examples/EncryptedAndBase64Encoded_TAAS'
GetHealth_RESPONSE_200_TAAS:
description: Returned health status.
content:
application/json:
schema:
title: GetHealth_RESPONSE_200_TAAS
allOf:
- $ref: '#/components/schemas/RESPONSE_200_TAAS'
- properties:
responseData:
example: null
# TRADE FINANCE COMMON RESPONSE MODEL
RESPONSE_400_TAAS:
description: >-
**Bad Request**
RESPONSE_401_TAAS:
description: |-
Unauthorised
View Response Codes:
HSBC API Response Code |
Scenario/ Troubleshooting |
EDSPER1001 |
Mandatory field Kid is missing or invalid in the customer JWT header |
EDSPER1002 |
Invalid PGP Key , Key is set to never expiry |
EDSPER1003 |
Invalid PGP Key , Key is expired |
EDSPER1004 |
Invalid PGP Key |
EDSPER1005 |
Customer JWT is expired |
EDSPER1006 |
Mandatory field claim "iat" is missing or invalid from customer JWT header |
EDSPER1007 |
Mandatory field claim "Alg" is missing or invalid in customer JWT header |
EDSPER1008 |
Mandatory field Sub (profile id) is missing or invalid in customer JWT body |
EDSPER2002 |
Internal Error. Please contact HSBC technical support. |
EDSPER2003 |
Mandatory field jti is missing or invalid in customer JWT payload |
EDSPER2004 : User account is locked |
Please contact HSBC technical support. |
EDSPER2005 |
JWT Signature validation failed / Invalid JWT Signature |
EDSPER2006 |
Blocked access to user accessing from sanctioned country |
EDSPER2007 |
IP address missing so sanctioned country check failed. |
EDSPER2008 : Authentication Token missing |
Invalid Authentication Token |
EDSPER2009 : Client Token or Payload is in Invalid format |
Either Client Token or Payload is in Invalid format |
EDSPER2010 |
Mandatory field aud is missing or invalid in customer JWT payload |
EDSPER2011 : Client Token or Payload is in Invalid format |
Customer Token or Payload is invalid - payload hash mismatch. |
EDSPER2012 : Mandatory field ver is missing or invalid |
Mandatory field ver is missing or invalid from JWT header |
EDSPER2013 : User Login credentials are invalid |
User Login credentials are invalid |
EDSPER2014 : Partner-customer relationship verification failed |
Please contact HSBC technical support. |
EDSPEX2001 |
Please contact HSBC technical support. |
content:
application/json:
schema:
type: object
properties:
code:
description: Authorization error code."
type: string
minLength: 10
maxLength: 255
enum:
- 'EDSPER1001'
- 'EDSPER1002'
- 'EDSPER1003'
- 'EDSPER1004'
- 'EDSPER1005: JWT token expired'
- 'EDSPER1006'
- 'EDSPER1007'
- 'EDSPER1008'
- 'EDSPER2002'
- 'EDSPER2003'
- 'EDSPER2004'
- 'EDSPER2005'
- 'EDSPER2006'
- 'EDSPER2007'
- 'EDSPER2008: Authentication Token missing'
- 'EDSPER2009: Client Token or Payload is in Invalid format'
- 'EDSPER2010'
- 'EDSPER2011: Client Token or Payload is in Invalid format'
- 'EDSPER2012: Mandatory field ver is missing or invalid'
- 'EDSPER2013: User Login credentials are invalid'
- 'EDSPER2014: Partner-customer relationship verification failed'
- 'EDSPEX2001'
example: "EDSPER2008: Authentication Token missing"
message:
description: "Authorization error description."
type: string
minLength: 1
maxLength: 255
enum:
- 'Unauthorized: invalid authentication credentials'
example: "Unauthorized: invalid authentication credentials"
examples:
Unauthorized:
summary: Unauthorized
description: >-
`JSON Web Token` may contain invalid data parameters - check `Authorization` in `request header`.
Please refer to [API Security at HSBC](#authentication) - Using JWT with Client Private Key.
value:
code: 'EDSPER1005 : JWT token expired'
message: 'Unauthorized: invalid authentication credentials'
RESPONSE_403_TAAS:
description: >-
**Forbidden**
content:
application/json:
schema:
type: object
description: "Forbidden"
properties:
errorInfo:
type: array
items:
type: object
properties:
code:
description: "Forbidden error type."
type: string
maxLength: 255
example: "Saml signing error"
examples:
Forbidden:
summary: Forbidden
description: Saml Signing Error.
value:
code: 'Saml signing error'
RESPONSE_404_TAAS:
description: >-
**Not Found**
content:
text/plain:
schema:
type: string
description: "Resource not found"
maxLength: 18
enum:
- 'resource not found'
examples:
Not_Found:
summary: Not Found
description: Requested Resource not found – double check HTTP URL.
value: 'resource not found'
RESPONSE_500_TAAS:
description: >-
**Internal Server Error**
content:
text/plain:
schema:
description: "Internal Server Error"
type: string
maxLength: 255
examples:
Internal_Server_Error:
summary: Internal Server Error
description: 'Issue encountered within HSBC systems (internal server or solution component is not available)'
value: 'Upstream connect error or disconnect/reset before headers. reset reason: connection failure'
RESPONSE_502_TAAS:
description: >-
**Bad Gateway**
content:
text/plain:
schema:
description: "Bad Gateway"
type: string
maxLength: 255
examples:
Bad_Gateway:
summary: Bad Gateway
description: 'Issue encountered within HSBC systems (internal server or solution component is not available)'
value: 'Bad Gateway'
RESPONSE_503_TAAS:
description: >-
**Service Unavailable**
content:
text/plain:
schema:
description: "Internal Server Error"
type: string
maxLength: 255
examples:
Service_Unavailable:
summary: Service Unavailable
description: 'Issue encountered within HSBC systems (internal server or solution component is not available)'
value: 'Upstream connect error or disconnect/reset before headers. reset reason: connection failure'
RESPONSE_504_TAAS:
description: >-
**Gateway Timeout**
content:
text/plain:
schema:
description: "Gateway Timeout"
type: string
maxLength: 255
examples:
Gateway_Timeout:
summary: Gateway Timeout
description: 'Request Timeout'
value: 'Gateway Timeout'
# Reusable examples
examples:
EncryptedAndBase64Encoded_TAAS:
summary: Encrypted Body - Base64 encoding
description: >-
This is how the encrypted message body would look like. Refer to example from Making an API Request via Sandbox Environment?
value: LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEJDUEcgdjEuNjIKCmhRRU1BME5ITzJHRVpzN2RBUWYvYWw0cTRZdVRscnRqSHVlYURRN1ZKVldiOGdzN3pMT2pBY3BKakJub0pqbnHKYURXNmRKRFFxc1VPelZSQXZtUmpsUEtTbDQ1cmhoSXIvM05JTDFLZDBGQnpTVm5OdXV4eUhiNDVYZDFGOVpJaApKekZmMTdpRkhvUXI1d0hjN1U4UTc1MWxXTVE0T1RJRURVMXVhYXNRR2p5SXRlUzcycmkxYzdlMWdIK0tRenZmCllHU0cxd2ZiTmd6TTdOdkY3dGdLbjZoM2JVcXc2SE5XOHBFNHBxMDczRkcrekU3UUNnNjFFaTB3QUJIbXJjS2MKZEZBTHBWYkhtVFpBMnhZczVOZWVmcEFabnB6WENoanZncU9xMnhLaEl4clJaeXk3RzVESUNNNGhEK0w3ZDQyMApHK0RPcE5OYkdjRmdTbWd5YS94S3BZWXFUN3MwMkdJNmI3SVNoNTRnSDlMQVl3R1VUMDhMU0QzaS9NMExDQ1g4Cmg5OWhsUDZiT3hJalpSbk10OUJCZG52MUZiVnlYUGxiWDJSL2lkZHV5Wnd4MW10LzdlMk96M2Q0dGRzK0hzMU8KZ3lwVVFwM1hzUTYrWlQzVmdwRDFudHg2eWRuR3NSbDBTVnBHbExKZ2hsbXY1SGVWcUpqenVXSndoZnpPZHUxOAp3dVNMNVJDMkRtdHA5UDZFdjY1Y1BoYVRsVGs1SHI5QXg1SWswQnNSbGVhR01XVStMTHNTbTBTSnhzWnlRTEQvCnhWQ0JVTkRFM3pkYXA2RHV6eE04ZXdwblBaclI3amhuRHQ2dXBwcU1ET1JtZlh1Q3VNYThGclRMTFpVL1VoUTEKTTJ3cnVvR0krdHp0c09oZWRhZHZPaDlSSEdyZTA2anFGQ2Jqb1FldkhqT2l0U3Y3MEgyR3F1N2syUVZmK2R0Uwp3U1A1MStHTWx1ekljY3pzNjhVQVNpOUN1dVFnUXdGMVRYclA1SStZUzgxU21CZUxOZz09Cj1WaHI3Ci0tLS0tRU5EIFBHUCBNRVNTQUdFLS0tLS0K
RESPONSE_200_AUTH_ERROR_TAAS:
summary: Unencrypted Response - Authorization Error
description: >-
The `tradeAccountNumber` is not authorized under the `extnlCustomerId`.
value:
code: EMKT105
message: Authentication check failed!
repliedTime: "2023-04-01 00:00:43"
correlationId: null
responseData: null
errorDetails:
code: EMKT400-001,
message: The account number does not match our records.
RESPONSE_200_BAD_REQUEST_PAYLOAD_TAAS:
summary: Unencrypted Response - Bad Request Payload (Format)
description: >-
Invalid inputs in the `request payload`.
- `EMKT400-001` is an example of a request parameter that must not be `empty`.
- `EMKT400-002` is an example of a request parameter's `size` is invalid.
- `EMKT400-003` is an example of a request parameter's is `missing`.
- `EMKT400-004` is an example of a request parameter's `format` is invalid.
- `EMKT400-005` is an example of a request parameter's `format` (within an `object`) is invalid.
- `EMKT400-006` is an example of a request parameter's `format` (within `array[0]`) is invalid.
value:
code: EMKT400
message: Bad request payload
repliedTime: "2023-04-01 00:00:43"
correlationId: null
responseData: null
errorDetails:
- code: EMKT400-001,
message: paraName001 must not be blank.
- code: EMKT400-002,
message: paraName002 size must be between 0 and 30
- code: EMKT400-003
message: paraName003 cannot be deleted, please input null value instead of deleting optional parameter.
- code: EMKT400-004,
message: dateName004 data entered in incorrect format.
- code: EMKT400-005,
message: objectName005.paramName001 must not be blank.
- code: EMKT400-006,
message: arrayName006[0].paramName001 must not be blank.
- code: EMKT400-0XX,
message: The miscStates should be a json string.
RESPONSE_200_BAD_REQUEST_HEADER_TAAS:
summary: Unencrypted Response - Bad Request Header (EMKT105)
description: >-
Missing parameter(s) in `request header`. Please validate'
value:
code: EMKT105
message: Authentication check failed!
repliedTime: "2023-04-01 00:00:43"
correlationId: "efbf054e8f9c477493bfb3d2a19781b2"
responseData: null
errorDetails:
- code: EMKT121,
message: Not found requestId in header
- code: EMKT122,
message: Not found requestTime in header
RESPONSE_200_DECRYPTION_FAILURE_TAAS:
summary: Unencrypted Response - Decryption Failure (EMKT103)
description: 'HSBC systems unable to decrypt the request. Please verify credentials and encryptions'
value:
code: EMKT103
message: DECRYPTION_FAILURE
repliedTime: "2023-04-01 00:00:43"
correlationId: "efbf054e8f9c477493bfb3d2a19781b2"
responseData: null
errorDetails:
- code: EMKT103,
message: DECRYPTION_FAILURE
RESPONSE_200_GATEWAY_TIMEOUT_TAAS:
summary: Unencrypted Response - Gateway Timeout (EMKT107)
value:
code: EMKT107
message: GATEWAY_TIMEOUT
repliedTime: "2023-04-01 00:00:43"
correlationId: "efbf054e8f9c477493bfb3d2a19781b2"
responseData: null
errorDetails:
- code: EMKT107,
message: GATEWAY_TIMEOUT
RESPONSE_200_INTERNAL_SERVER_ERROR_TAAS:
summary: Unencrypted Response - Internal Server Error (EMKT102)
description: 'Request successfully authenticated by gateway, however issue encountered within HSBC downstream systems (internal server or solution component is not available)'
value:
code: EMKT102
message: INTERNAL_SERVER_ERROR
repliedTime: "2023-04-01 00:00:43"
correlationId: "efbf054e8f9c477493bfb3d2a19781b2"
responseData: null
errorDetails:
- code: EMKT102,
message: INTERNAL_SERVER_ERROR
RESPONSE_200_INTERNAL_EXCHANGE_FAILED_TAAS_WDM:
summary: Unencrypted Response - Internal Exchange Failed (EMKT106)
description: 'Request successfully authenticated by gateway, however issue encountered within HSBC downstream systems (internal server or solution component is not available)'
value:
code: EMKT500
message: Internal exchange failed!
repliedTime: "2023-04-01 00:00:43"
correlationId: "efbf054e8f9c477493bfb3d2a19781b2"
responseData: null
errorDetails:
- code: EMKT106,
message: Internal exchange failed! The Bank workflow system currently offline.
parameters:
# Common Headers
# Reusable Headers (Use these headers for TaaS Eb2b)
Authorization:
name: Authorization
in: header
description: >
Your Digital Identity, which is a private-key-signed Bearer Token
generated per request with the prefix JWS
.
What is Bearer Token ?
required: true
schema:
type: string
example: 'JWS eyJ2ZXIiOiIxLjAiLCJraWQiOiIy...'
requestTime:
name: requestTime
in: header
description: >-
Timestamp of the HTTP request generated, format as per RFC3339 Section5.6
Timezone: UTC
Understand RFC3339 Section5.6.
required: true
schema:
allOf:
- $ref: '#/components/schemas/DateTime_TAAS'
example: '2023-04-01 00:00:00'
requestId:
name: requestId
in: header
description: >-
The unique identifier (UUID) of request triggered to access HSBC API service, generated by your platform. Eliminate hyphens -
in the UUID.
What is Universally unique identifier (UUID)?
Note for Try it now
:
To trigger mock responses, use theses value: SUCCESS
, BAD_REQUEST
, INTERNAL_ERROR
. How to make a mock request?
required: true
schema:
allOf:
- oneOf:
- allOf:
- $ref: '#/components/schemas/Uuid_TAAS'
- minLength: 32
- title: MockRequest
type: string
enum:
- 'SUCCESS'
- 'BAD_REQUEST'
- 'INTERNAL_ERROR'
example: '70c2d301d23f453bac5eebb64eb91860'
countryCode:
name: countryCode
in: header
description: >-
Specify which country/ market this request is generated, format as per ISO 3166 Alpha-2-code.
What is ISO3166 Alpha-2-code?
Find out which countries/ markets are supported?
required: true
schema:
allOf:
- $ref: '#/components/schemas/ISOCountryCode'
- minLength: 2
example: 'SG'
Content-Type:
name: Content-Type
in: header
description: >-
Specify media type of the request.
- Default media type is
application/json
.
- For certain countries/ regions,
text/plain
will be used.
required: true
schema:
type: string
enum:
- 'application/json'
- 'text/plain'
default: 'application/json'
example: 'application/json'
schemaVersion:
name: schemaVersion
in: header
description: API Version
required: true
schema:
type: string
enum:
- '1.0'
example: '1.0'
x-hsbc-profile-id:
name: x-hsbc-profile-id
in: header
required: true
schema:
type: string
pattern: ^/d{1,2}
example: '24'
x-hsbc-client-id:
name: x-hsbc-client-id
in: header
required: true
schema:
$ref: '#/components/schemas/Uuid_TAAS'
example: '70c2d301d23f453bac5eebb64eb91860'
x-hsbc-client-secret:
name: x-hsbc-client-secret
in: header
required: true
schema:
$ref: '#/components/schemas/Uuid_TAAS'
example: '70c2d301d23f453bac5eebb64eb91860'
# Security scheme definitions
securitySchemes:
BearerTokenJWS: # JSON Web Token
type: apiKey
in: header
name: Authorization
description: >-
Your **Digital Identity**, which is a **private-key-signed** `Bearer Token` generated **per request**, must be sent via `Authorization` in the request `header`. [What is Bearer Token ?](#authentication)
example: `JWS eyJ2ZXIiOiIxLjAiLCJraWQiOiJFMzYzQ0VGRjAwMThBMjAyIiwid...`