Skip to main content

Edit Customer

Edit existing customer information on the system

Note:
  • Refer to the Add New Customer API for parameters. A customer can have more than one contact.
  • In the case of editing customer information, if the contact information has not changed, do not transmit anything.
  • If transmitted by contact_id, it is understood as editing contact information; if not transmitted, it is understood as adding new.
  • If contact data is transmitted, the transmitted data will be saved in the customer information, and the old information will be deleted.

Edit Customer by ID

HTTP Request

PUT /api/v3/account/ID
Where ID is the Customer ID (account_id)

Body

{
"account": {
"account_name": "Binh An Co., Ltd.",
"phone_office": "0944344111",
"email": "[email protected]",
"billing_address_street": "15 Tran Binh Trong",
"account_type": 29,
"industry_id": 2,
"country_id": 1,
"province_id": 1,
"district_id": 1
},
"contacts": [
{
"contact_id": "156",
"first_name": "Nguyen Van A",
"phone_home": "0896411111",
"email": "[email protected]",
"title": "General Director"
},
{
"first_name": "Nguyen Van A",
"phone_home": "089643333",
"email": "[email protected]",
"title": "Sales manager"
}
]
}

Edit Customer by Code

HTTP Request

PUT /api/v3/account
Where ACCOUNT_CODE is the Customer Code (account_code)

Body

{
"account_code": "ACCOUNT_CODE",
"account": {
"account_name": "Binh An Co., Ltd.",
"phone_office": "0944344111",
"email": "[email protected]",
"billing_address_street": "15 Tran Binh Trong",
"account_type": 29,
"industry_id": 2,
"country_id": 1,
"province_id": 1,
"district_id": 1
},
"contacts": [
{
"contact_id": "156",
"first_name": "Nguyen Van A",
"phone_home": "0896411111",
"email": "[email protected]",
"title": "General Director"
},
{
"first_name": "Nguyen Van A",
"phone_home": "089643333",
"email": "[email protected]",
"title": "Sales manager"
}
]
}