Query Merchant
Process
Description:
- Partners call this API to query the list of merchants (sub-merchants) registered with Baokim, including their receiving accounts and stores.
- Results are paginated.
API Information
Method: POST
URL: {BASE_URL}/ats/merchant
Header: Signature — RSA-SHA1 signature of raw body (see Security).
Request
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| request_id | String | ✅ | Request ID, unique. Maximum 50 characters, only letters, numbers, _, ., - |
| request_time | Datetime | ✅ | Request time. Format: YYYY-MM-DD HH:mm:ss. Must not differ by more than 10 minutes from Baokim time |
| partner_code | String | ✅ | Partner code provided by Baokim. Used for signature verification and result filtering |
| sub_merchant | String | ❌ | Filter by sub-merchant code |
| from_date | Datetime | ❌ | Filter by registration time from. Format: YYYY-MM-DD HH:mm:ss |
| end_date | Datetime | ❌ | Filter by registration time to. Format: YYYY-MM-DD HH:mm:ss |
| page | Integer | ❌ | Page number. Default 1 |
| per_page | Integer | ❌ | Records per page, from 1 to 100. Default 15 |
Request Example
{
"request_id": "REQ20250115103000",
"request_time": "2025-01-15 10:30:00",
"partner_code": "CASHPLUS",
"sub_merchant": "SHOP123",
"page": 1,
"per_page": 20
}
Response
note
HTTP 200 - Success
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| response_code | Integer | ✅ | Response code. 200 = success |
| response_message | String | ✅ | Response message |
| response | Object | ❌ | Paginated result. Missing on error |
Merchant Information (response.data[])
| Field Name | Data Type | Description |
|---|---|---|
| partner_code | String | Partner code |
| sub_merchant | String | Sub-merchant code |
| status | Integer | Registration status. 1 = active |
| account_no | String | Account number for receiving funds |
| bank_no | String | Bank code of receiving account |
| store_code | String | Store code |
| store_name | String | Store name |
| acc_holder | String | Account holder name |
| created_at | Datetime | Creation time |
| updated_at | Datetime | Last update time |
Pagination (response)
| Field Name | Data Type | Description |
|---|---|---|
| current_page | Integer | Current page |
| per_page | Integer | Records per page |
| total | Integer | Total records |
| last_page | Integer | Last page |
| from | Integer | First record index of the page |
| to | Integer | Last record index of the page |
| data | Array | List of records |
Response Example
{
"response_code": 200,
"response_message": "Success",
"response": {
"current_page": 1,
"data": [
{
"partner_code": "CASHPLUS",
"sub_merchant": "SHOP123",
"status": 1,
"account_no": "0123456789",
"bank_no": "970436",
"store_code": "STORE001",
"store_name": "Store 1",
"acc_holder": "NGUYEN VAN A",
"created_at": "2025-01-10 09:00:00",
"updated_at": "2025-01-10 09:00:00"
}
],
"from": 1,
"last_page": 1,
"per_page": 20,
"to": 1,
"total": 1
}
}
Error Codes
| Error Code | Description |
|---|---|
| 200 | Success |
| 11 | Error during Baokim processing |
| 104 | request_id or request_time invalid (wrong format, duplicate request_id, or differs by more than 10 minutes) |
| 105 | partner_code invalid |
| 120 | Signature invalid |
| 201 | Invalid parameter (response_message indicates which field) |