Skip to main content

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 NameData TypeRequiredDescription
request_idString✅Request ID, unique. Maximum 50 characters, only letters, numbers, _, ., -
request_timeDatetime✅Request time. Format: YYYY-MM-DD HH:mm:ss. Must not differ by more than 10 minutes from Baokim time
partner_codeString✅Partner code provided by Baokim. Used for signature verification and result filtering
sub_merchantString❌Filter by sub-merchant code
from_dateDatetime❌Filter by registration time from. Format: YYYY-MM-DD HH:mm:ss
end_dateDatetime❌Filter by registration time to. Format: YYYY-MM-DD HH:mm:ss
pageInteger❌Page number. Default 1
per_pageInteger❌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 NameData TypeRequiredDescription
response_codeInteger✅Response code. 200 = success
response_messageString✅Response message
responseObject❌Paginated result. Missing on error

Merchant Information (response.data[])​

Field NameData TypeDescription
partner_codeStringPartner code
sub_merchantStringSub-merchant code
statusIntegerRegistration status. 1 = active
account_noStringAccount number for receiving funds
bank_noStringBank code of receiving account
store_codeStringStore code
store_nameStringStore name
acc_holderStringAccount holder name
created_atDatetimeCreation time
updated_atDatetimeLast update time

Pagination (response)​

Field NameData TypeDescription
current_pageIntegerCurrent page
per_pageIntegerRecords per page
totalIntegerTotal records
last_pageIntegerLast page
fromIntegerFirst record index of the page
toIntegerLast record index of the page
dataArrayList 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 CodeDescription
200Success
11Error during Baokim processing
104request_id or request_time invalid (wrong format, duplicate request_id, or differs by more than 10 minutes)
105partner_code invalid
120Signature invalid
201Invalid parameter (response_message indicates which field)