Get All Accounts

The Get All Accounts API allows users to retrieve a list of accounts stored in the system. This API supports filtering based on roles, branches, employee details, and other parameters.

API Method

GET

Endpoint

https://cebuana-apiuat.veryfyglobal.com/accounts

Headers

Key
Value

Accept

application/json

Authorization

Bearer <YOUR_TOKEN>

Query Parameters

Parameter
Type
Required
Description

role

string

No

The role of the accounts to filter by (e.g., "admin", "user").

branch

string

No

The branch to which the accounts are associated. branch_id

employee

string

No

The employee associated with the account. employee_id

name

string

No

The name of the account to filter the results.

email

string

No

The email address of the account to filter the results.

is_active

integer

No

Filter by account status; set to 1 for active, 0 for inactive.

is_suspend

integer

No

Filter by account suspension status; set to 1 for suspended, 0 for not suspended.

per_page

integer

No

Number of results to return per page (default is 10).

Example Request

Request URL

GET /accounts?role=admin&branch=central&employee=john.doe&name=John Doe&[email protected]&is_active=0&is_suspend=0&per_page=50

Response Sample

{
    "message": "Ok",
    "data": {
        "records": [
            {
                "id": 33,
                "role": {
                    "value": 1,
                    "description": "Branch Personnel"
                },
                "branch": {
                    "id": 7,
                    "name": "CLH Robinson’s Galleria",
                    "address": "Robinson’s Galleria"
                },
                "employee_id": "20XXXXXX",
                "name": "RPGalleriaTeller",
                "email": "[email protected]",
                "is_active": {
                    "value": 1,
                    "description": "Yes"
                },
                "is_suspend": {
                    "value": 0,
                    "description": "No"
                }
            },
            {
                "id": 32,
                "role": {
                    "value": 4,
                    "description": "Treasury"
                },
                "branch": null,
                "employee_id": "22XXXXXX",
                "name": "RPtreasury",
                "email": "[email protected]",
                "is_active": {
                    "value": 1,
                    "description": "Yes"
                },
                "is_suspend": {
                    "value": 0,
                    "description": "No"
                }
            }
        ],
        "pagination": {
            "current_page": 1,
            "last_page": 1,
            "total_record": 3,
            "page_size": 20,
            "has_more_page": true
        }
    }
}

Last updated