Company List API
API to retrieve the list of companies created on the Bank Hub system. Supports pagination and filtering by status.
API Endpoint
GET
https://bankhub-api-sandbox.sepay.vn/v1/companyRequest Parameters
pageinteger
Page number to retrieve
Default:1per_pageinteger
Number of items per page
Default:20qstring
Search keyword (searches in full_name)
statusenum
Filter by status
sort[created_at]enum
Sort by created_at
Default:descNote
- This API requires a Bearer Token in the Authorization header
- Results are sorted by newest creation time by default
- The
activefield indicates whether the company is active (1 = Active, 0 = Pending)
API Response
Response 200
{
"data": [
{
"xid": "string",
"full_name": "string",
"status": "string",
"active": "string",
"created_at": "string",
"updated_at": "string"
}
],
"meta": {
"per_page": 0,
"total": 0,
"has_more": true,
"current_page": 0,
"page_count": 0
}
}dataarray<object>
List of companies
metaobject
Pagination information
Code Examples
1
2
3
curl --request GET \--url 'https://bankhub-api-sandbox.sepay.vn/v1/company?page=SOME_INTEGER_VALUE&per_page=SOME_INTEGER_VALUE&q=SOME_STRING_VALUE&status=SOME_STRING_VALUE&sort%5Bcreated_at%5D=SOME_STRING_VALUE' \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Usage Examples
JSGet the first page with 10 companies
1
2
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company?per_page=10&page=1' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
JSPagination - Get page 2
1
2
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company?page=2' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
JSFilter active companies only
1
2
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company?status=Active' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
JSFilter companies with pending status only
1
2
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company?status=Pending' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Performance Notes
- Use an appropriate
per_pagevalue to optimize performance - Avoid requesting too many companies in a single request
- Use
has_moreto check for remaining data instead of relying onpage_count