> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayar.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Statistics

> Endpoint to retrieve aggregated statistics (products, customers, and transactions) for your account

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET 'https://api.mayar.id/hl/v2/statistics' \
   --header 'Authorization: Bearer Paste-Your-API-Key-Here'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "success",
      "data": {
          "totalProduct": 167,
          "totalCustomer": 482,
          "totalTransaction": 425,
          "tpvTransaction": 1086750000
      }
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v2/statistics
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.io/hl/v2/statistics
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-Api-Key-Here`
</ResponseField>

## Response

Successful Response

## Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code returned by the API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>

<ResponseField name="data" type="object">
  Aggregated statistics object for the authenticated account.
</ResponseField>

### data Structure (Object)

<ResponseField name="data.totalProduct" type="number">
  Total number of products (payment links) created by the account (all-time).
</ResponseField>

<ResponseField name="data.totalCustomer" type="number">
  Total number of customers of the account (all-time).
</ResponseField>

<ResponseField name="data.totalTransaction" type="number">
  Total number of successful transactions of the account (all-time).
</ResponseField>

<ResponseField name="data.tpvTransaction" type="number">
  Total payment volume (sum of successful transaction amounts) of the account in
  IDR (all-time).
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.