Skip to main content

Save Branch Customer

The Save Branch Customer API stores or updates customer information for a specific branch.
It includes essential customer details such as PIN, name, contact info, and status.

Endpoint


POST /saveBhfCustomer


Request Object: BhfCustSaveReq

Request Fields

FieldDescriptionTypeRequiredLength
custNoCustomer NumberCHAR✅ Yes9
custTinCustomer PINCHAR✅ Yes11
custNmCustomer NameCHAR✅ Yes60
adrsAddressCHAR❌ No300
telNoContact NumberCHAR❌ No20
emailEmailCHAR❌ No50
faxNoFax NumberCHAR❌ No20
useYnActive Status (Y/N)CHAR✅ Yes1
remarkRemarksCHAR❌ No1000
regrIdRegistration IDCHAR✅ Yes20
regrNmRegistration NameCHAR✅ Yes60
modrIdModifier IDCHAR✅ Yes20
modrNmModifier NameCHAR✅ Yes60

JSON Request Example

{
"custNo": "999991113",
"custTin": "A123456789Z",
"custNm": "Taxpayer1113",
"adrs": null,
"telNo": null,
"email": null,
"faxNo": null,
"useYn": "Y",
"remark": null,
"regrId": "Test",
"regrNm": "Test",
"modrId": "Test",
"modrNm": "Test"
}

Response Object: BhfCustSaveRes

Response Fields

FieldDescriptionTypeLength
resultCdResult Code (000 = success)CHAR(3)3
resultMsgResult MessageCHAR-
resultDtResponse TimestampCHAR(14)14
dataAlways null--

JSON Response Example

{
"resultCd": "000",
"resultMsg": "It is succeeded",
"resultDt": "20200226193115",
"data": null
}

SDK Usage Examples

customer_data = {
'custNo': '999991113',
'custTin': 'A123456789Z',
'custNm': 'Taxpayer1113',
'adrs': None,
'telNo': None,
'email': None,
'faxNo': None,
'useYn': 'Y',
'remark': None,
'regrId': 'Test',
'regrNm': 'Test',
'modrId': 'Test',
'modrNm': 'Test',
}

response = etims.save_branch_customer(customer_data)

if response.get('resultCd') == '000':
print("✅ Branch customer saved successfully")
else:
abort(f"Failed to save branch customer: {response.get('resultMsg', 'Unknown error')}")

Best Practices

  • Ensure custNo and custTin are unique for each branch.
  • Use useYn flag to deactivate customers without deleting them.
  • Provide regrId and modrId for audit tracking.
  • Optional fields like address, email, and phone can be left null if unavailable.