Bank Account
This section covers the API endpoints for managing bank accounts in the admin panel.
List Bank Accounts
GET /v1/admin/bank-accounts
Returns a paginated list of all bank accounts.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search_text | string | Search bank accounts by bank name, account number, or IBAN |
sort | string | Sort by bank_name, account_number, or IBAN (prefix with - for descending order) |
per_page | integer | Number of items per page. Defaults to 10 |
list | boolean | If true, returns a simplified list of bank accounts |
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"current_page": 1,
"first_page_url": "http://192.168.0.139:8080/v1/admin/bank-accounts?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://192.168.0.139:8080/v1/admin/bank-accounts?page=1",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/bank-accounts?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "التالي »",
"active": false
}
],
"next_page_url": null,
"path": "http://192.168.0.139:8080/v1/admin/bank-accounts",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1,
"bank_accounts": [
{
"id": "41256465-2984-4065-8a43-dc3ce1cea742",
"bank_name": "بنك الإنماء - INMA BANK",
"account_number": "68201798346000",
"IBAN": "SA9505000068201798346000",
"country": "السعودية",
"owner_name": null,
"swift_code": null
}
]
},
"status_code": 200
}
Create Bank Account
POST /v1/admin/bank-accounts
Create a new bank account.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
bank_name | string | Yes | Name of the bank (min: 3 characters) |
owner_name | string | Yes | Name of the account owner (min: 3 characters) |
tax_number | number | Yes | Tax number (min: 3 digits) |
account_number | number | Yes | Account number (min: 3 digits) |
IBAN | string | Yes | IBAN number (min: 3 characters) |
branch_number | number | Yes | Branch number (min: 1 digit) |
swift_code | string | Yes | SWIFT/BIC code (min: 1 character) |
country_id | uuid | Yes | UUID of the country |
Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "6f56d570-0592-11f0-82a6-cf3ef38b49fa",
"bank_name": "الكريمي",
"owner_name": "احمد محمد",
"tax_number": "1234567898788",
"account_number": "6820179834602",
"IBAN": "YE9505000068201798346000",
"branch_number": "0108",
"swift_code": "YEMENIS",
"country": "العراق"
},
"status_code": 200
}
Get Bank Account
GET /v1/admin/bank-accounts/{id}
Retrieve details of a specific bank account.
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"id": "41256465-2984-4065-8a43-dc3ce1cea742",
"bank_name": "بنك الإنماء - INMA BANK",
"owner_name": "Elyak Co",
"tax_number": "310846055500003",
"account_number": "68201798346000",
"IBAN": "SA9505000068201798346000",
"branch_number": "0108",
"swift_code": "INMASARI",
"country": "السعودية"
},
"status_code": 200
}
Update Bank Account
PATCH /v1/admin/bank-accounts/{id}
Update an existing bank account.
Request Body
| Parameter | Type | Description |
|---|---|---|
bank_name | string | Name of the bank (min: 3 characters) |
owner_name | string | Name of the account owner (min: 3 characters) |
tax_number | number | Tax number (min: 3 digits) |
account_number | number | Account number (min: 3 digits) |
IBAN | string | IBAN number (min: 3 characters) |
branch_number | number | Branch number (min: 1 digit) |
swift_code | string | SWIFT/BIC code (min: 1 character) |
country_id | uuid | UUID of the country |
Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"id": "6f56d570-0592-11f0-82a6-cf3ef38b49fa",
"bank_name": "بنك تركي التركي الترك",
"owner_name": "احمد محمد",
"tax_number": "1234567898788",
"account_number": "451412",
"IBAN": "YE9505000068201798346000",
"branch_number": "0108",
"swift_code": "YEMENIS",
"country": "العراق"
},
"status_code": 200
}
Delete Bank Account
DELETE /v1/admin/bank-accounts
Delete one or multiple bank accounts.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of bank account UUIDs to delete |
ids.* | uuid | Yes | UUID of the bank account |
Response
{
"success": true,
"message": "تم حذف البيانات بنجاح.",
"data": null,
"status_code": 200
}
Authorization
All bank account endpoints require admin authorization. The user must have the appropriate permissions to perform these operations.