Company Update API

API to update an existing company. Allows changing the name, status, and company configurations.


API Endpoint

POST
https://bankhub-api-sandbox.sepay.vn/v1/company/edit/{company_id}

Path Parameters

company_idstringrequired

ID of the company to edit

full_namestring

Full name of the company

short_namestring

Short name

statusenum

Company status

payment_codeenum

Enable/disable payment code recognition

payment_code_prefixstring

Payment code prefix (2-5 letter characters)

payment_code_suffix_frominteger

Minimum suffix length

payment_code_suffix_tointeger

Maximum suffix length

payment_code_suffix_character_typeenum

Suffix character type

transaction_amountobject

Number of transactions

Request Body

company_idstringrequired

ID of the company to edit

full_namestring

Full name of the company

short_namestring

Short name

statusenum

Company status

payment_codeenum

Enable/disable payment code recognition

payment_code_prefixstring

Payment code prefix (2-5 letter characters)

payment_code_suffix_frominteger

Minimum suffix length

payment_code_suffix_tointeger

Maximum suffix length

payment_code_suffix_character_typeenum

Suffix character type

transaction_amountobject

Number of transactions

Note
  • This API requires a Bearer Token in the Authorization header
  • Supports partial update - only send the fields you want to change

Error Handling

404Not Found

The company does not exist or does not belong to this merchant

401Unauthorized

The access token is invalid or has expired

400Validation Error

Invalid input data

API Response

Response 200 - Updated Successfully
{
  "code": 200,
  "message": "Đã cập nhật thông tin công ty (tổ chức) thành công."
}
codeinteger
messagestring
Response 404 - Not Found
{
  "code": 0,
  "message": "string",
  "status": 0,
  "error": "string"
}

Code Examples

>
>
>
>
>
curl --request POST \
--url https://bankhub-api-sandbox.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"full_name":"string","short_name":"string","status":"Pending","payment_code":"on","payment_code_prefix":"string","payment_code_suffix_from":1,"payment_code_suffix_to":1,"payment_code_suffix_character_type":"NumberOnly","transaction_amount":null}'

Usage Examples

JSUpdate the company name
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api-sandbox.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"full_name": "Công ty TNHH ABC Updated"
}'
JSChange the company status to Pending
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api-sandbox.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"status": "Pending"
}'
JSUpdate the transaction limit
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api-sandbox.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"transaction_amount": "10000000"
}'

Important Notes
  • Partial Update: This API supports partial updates—only send the fields you want to change
  • Validation: Submitted fields must still follow validation rules (e.g., minimum name length of 3 characters, valid status format, etc.)
  • 404 Error: Verify the company_id before updating to avoid 404 errors
  • Transaction Amount: Can be set to "Unlimited" or a specific number (string format)