GET /bank-accounts/all
List all bank accounts in your service — not just those linked to the calling branch. Results are paginated and exclude deleted accounts.
Use this to find an account you previously unlinked from your branch (which drops it out of GET /bank-accounts) so you can link it back.
Endpoint
http
GET /bank-accounts/allFull URL: https://api.easyslip.com/v2/bank-accounts/all
Authentication
Required. See Authentication Guide.
http
Authorization: Bearer YOUR_API_KEYRequest
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | No | Filter by account type — NATURAL or JURISTIC |
bankCode | string | No | Filter by bank code |
page | number | No | Page number (default: 1) |
limit | number | No | Items per page (default: 20, max: 100) |
Type Definitions
typescript
// Response
interface ListBankAccountsResponse {
success: true;
data: {
items: BankAccount[];
total: number;
page: number;
limit: number;
};
}
interface BankAccount {
id: number;
bankCode: string;
bankNumber: string;
nameTh: string;
nameEn: string;
type: 'NATURAL' | 'JURISTIC';
extraVerify: string | null;
createdAt: string; // ISO 8601
updatedAt: string; // ISO 8601
}
// Error Response
interface ErrorResponse {
success: false;
error: {
code: string;
message: string;
};
}Examples
bash
curl -X GET "https://api.easyslip.com/v2/bank-accounts/all?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"javascript
const listAllBankAccounts = async (params = {}) => {
const query = new URLSearchParams(params).toString();
const response = await fetch(`https://api.easyslip.com/v2/bank-accounts/all?${query}`, {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const result = await response.json();
if (!result.success) {
throw new Error(result.error.message);
}
return result.data;
};
// Usage
const { items, total } = await listAllBankAccounts({ limit: 20 });
console.log(`Service has ${total} accounts`);php
function listAllBankAccounts(array $params = []): array
{
$query = http_build_query($params);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.easyslip.com/v2/bank-accounts/all?' . $query,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if (!$result['success']) {
throw new Exception($result['error']['message']);
}
return $result['data'];
}
// Usage
$data = listAllBankAccounts(['limit' => 20]);
echo "Total: " . $data['total'];python
import requests
def list_all_bank_accounts(**params) -> dict:
response = requests.get(
'https://api.easyslip.com/v2/bank-accounts/all',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params=params
)
result = response.json()
if not result['success']:
raise Exception(result['error']['message'])
return result['data']
# Usage
data = list_all_bank_accounts(limit=20)
print(f"Service has {data['total']} accounts")Response
Success Response (200)
json
{
"success": true,
"data": {
"items": [
{
"id": 12345,
"bankCode": "004",
"bankNumber": "123-4-56789-0",
"nameTh": "บริษัท ตัวอย่าง จำกัด",
"nameEn": "EXAMPLE CO., LTD.",
"type": "JURISTIC",
"extraVerify": null,
"createdAt": "2024-01-15T14:30:00+07:00",
"updatedAt": "2024-01-15T14:30:00+07:00"
}
],
"total": 1,
"page": 1,
"limit": 20
}
}Response Fields
| Field | Type | Description |
|---|---|---|
items | BankAccount[] | All accounts in your service |
total | number | Total number of matching accounts |
page | number | Current page number |
limit | number | Items per page |
Error Responses
Validation Error (400)
json
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "limit: Too big: expected number to be <=100"
}
}Notes
- Returns every account in your service, whether or not it is linked to the calling branch. This differs from
GET /bank-accounts, which only returns accounts linked to your branch. - Within a service, branches can see each other's accounts here — branches in a service are a partition, not a security boundary.
- Deleted accounts are excluded.
limitis capped at100.