Use Reporting Endpoints
Learn how to use the query, statistics, and export Payabli API endpoints for tailored reporting
Although the PartnerHub and PayHub reporting tools allow partners and merchants to view reports, the reporting APIs offer more flexibility. For example,you may need to send daily settlement reporting details to their customers via an internal tool. Use the Payabli reporting APIs to get the data you need in the format you need it in.
The query API allows you to retrieve records related to various objects in Payabli, like customers, vendors, batches, transactions, and more.
The statistics API allows you to retrieve aggregated statistics for a certain period and mode, like total money out transactions, total money in transactions, number of new customers, total volume, and more.
The export API allows you to export a filtered list of records in CSV or XLSX file format. You can export things like lists of customers, vendors, boarding applications, payouts, and more.
This guide explains how to use the query, stats, and export endpoints.
Build the request
First, choose an endpoint. If you’re testing, use the Sandbox endpoint. for your target environment. Make sure you use the right token for your selected environment.
The reporting engine offers dozens of endpoints to choose from, so see the references for the API you want to use:
Authenticate
Authenticate by sending your API token in the request header with the key requestToken
:
--header 'requestToken: API TOKEN'
Parameters
For a full list of available parameters, see the reference for the endpoint you choose. Most require at least an orgId
or entry
. Each endpoint may have other required fields. You can also use filters and conditions for most endpoints, so see Filters and Conditions Reference for examples and help understanding them.
Example request
Because there are infinite ways to build a request for one of the reporting endpoints, here are several example requests. Be sure to read the code comments for important context.
Example response
A successful request returns a 200 response with a JSON body. Response bodies vary by endpoint, so check the reference for the endpoint you’re using for expected fields.
Was this page helpful?