Approved Clients
This endpoint returns the number of approved clients within a specified date range. It is designed to support dashboard widgets and reporting tools by summarizing client approval counts across banking and merchant categories. Optional filters allow narrowing results by agent IDs, ISO ID, or profile IDs.
Endpoint
POST /api/Widget/approved
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint to populate partner dashboard widgets that display approved client counts over a rolling period. The typical use case is to retrieve data for the last three months (including the current month), so set fromDate to the first day of the earliest month in the desired range and toDate to the current date. Apply the optional filters when the dashboard supports scoping results to a specific agent, ISO, or partner profile.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| fromDate | string (date-time) | Yes | Start of the date range. Set to the first day of the earliest month in the desired range (ISO 8601 format). |
| toDate | string (date-time) | Yes | End of the date range. Typically set to the current date and time (ISO 8601 format). |
| agentsId | array of integers | No | List of agent IDs to filter results. Omit to include all agents. |
| isoId | integer | No | ISO ID to filter results. Omit to include all ISOs. |
| profileIds | array of integers | No | List of profile IDs to filter results. Omit to include all profiles. |
{
"fromDate": "2024-08-01T00:00:00Z",
"toDate": "2024-10-15T23:59:59Z",
"agentsId": [101, 102],
"isoId": 5,
"profileIds": [201, 202, 203]
}Response
200 OK
| Field | Type | Description |
|---|---|---|
| bankingCount | integer or null | Number of approved banking clients within the specified date range and filters. |
| merchantCount | integer or null | Number of approved merchant clients within the specified date range and filters. |
{
"bankingCount": 47,
"merchantCount": 23
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (fromDate or toDate) or invalid date format |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access widget reporting data |
| 404 | Resource not found |
| 500 | Internal server error |
Common Mistakes
- Omitting
fromDateortoDate— both are required; the request will return a 400 error if either is missing. - Using a date format other than ISO 8601 (e.g.,
MM/DD/YYYY) — always useYYYY-MM-DDTHH:MM:SSZformat. - Setting
fromDatelater thantoDate— the range must be chronologically valid or results will be empty or an error will be returned. - Expecting the response to include partial-month data for
toDatein the current month — the API returns counts only for records up to the exacttoDatetimestamp provided.
Related Endpoints
POST /api/Widget/accounts— Retrieve account counts for a given date range and filtersPOST /api/Widget/transactions— Retrieve transaction summary data for a given date range and filters
Example
curl -X POST https://api.banking.netevia.dev/api/Widget/approved \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromDate": "2024-08-01T00:00:00Z",
"toDate": "2024-10-15T23:59:59Z",
"agentsId": [101, 102],
"isoId": 5,
"profileIds": [201, 202, 203]
}'