Dashboard Statistics

This guide explains how to get dashboard statistics

REQUEST

testing server:

GET https://staging.xpay.app/api/core/dashboard/statistics

production(Live) server:

GET https://community.xpay.app/api/core/dashboard/statistics

Parameters

Query Parameters

Parameter nameValueDescriptionRequired
community_idstringThe ID of your communityYes

Headers

This method requires the following headers:

Header nameValueDescriptionNotes
x-api-keystringAPI key linked to your communitygenerate API key
AuthorizationstringBasic authentication credentialsFormat: Basic username:password

Request body

This endpoint does not require a request body.

Response

If successful, this method returns a response body with the following structure:

FieldTypeDescription
status.codeintegerHTTP status code
status.messagestringResponse status message
status.errorsarrayList of errors if any
data.balance_details.balancenumberCurrent balance
data.balance_details.total_settlednumberTotal amount settled
data.total_number_of_transactionsintegerTotal count of transactions
data.total_collected_transactionsnumberTotal amount of collected transactions
data.weekly_collected_transactionsnumberAmount collected in the current week

Example

// Request URL
GET /api/core/dashboard/statistics?community_id=njQ2lx7

// Headers
{
    "x-api-key": "dvBjHqUm.1Fjna43eJ4HZ1faZALRrMKcSOyHEAJTx",
    "Authorization": "Basic KzIwMTA1MDQ1MzM0MjpIb21lQGxlYXZlMjA0NQ=="
}

// Empty request body
{}
{
    "status": {
        "code": 200,
        "message": "success",
        "errors": []
    },
    "data": {
        "balance_details": {
            "balance": 2390482.5,
            "total_settled": 569.48
        },
        "total_number_of_transactions": 29,
        "total_collected_transactions": 35518.97,
        "weekly_collected_transactions": 0
    },
    "count": null,
    "next": null,
    "previous": null
}