API lấy chi tiết Công ty

GET /companies/{id} — lấy hồ sơ chi tiết một công ty SePay Bank Hub, gồm tên, trạng thái, cấu hình và giới hạn giao dịch theo từng công ty.

||

API Endpoint

GET
https://bankhub-api.sepay.vn/v1/company/{company_id}

Path Parameters

company_idstringrequired

ID của công ty (xid format)

Lưu ý
  • API này yêu cầu Bearer Token trong header Authorization
  • Trường configuration chứa các cấu hình đặc biệt của công ty (nếu có)

Xử lý lỗi

404Not Found

Công ty (tổ chức) không tồn tại hoặc không thuộc merchant này

401Unauthorized

Access token không hợp lệ hoặc đã hết hạn

API Response

Response 200 - Thành công
{
  "data": {
    "xid": "string",
    "full_name": "string",
    "status": "string",
    "active": "string",
    "configuration": {
      "payment_code": "string",
      "payment_code_prefix": "string",
      "payment_code_suffix_from": 0,
      "payment_code_suffix_to": 0,
      "payment_code_suffix_character_type": "string",
      "data_storage_time": "string",
      "transaction_amount": "string"
    },
    "created_at": "string",
    "updated_at": "string"
  }
}
dataobject

Thông tin chi tiết công ty

Response 404 - Không tìm thấy
{
  "code": 0,
  "message": "string",
  "status": 0,
  "error": "string"
}

Code mẫu

>
>
>
curl --request GET \
--url https://bankhub-api.sepay.vn/v1/company/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Xử lý lỗi 404
  • Lỗi 404 có thể xảy ra khi:
    • Company ID không tồn tại trong hệ thống
    • Company ID không thuộc về merchant đang xác thực
    • Company ID bị nhập sai format
  • Luôn kiểm tra status code trước khi xử lý response