Professional Documents
Culture Documents
Version 3.0
Contents
1 Process Flow 5
1.1 Perfios Insights Document Upload API Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 How Does It Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Signing Requests 6
2.1 Step 1. Create a canonical request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Step 2. Use the canonical request and additional metadata to create a string for signing . . . . . . . . . . 8
2.3 Step 3. Calculate a SHA256 checksum of the string to sign . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Step 4. Sign the checksum using the client’s RSA Private Key to create the signature . . . . . . . . . . . 8
2.5 Step 5. Add signature to the HTTP request in a header . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Note on URLs 8
1
Perfios Insights Statement Upload API Contents
5.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
v 2.0 2
Perfios Insights Statement Upload API Contents
9.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
11.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
v 2.0 3
Perfios Insights Statement Upload API Contents
12.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.3 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
13.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
14.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
15.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
v 2.0 4
Perfios Insights Statement Upload API 1 Process Flow
1 Process Flow
This section describes the high level process flow of the Perfios Insights API for Document Upload. Perfios Insights API
can be used to automate and expedite the processing of application in the financial sector, as listed below
• Income document submission as part of application processing for loan, credit card, Insurance etc.
• Initiate Transaction
• Cancel Transaction
• Delete Transaction
• Upload File
• Process Statement
• Re-Process Statement
• Report Generation
• Retrieve Report
• Re-Process Transaction
v 2.0 5
Perfios Insights Statement Upload API 2 Signing Requests
• Step 1: The client starts by initiating a transaction using the Initiate Transaction API. This API returns a
response containing a time-limited perfiosTransactionId that the client can use to upload documents. The
perfiosTransactionId is valid for 60 minutes.
• Step 2: The client then proceeds to upload a file using the Upload File API. One file can be uploaded per API
call. This API returns a response with a file ID.
• Step 3: The client processes the uploaded file using the Process Statement API. This API returns the list of
ALL bank accounts processed so far (i.e. cumulative) if everything goes well.
• Step 4: After uploading and processing all documents the client invokes the Report Generation API to complete
the transaction. Perfios tries to generate one or more reports (XML, PDF, XLS, XLSX, JSON ) using the data from
the uploaded documents. This API returns a response indicating if the process succeeded.
• Step 5: After Step 4 succeeds, the client can use the Retrieve Report API to retrieve the report(s) generated for
this Transaction.
2 Signing Requests
This API introduces a major change in the way requests are signed.
2. Use the canonical request and additional metadata to create a string for signing
v 2.0 6
Perfios Insights Statement Upload API 2 Signing Requests
4. Sign the checksum using the client’s RSA Private Key to create a signature (SHA256withRSA/PSS)
Where:
CanonicalUri = UriEncode(path)
E.g.
• https://app.perfios.com/KuberaVault/api/v3/organisations/acme/transactions
– Path is /KuberaVault/api/v3/organisations/acme/transactions
• https://app.perfios.com/KuberaVault/api/v3/organisations/acme/transactions/G7BW1549868724968/report
The following headers are deemed ’canonical’, and must be used in the above calculation:
1. Host
2. X-Perfios-Content-Sha256
3. X-Perfios-Date
PayloadOrEmptyString = Payload iff request requires XML/JSON payload, else empty string ""
v 2.0 7
Perfios Insights Statement Upload API 3 Note on URLs
2.2 Step 2. Use the canonical request and additional metadata to create a string for
signing
1. Start with the algorithm designation, followed by a newline character. Algorithm is PERFIOS-RSA-SHA256 (note
that this is the value of the mandatory header, X-Perfios-Algorithm)
2. Append the request date value, followed by a newline character. (note that this request date (RequestDate) is
the value of the mandatory header, X-Perfios-Date in the format YYYYMMDD'T'HHMMSS'Z'
3. Append the lowercase, Base 16 encoded, Sha256 hash of the canonical request created in the previous step
I.e.
For e.g.:
Checksum = Lowercase(Hex(Sha256(StringToSign)))
2.4 Step 4. Sign the checksum using the client’s RSA Private Key to create the signa-
ture
Signature = Lowercase(Hex(RSA-Private-Key-Signed(Checksum)))
Add the X-Perfios-Signature header to the HTTP request, with the signature as its value.
3 Note on URLs
• https://host-name/KuberaVault/api/v3
v 2.0 8
Perfios Insights Statement Upload API 4 API : Initiate Transaction
• UAT: demo.perfios.com
4.1 URL
• /organisations/{organisationName}/transactions
POST
`application/xml`
`application/json`
XML:
v 2.0 9
Perfios Insights Statement Upload API 4 API : Initiate Transaction
<uploadingScannedStatements>true</uploadingScannedStatements>
<yearMonthFrom>2015-11</yearMonthFrom>
<yearMonthTo>2016-02</yearMonthTo>
</payload>
JSON:
{
"payload": {
"loanAmount": "100000",
"loanDuration": "24",
"loanType": "Home",
"processingType": "STATEMENT",
"transactionCompleteCallbackUrl": "https://example.com/callback",
"txnId": "PQ1342687YTX",
"acceptancePolicy": "atLeastOneTransactionPerMonthInRange",
"institutionId": "2",
"uploadingScannedStatements": "true",
"yearMonthFrom": "2015-11",
"yearMonthTo": "2016-02"
}
}
v 2.0 10
Perfios Insights Statement Upload API 4 API : Initiate Transaction
Perfios supports two types of documents: scanned (image), and e-documents (text-only). Of the two, scanned documents
are not immediately processed. Instead they are accepted for processing, and are processed later. The client will receive
a call back after processing completes (successfully or otherwise).
XML:
JSON:
v 2.0 11
Perfios Insights Statement Upload API 4 API : Initiate Transaction
"transaction": {
"perfiosTransactionId": "ZZZZ1234567890123"
}
}
Note: Client will need to use this perfiosTransactionId parameter in subsequent API calls.
See subsequent sections for a complete listing of API and Document Error Codes.
XML:
JSON:
{
"error": {
"code": "MethodNotAllowed",
"message": "The specified method is not allowed for the API"
}
}
The following table lists possible values for API error codes applicable to this API for all processing types.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
DateRangeTooLarge The date range specified by the Client exceeds the contractually 400
permitted limit
InternalError We encountered an internal error. Please try again. 500
InvalidInstitution Client has sent an institutionId that is not supported by Perfios 400
MalformedXML Client has sent malformed XML for the API 400
MethodNotAllowed The specified method is not allowed for the API 405
v 2.0 12
Perfios Insights Statement Upload API 5 API : Cancel Transaction
HTTP
Status
Error Code Description Code
MissingHeaders Client has not sent one or more mandatory request headers 400
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header 400
value
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionLimitExceeded Client has exceeded the limit for number of transactions. 403
UnsupportedDocumentType Client is not permitted to process this type of document. 415
UnsupportedMediaType Client is not permitted this media type. 415
UnsupportedProcessingType Client is not permitted this processing type. 415
XMLSchemaMismatch XML sent by the client does not match the expected Schema 400
4.11 Note
See the last section for detailed notes on date range, acceptance policy and transaction complete callback.
5.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}?cancel
POST
v 2.0 13
Perfios Insights Statement Upload API 5 API : Cancel Transaction
`application/xml`
`application/json`
See subsequent sections for a complete listing of API and Document Error Codes.
XML:
JSON:
{
"error": {
"code": "NoActiveTransaction",
"message": "We could not find an active transaction corresponding to this transaction Id"
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
AccessDisabled Client access is disabled 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
v 2.0 14
Perfios Insights Statement Upload API 6 API : Delete Transaction
HTTP
Status
Error Code Description Code
NotSignedUp Client has not signed up for the 403
Perfios Insights Service
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
6.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}
DELETE
`application/xml`
`application/json`
See subsequent sections for a complete listing of API and Statement Error Codes.
XML:
v 2.0 15
Perfios Insights Statement Upload API 7 API : Upload File
JSON:
{
"error": {
"code": "TransactionDeleted",
"message": "The Perfios Transaction referred to by the Client has been deleted"
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
AccessDisabled Client access is disabled 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
NotSignedUp Client has not signed up for the Perfios Insights Service 403
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
TransactionStateConflictThe Perfios Transaction referred to by the Client is awaiting further 400
processing
After starting the transaction, upload files one by one using this API. Send multi-part POST requests with the one file per
request.
v 2.0 16
Perfios Insights Statement Upload API 7 API : Upload File
7.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/files
POST
multipart/form-data
This API expects a multi-part request, with the contents of one file per call
XML:
JSON:
{
"file": {
"fileId": "b09051b4ab2859b4ea66cc1a0128fa684e6c49f3"
}
}
v 2.0 17
Perfios Insights Statement Upload API 8 API : Process Statement
XML:
JSON:
{
"error": {
"code": "MethodNotAllowed",
"message": "The specified method is not allowed for the API"
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
CannotProcessFile We could not process the statement file uploaded by the Client 400
FileTooLarge Client tried to upload a file whose size is larger than the maximum allowed 400
InsecureFileType Client tried to upload an insecure file type (executable, DLL, JAR, etc.) 400
InternalError We encountered an internal error. Please try again. 500
LimitExceeded Client cannot upload more files for this transaction 403
MethodNotAllowed The specified method is not allowed for the API 405
NoActiveTransaction We could not find an active transaction corresponding to this transaction 404
Id
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
TransactionLimitExceeded
Client has exceeded the limit for number of transactions. 403
UnsupportedFileType We could not find the Perfios Transaction referred to by the Client 404
The Client can try to process an uploaded file as a statement using this API.
v 2.0 18
Perfios Insights Statement Upload API 8 API : Process Statement
8.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/bank-statements
POST
`application/xml`
`application/json`
XML:
JSON:
{
"payload": {
"fileId": "09133d7543de5df7f610ec28c1a334d39f61306c",
"institutionId": "22",
"password": "topSecret!"
}
}
v 2.0 19
Perfios Insights Statement Upload API 8 API : Process Statement
XML:
JSON:
{
"bankStatement": {
"bankAccounts": [
{
"accountId": "fec4b3f2fd9fec90e03de0f564a34c37417df2af",
"accountNumber": "XXXXXXXXXXXX0297",
"accountType": "Current",
"complete": true,
"institutionId": 30,
"missingMonths": []
}
]
}
}
v 2.0 20
Perfios Insights Statement Upload API 8 API : Process Statement
XML:
JSON:
{
"error": {
"code": "MethodNotAllowed",
"message": "The specified method is not allowed for the API"
}
}
The following table lists API error codes applicable to this API.
The following table lists API error codes applicable to this API.
v 2.0 21
Perfios Insights Statement Upload API 9 API : Re-Process Statement
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
CannotProcessFile We could not process the statement file uploaded by the Client 400
InternalError We encountered an internal error. Please try again. 500
MalformedXML Client has sent malformed XML for the API 400
MethodNotAllowed The specified method is not allowed for the API 405
MissingHeaders Client has not sent one or more mandatory request headers 400
NoActiveTransaction We could not find an active transaction corresponding to this 404
transaction Id
NotSignedUp Client has not signed up for the Perfios Insights Service 403
ProcessingTypeDoesNotMatch
Processing type does not match the type provided during transaction 400
initiation
RemoteAddressNotPermittedClient is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header 400
value
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
TransactionLimitExceeded Client has exceeded the limit for number of transactions. 403
UnsupportedMediaType Client is not permitted this media type. 415
XMLSchemaMismatch XML sent by the client does not match the expected Schema 400
Sometimes the Client may need to re-process a statement. E.g. if Perfios detects that the statement requires a password,
then the (error) response from the Process API will indicate as much. The Client can call the Re-Process API and supply
the password to process the statement again.
9.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/bank-statements/{statementFil
v 2.0 22
Perfios Insights Statement Upload API 9 API : Re-Process Statement
POST
`application/xml`
`application/json`
XML:
JSON:
{
"payload": {
"institutionId": "22",
"password": "topSecret!"
}
}
XML:
JSON:
{
"bankStatement": {
"bankAccounts": [
{
"accountId": "fec4b3f2fd9fec90e03de0f564a34c37417df2af",
"accountNumber": "XXXXXXXXXXXX0297",
"accountType": "Current",
"complete": true,
"institutionId": 30,
"missingMonths": []
}
]
}
}
XML:
v 2.0 24
Perfios Insights Statement Upload API 9 API : Re-Process Statement
JSON:
{
"error": {
"code": "MethodNotAllowed",
"message": "The specified method is not allowed for the API"
}
}
The following table lists API error codes applicable to this API.
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
CannotProcessFile We could not process the statement file uploaded by the Client 400
InternalError We encountered an internal error. Please try again. 500
MalformedXML Client has sent malformed XML for the API 400
v 2.0 25
Perfios Insights Statement Upload API 10 API : Report Generation
HTTP
Status
Error Code Description Code
MethodNotAllowed The specified method is not allowed for the API 405
MissingHeaders Client has not sent one or more mandatory request headers 400
NoActiveTransaction We could not find an active transaction corresponding to this 404
transaction Id
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header 400
value
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
TransactionLimitExceededClient has exceeded the limit for number of transactions. 403
XMLSchemaMismatch XML sent by the client does not match the expected Schema 400
After processing sufficient files the client can try generate reports for this transaction. Reports are not immediately
generated. Instead they are accepted for generation. The client will receive a call back after report generation completes
(successfully or otherwise).
10.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/reports
POST
v 2.0 26
Perfios Insights Statement Upload API 11 API : Retrieve Reports
`application/xml`
`application/json`
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
MethodNotAllowed The specified method is not allowed for the API 405
MissingHeaders Client has not sent one or more mandatory request headers 400
NoActiveTransaction We could not find an active transaction corresponding to this transaction 404
Id
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header value 400
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
TransactionLimitExceeded
Client has exceeded the limit for number of transactions. 403
After processing sufficient files the client can try generate reports for this transaction.
11.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/reports?types={types}
v 2.0 27
Perfios Insights Statement Upload API 11 API : Retrieve Reports
GET
`application/xml`
`application/json`
The following table lists API error codes applicable to this API.
v 2.0 28
Perfios Insights Statement Upload API 12 API : Reprocess Transaction
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
ArtifactNotFound We could not find the Transaction artifact referred to by the client 404
BadParameter One or more parameters sent by the Client are wrong 400
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
MissingHeaders Client has not sent one or more mandatory request headers 400
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header value 400
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotCompleted The Perfios Transaction referred to by the Client has not been completed 400
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
This API allows clients to reprocess online transactions. Transactions can be reprocessed for the following purposes:
The API behaves differently based on the status of the transaction being reprocessed.
• An already completed transaction (Case 2) is first copied into a new transaction, and the new transaction is re-
processed. This allows clients to retrieve the original and enhanced reports from the existing and newly created
transactions respectively.
v 2.0 29
Perfios Insights Statement Upload API 12 API : Reprocess Transaction
12.1 Example 1
The transaction is modified, reports are generated, and the API responds as follows:
12.2 Example 2
The customer decides to reprocess this transaction after providing some more additional parameters.
A new transaction is created (say AAAA1400067155303), reports are generated, and the API responds as follows:
Note how the Perfios transaction ID changes. The API has responded with the transaction ID of the new transaction.
v 2.0 30
Perfios Insights Statement Upload API 12 API : Reprocess Transaction
12.3 URL
• /organisations/{organisationName}/transactions/reprocess
POST
Yes
v 2.0 31
Perfios Insights Statement Upload API 12 API : Reprocess Transaction
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
AccessDisabled Client access is disabled 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
BadParameter One or more parameters sent by the Client are wrong 400
CannotProcessTransaction
The Perfios Transaction referred to by the Client cannot be processed 400
v 2.0 32
Perfios Insights Statement Upload API 13 API : List Institutions
HTTP
Status
Error Code Description Code
DateRangeTooLarge The date range specified by the Client exceeds the contractually permitted 400
limit
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
LimitExceeded Client has reached or exceeded the limit for making this request 403
MalformedXML Client has sent malformed XML for the API 400
MethodNotAllowed The specified method is not allowed for the API 405
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionDataDeleted Original data associated with the Perfios Transaction referred to by the 410
Client have been deleted
TransactionDeleted The Perfios Transaction referred to by the Client has been deleted 410
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
TransactionLimitExceeded
Client has exceeded the limit for number of transactions. 403
13.1 URL
• /organisations/{organisationName}/institutions?processingType={}&dataSource={}
v 2.0 33
Perfios Insights Statement Upload API 13 API : List Institutions
• E.g. ?processingType=NETBANKING_FETCH: to
fetch supported institutions for
NETBANKING_FETCH processing type
GET
`application/xml`
`application/json`
XML:
v 2.0 34
Perfios Insights Statement Upload API 14 API : Transaction Status
</institution>
</institutions>
JSON:
{
"institutions": {
"institution": [
{
"id": 3,
"institutionType": "bank",
"name": "ADCB, India"
}
]
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
MethodNotAllowed The specified method is not allowed for the API 405
MissingHeaders Client has not sent one or more mandatory request headers 400
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header value 400
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
UnsupportedProcessingType
Client is not permitted this processing type 415
Clients can use this API to find out the status of the Transaction.
v 2.0 35
Perfios Insights Statement Upload API 14 API : Transaction Status
14.1 URL
• /organisations/{organisationName}/transactions/{perfiosTransactionId}/status
GET
`application/xml`
`application/json`
XML:
JSON:
{
"transactions": {
"transaction": [
v 2.0 36
Perfios Insights Statement Upload API 14 API : Transaction Status
{
"clientTransactionId": "PQ1342687YTX",
"errorCode": "E_NO_ERROR",
"perfiosTransactionId": "ZZZZ1234567890123",
"reason": "",
"reportAvailable": true,
"status": "COMPLETED"
}
]
}
}
XML:
JSON:
{
"error": {
"code": "TransactionNotFound",
"message": "We could not find the Perfios Transaction referred to by the Client"
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
MethodNotAllowed The specified method is not allowed for the API 405
v 2.0 37
Perfios Insights Statement Upload API 15 API : Bulk Transaction Status
HTTP
Status
Error Code Description Code
MissingHeaders Client has not sent one or more mandatory request headers 400
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header value 400
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TooManyRequests Client has exceeded number of requests allowed per minute 429
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
Clients can use this API to find out the status of the Transactions in bulk.
15.1 URL
• /organisations/{organisationName}/transactions/status?startTime={startTime}&endTime={endTime}
GET
`application/xml`
`application/json`
v 2.0 38
Perfios Insights Statement Upload API 15 API : Bulk Transaction Status
XML:
JSON:
{
"transactions": {
"transaction": [
{
"clientTransactionId": "PQ1342687YTX",
"errorCode": "E_NO_ERROR",
"perfiosTransactionId": "NCZ61551262987290",
"reason": "",
"reportAvailable": true,
"status": "COMPLETED"
}
]
}
}
XML:
JSON:
v 2.0 39
Perfios Insights Statement Upload API 16 Notes on Some Topics
{
"error": {
"code": "TransactionNotFound",
"message": "We could not find the Perfios Transaction referred to by the Client"
}
}
The following table lists API error codes applicable to this API.
HTTP
Status
Error Code Description Code
AccessDenied Client is not permitted to access this URL 403
ApiVersionNotPermitted Client is not permitted to access this Api Version 403
InternalError We encountered an internal error. Please try again. 500
InvalidEncryption We are unable to decrypt the signature using the RSA public key for this 400
client
MethodNotAllowed The specified method is not allowed for the API 405
MissingHeaders Client has not sent one or more mandatory request headers 400
NotSignedUp Client has not signed up for the Perfios Insights Service 403
RemoteAddressNotPermitted
Client is not permitted to access the API from this remote address 403
ResourceNotFound Resource not found 403
Sha256SumMismatch Calculated SHA256 checksum of the payload does not match header value 400
SignatureDoesNotMatch The request signature we calculated does not match the signature you 400
provided.
TransactionNotFound We could not find the Perfios Transaction referred to by the Client 404
• If the client does not supply yearMonthFrom and yearMonthTo, then the date range is calculated using informa-
tion (number of months of data required) specified by the client at the time of signing up with Perfios.
• If the client supplies yearMonthFrom and yearMonthTo then the start and end dates are calculated as follows:
v 2.0 40
Perfios Insights Statement Upload API 16 Notes on Some Topics
• If the client does not supply acceptancePolicy, then the acceptance policy is calculated based on the
processingType as follows:
• Only FULL months in the given range are considered while testing for acceptance. See the below for examples.
monthFrom monthTo Current Date Full Months Transaction available for Accepted?
Feb 2016 May 2016 11 May 2016 3 (Feb-Apr) May NO
Feb 2016 May 2016 31 May 2016 4 (Feb-May) May YES
Feb 2016 May 2016 31 May 2016 4 (Feb-May) Feb, Mar YES
monthFrom monthTo Current Date Full Months Transaction available for Accepted?
Feb 2016 May 2016 11 May 2016 3 (Feb-Apr) Feb, May NO
Feb 2016 May 2016 11 May 2016 3 (Feb-Apr) Feb, Apr, May YES
Feb 2016 May 2016 31 May 2016 4 (Feb-May) Feb, Apr YES
monthFrom monthTo Current Date Full Months Transaction available for Accepted?
Feb 2016 May 2016 11 May 2016 3 (Feb-Apr) Feb, Mar, May NO
Feb 2016 May 2016 11 May 2016 3 (Feb-Apr) Feb, Mar, Apr, May YES
Feb 2016 May 2016 31 May 2016 4 (Feb-May) Feb, Mar, Apr, May YES
v 2.0 41
Perfios Insights Statement Upload API 16 Notes on Some Topics
X-Perfios-Callback-TypeDescription
TRANSACTION_COMPLETE Callback happened after transaction completed (successfully or otherwise).
• Request content type will be application/json or application/xml. All data will be sent as part of request
parameters. See next tables for request parameters details.
status Description
COMPLETED Transaction completed successfully
ERROR There was an error processing the transaction
ERROR_USER Transaction did not succeed due to an user error
ERROR_SITE Transaction did not succeed due to a (bank) website error
ERROR_SESSION_EXPIRED User walked away without providing any useful inputs
CANCELLED User cancelled the transaction
REJECTED Perfios rejected the transaction
v 2.0 42
Perfios Insights Statement Upload API 16 Notes on Some Topics
errorCode Description
E_AMOUNT_BALANCE_MISMATCH Calculated amounts/balances do not match actual values
E_API_SESSION_EXPIRED API session expired without the client taking any further action
E_BALANCE_SHEET_MISMATCH Assets and liabilities do not match in the balance sheet
E_AA_CONSENT_REJECTED Consent rejected while fetching data from account aggregator
E_AA_DATA_FETCH Error while fetching data from account aggregator
E_AA_INVALID_HANDLE User provided invalid AA handle
E_AA_SESSION_EXPIRY User session expired at AA page
E_DATE_RANGE No bank transactions in the expected date range
E_FILE_EDITOR_BLACKLISTED User uploaded a file edited by a blacklisted editor
E_FILE_IO Cannot open uploaded file
E_FILE_MALWARE Detected malware in uploaded file
E_FILE_NOT_STATEMENT Uploaded file is not a valid bank statement
E_FILE_NO_PASSWORD No password provided to open a password protected file
E_FILE_UNSUPPORTED_FORMAT Unsupported file format
E_FILE_WRONG_PASSWORD Wrong password provided to open a password protected file
E_INCOMPLETE_MONTHS Statement(s) uploaded contain incomplete months
E_MISSING_TRANSACTIONS One or more transactions are missing in the specified date range
E_MULTIPLE_ERRORS There were multiple errors
E_NOT_ACCEPTED Transaction did not meet the criteria set by acceptance policy
E_NO_ACCOUNT User has no bank accounts
E_NO_ERROR No errors
E_OTHER Some other error occurred
E_PL_MISMATCH Profit and loss mismatch
E_SITE Site error
E_STATEMENT_DUPLICATE User has uploaded duplicate statements
E_STATEMENT_ERRONEOUS_DATA Statement contains erroneous data
E_STATEMENT_MULTIPLE_ACCOUNTS Statement contains data from more than one bank account
E_STATEMENT_NO_TRANSACTIONS Statement contains no transactions
E_STATEMENT_POOR_QUALITY Cannot process statement due to poor quality
E_STATEMENT_TOO_MANY_PAGES Statement uploaded by user contains more pages than allowed
E_STATEMENT_UNSUPPORTED_FORMAT Unsupported statement format
E_STATEMENT_UNSUPPORTED_INSTITUTION
User uploaded statement for an institution not supported by Perfios
E_STATEMENT_WRONG_FORMAT Wrong statement format
E_STATEMENT_WRONG_INSTITUTION User uploaded statement for wrong institution
E_SYSTEM System (Perfios) error
E_USER_ACTION Error caused by User action
E_USER_BLOCKED User blocked for providing wrong user name or password for
institution(s) multiple times
E_USER_CANCELLED Perfios transaction was cancelled by user
E_USER_MULTIPLE_ACCOUNTS User has uploaded statements from multiple accounts
E_USER_SESSION_EXPIRED Session expired without the user taking any further action
E_WRONG_CREDENTIALS User provided wrong user name or password for institution
• Perfios expects an HTTP 200 OK response from the URL on receipt of callback request
v 2.0 43
Perfios Insights Statement Upload API 16 Notes on Some Topics
• If the first attempt fails, Perfios will try again two more times at regular intervals of five minutes (300 seconds)
• If a transaction concludes successfully, use the Retrieve Reports and Statements API to download the generated
report(s) and other artifacts.
• If a transaction does not conclude successfully, use the Transaction Status API to find out more details about why.
Transaction callback URLs must be whitelisted with Perfios before integration. Perfios will reject API requests that ask
for callbacks to non-whitelisted URLs (API will respond with HTTP 400 Bad Request).
Perfios will suspend callbacks to an URL if three attempts to execute callback to that URL fails (i.e. returns any response
other than HTTP 200 OK) Perfios will reject API requests that ask for callbacks to suspended URLs.
v 2.0 44