Subscribe and Download File Reports
Report subscriptions allow customers to subscribe to file based reports and download them for their intraday or end of day reconciliation requirements.
Step by step guide
Step 1 - Create subscription for the desired file reports
Our first step is to create a subscription for an intraday or end-of-day file report, specifying the report format (e.g. BAI, CAMT) and other related details. To do this you will need to utilize the subscription APIs.
POST /v1/subscription
will create the file report subscription.
Representative payload for end-of-day report:
{
"subscriptionType": "FILE_REPORT",
"typeSpecificSubscriptionInfo": {
"reportType": "EOD_STATEMENT", // EOD_STATEMENT or INTRADAY_REPORT
"reportFormat": "BAI2", // BAI2, CAMT52, CAMT53
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"deliveryMethod": "API"
}
}
Representative response with the details of the subscription created.
{
"subscriptionType": "FILE_REPORT",
"subscriptionId": "a48e2a74684148e0b7828eb595975027", // Unique identifier assigned by TxB
"typeSpecificSubscriptionInfo": {
"reportType": "EOD_STATEMENT",
"reportFormat": "BAI2",
"reportNamePrefix": null,
"frequency": null,
"transactionScope": null,
"reportIfNoTransactions": null,
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"deliveryMethod": "API"
}
}
Step 2 - Query the file reports generated by TxB
Once you have created the subscription, TxB will now generate the transaction file reports depending on the details provided in the subscription. You should use the API POST /v2/documents/query
which will return a list of file reports generated.
Representative payload to query end-of-day reports in BAI2 format:
{
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"documentData": {
"reportFormat": "BAI2",
"reportCategory": "EOD_STATEMENT", // EOD_STATEMENT, INTRADAY_REPORT
"startDateTime": "2024-06-01T00:00:00Z"
}
}
Representative response with list of generated reports:
{
"documentData": [
{
"reportName": "BAI2_2024-06-04T20_00_05.224629_EoD_report.BAI",
"reportFormat": "BAI2",
"reportId": "13132891",
"reportCategory": "EOD_STATEMENT",
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"linkUrl": "https://api.test.txb.gs.com/v2/documents/eyJnk...jyWux0/file",
"reportScopeStartTime": "2024-06-04T00:00:00Z",
"reportScopeEndTime": "2024-06-04T23:59:59Z"
},
{
"reportName": "BAI2_2024-06-02T20_00_11.931953_EoD_report.BAI",
"reportFormat": "BAI2",
"reportId": "13121563",
"reportCategory": "EOD_STATEMENT",
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"linkUrl": "https://api.test.txb.gs.com/v2/documents/eyJlbm...6DQgQ/file",
"reportScopeStartTime": "2024-06-02T00:00:00Z",
"reportScopeEndTime": "2024-06-02T23:59:59Z"
}
]
}
Step 3 - Download a file report
The response data from the previous step, contains an array of report objects with a linkUrl
included for each, representing the file reports generated.
To download a particular file report, you have to invoke the corresponding linkUrl
.
Note: The link is only valid for 5 days, after which date you will need to repeat step 2.
Step 4 (Optional) - Get details of created report subscriptions
If you want to get the details of all the subscriptions, created by you, the API GET /v1/subscriptions
returns the full list.
[
{
"subscriptionType": "FILE_REPORT",
"subscriptionId": "a48e2a74684148e0b7828eb595975027",
"typeSpecificSubscriptionInfo": {
"reportType": "EOD_STATEMENT",
"reportFormat": "BAI2",
"reportNamePrefix": null,
"frequency": null,
"transactionScope": null,
"reportIfNoTransactions": null,
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"deliveryMethod": "API"
}
},
{
"subscriptionType": "FILE_REPORT",
"subscriptionId": "4ee1f3c071674addaa8bbe84e13deade",
"typeSpecificSubscriptionInfo": {
"reportType": "INTRADAY_STATEMENT",
"reportFormat": "CAMT52",
"reportNamePrefix": null,
"frequency": 30,
"transactionScope": "INCREMENTAL",
"reportIfNoTransactions": null,
"entityId": "2481F41D17064198BDAA16A7CBC91D70",
"deliveryMethod": "API"
}
}
]
Step 5 (Optional) - Update a report subscription
If you want to modify any particular subscription (e.g., updating the report format or report type), then follow the steps:
- Delete the subscription using the API
DELETE /v1/subscription/{subscriptionId}
- Create a new subscription with updated information, as mentioned in step 1.
Was this page useful?
Give feedback to help us improve developer.gs.com and serve you better.