Report API

The report API is used to retrieve daily transaction reports by month and retrieve reports available for download by date ranges.

📘

All daily transaction reports generated by Azupay are available for download via our Report API. Daily transaction reports include all completed/settled transactions made to your business in a 24 hour period (12am - 11:59pm) and should be utilised to reconcile transactions with regular sweep amount.

API References

APIDescriptionMethod
Get ReportsAllows you to query a month or date range for all available reports. A list of reports available for the queried period will be returned with unique reportIds that can be used as input for the Get Report download URL API.GET
Get Report download UrlGets a short lived (1 minute) url to access a report for a reportId provided to the API.GET

Using the Report API

You can supply month + timezone query parameters OR you can supply fromDate + toDate. The former provides you a list of all reports automatically generated by Azupay in the specified month, whilst the latter provides you with a report for the date range specified.

All reports generated by Azupay are available for download via our API using three simple steps:

  • Get the list of reports
  • Get the report's temporary download URL
  • Finally, download the report

Parameter Query Options

We support two types of queries for downloading reports, which can be utilised by updating the parameters supplied in the URL.

These options are:

  • Get Reports by Month. This option uses our daily generated report. These reports are generated by our system each day based on your report generation configuration, which by default will be at 6:15AM AEDT / 5:15 AEST. On request, file generation can be configured for 2.00 AM AEDT / 1:00AM AEST.
  • Get Report by from and to date time. This option dynamically generates a report that includes up to 10,000 transactions based on the provided from and to date time. If using this option and more than 10,000 transactions are returned, a moreResultsPossible value will be provided in the response body, and you must implement handling logic to generate additional reports based on the last observed transaction datetime on the initial report returned. This can be useful when you need a single report for a date range with no more than 10,000 records, or wish to use the reports API to generate a report before the prior day’s report has been generated.
🚧

Constraints

Our production system retains dynamic transaction data for 18 months. Queries that include date ranges older than 18 months will fail when using the Get Report by from and to date time parameter options. To query data sets older than 18 months, utilise the Get Reports by Month query option.

Sequence Diagram of Report API call flow

sequenceDiagram
    participant Client
    participant SearchAPI as Azupay API<br/>/report
    participant DownloadAPI as Azupay API<br/>/report/download
    participant FileServer as Report File Server
    
    Note over Client,FileServer: Complete Report Search and Download Flow
    
    %% Phase 1: Search for Reports
    Client->>+SearchAPI: GET /report<br/>?clientId=CLIENT1&month=2024-01<br/>OR ?clientId=CLIENT1&fromDate=...&toDate=...
    Note right of Client: Authorization: SecretKey<br/>Search by month OR date range
    
    SearchAPI->>SearchAPI: Find available reports<br/>for client and criteria
    
    alt Reports Found
        SearchAPI-->>-Client: 200 OK<br/>{"reports": [<br/>  {"reportId": "encoded-id-1", "type": "Transaction Report"},<br/>  {"reportId": "encoded-id-2", "type": "MT940"}<br/>]}
        
        %% Phase 2: Get Download URL
        Client->>+DownloadAPI: GET /report/download<br/>?clientId=CLIENT1&reportId=encoded-id-1
        Note right of Client: User selects specific report
        
        DownloadAPI->>DownloadAPI: Validate authorization<br/>Generate secure download URL
        
        alt Authorization Success
            DownloadAPI-->>-Client: 200 OK<br/>{"reportUrl": "https://secure-download-url"}
            
            %% Phase 3: Download File
            Note over Client,FileServer: Direct File Download
            Client->>+FileServer: GET Secure Download URL
            FileServer-->>-Client: Report File<br/>(CSV)
        end

    end

Get the list of reports

Get Reports by Month

This option uses our daily generated report. These reports are generated by our system each day based on your report generation configuration, which by default will be at 6:15AM AEDT / 5:15 AEST. File generation can be configured for 2.00 AM AEDT / 1:00AM AEST via your Dashboard on the settings page.

First, you have to get a list of reports available for a given month or date range.

GET https://api.azupay.com.au/v1/report?clientId=MYBUSINESSID&month=2020-01&timezone=Australia/Sydney
Authorization: SECR_MYBUSINESSID_myapikey

Where:

  • month: Reports are for this month. Provide a value in the format YYYY-MM
  • clientId: Your clientId, in this case it's MYBUSINESSID
  • timezone: The timezone you wish to apply to the dates returned in the response body. Currently, we only support Australia/Sydney

This request will yield a response like the following:

{
  "month": "2025-01",
  "reports": [
    {
      "reportId": "string1=",
      "type": "Transaction Report V2",
      "fromDate": "2025-01-01T00:00:00.000+11:00",
      "toDate": "2025-01-01T23:59:59.999+11:00",
      "clientId": "MYBUSINESSID"
    },
    {
      "reportId": "string2=",
      "type": "Transaction Report V2",
      "fromDate": "2025-01-02T00:00:00.000+11:00",
      "toDate": "2025-01-02T23:59:59.999+11:00",
      "clientId": "MYBUSINESSID"
    },
    ...
  ]
}

Where:

  • month: Reports are for this month
  • reports: The list of available reports
  • reports.type: The type of report. Currently, we supply Transaction Report V2or MT940 (select customers only by request)
  • reports.reportId: This is the unique ID of the report. You need to parse the response based on the other fields type, fromDate, toDate and identify the reportId you are planning to download
  • reports.fromDate: The start period of the report tied to the report ID. This will typically be the start of the day in GMT+11.
  • reports.toDate: The end period of the report tied to the report ID. This will typically be the end of the day in GMT+11.
  • reports.clientId: The clientId associated with this report.

All reports that have been generated for the specified month to date will be available.

Get Report by From and To DateTime

This option dynamically generates a single report that includes up to 10,000 transactions based on the provided from and to date time. If using this option and more than 10,000 transactions are returned, a moreResultsPossible value will be provided in the response body, and you must implement handling logic to generate additional reports based on the last observed transaction datetime on the initial report returned. This can be useful when you need a single report for a date range with no more than 10,000 records, or wish to use the reports API to generate a report before the prior day’s report has been generated.

GET https://api.azupay.com.au/v1/report?clientId=MYBUSINESSID&fromDate=2024-01-02T12%3A11%3A00.999%2B0530&toDate=2024-01-02T12%3A11%3A00.999%2B0530
Authorization: SECR_MYBUSINESSID_myapikey

Where:

  • clientId: Your clientId, in this case it's MYBUSINESSID
  • fromDate: the start of the date range for which you specify to search for daily transaction reports in
  • toDate: the end of the date range for which you specify to search for daily transaction reports in

This request will yield a response like the following:

{
  "month": "2025-01",
  "reports": [
    {
      "reportId": "string",
      "type": "TXN_V2",
      "fromDate": "2025-01-02T12:11:00.999+0530",
      "toDate": "2025-12-02T12:11:00.999+0530",
      "clientId": "MYBUSINESSID",
      "moreResultsPossible": true
    }
  ]
}

Where:

  • month: Reports are for this month
  • reports: The list of available reports
  • reports.type: The type of report. Currently, we supply TXN_V2or MT940 (select customers only by request)
  • reports.reportId: This is the unique ID of the report. You need to parse the response based on the other fields type, fromDate, toDate and identify the reportId you are planning to download
  • reports.fromDate: The start period of the report tied to the report ID provided in the query parameter.
  • reports.toDate: The end period of the report tied to the report ID provided in the query parameter. This will not be the date time of the last transaction returned if the query period had over 10,000 records.
  • reports.clientId: The clientId associated with this report.
  • reports.moreResultsPossible: A conditional return value that will only appear when the report period had over 10,000 records available. You should review the returned report for the last included transaction date time and use it to run additional queries if required, noting that multiple transactions can occur at the exact same time at the 10,000 threshold and not all of them may be in the returned data set.

Note that only a single report will be returned for this option.

Get the report's temporary download URL

Once you have identified the reportId you are interested in, we can move to the next step

GET https://api.azupay.com.au/v1/report/download?clientId=MYBUSINESSID&reportId=report-id
Authorization: SECR_MYBUSINESSID_myapikey

Where:

  • clientId: Your clientId, in this case it's MYBUSINESSID
  • reportId: The reportId you identified earlier

This will yield the following response:

{
  "reportUrl": "https://azupay.com/reports/1234"
}

Where:

  • reportUrl: This is a temporary signed URL you can use to download the file. It is only valid for a limited amount of time.
  • These signed links are only valid for 1 minute before expiring for security purposes, so should be consumed programmatically as soon as they are generated.

Download the report

Using the reportUrl, issue a simple GET request and download the resulting report file:

GET https://azupay.com/reports/1234

This will yield a response with Content-Type value of application/octet-stream.

📘

Daily transaction reports provide a different view from live transaction data that is available on the Azupay client dashboard from the Transaction Search page. Daily transaction reports include all completed/settled transactions made to your business in a 24 hour period (12am - 11:59pm).Transaction search results on the dashboard and exported into a report can also include transactions in other statuses like expired, waiting, return_complete etc.