Update Customer and Customer Field Value By Customer ID
Update Customer and Customer Field Value By Customer ID

This method updates a customer information and customer field value. The client makes a POST request providing Request body in either xml or json format and input parameter CompanyId, CustomerID and LangID in the request url. The output will be either in json or xml format depending on the request type. Response returns success or fail of the operation as boolean.

Note

You can find all of the Customer Field informationĀ thats necessary for this API with the api given below.

Name Value
REST-API METHOD UPDATE CUSTOMER AND CUSTOMER FIELD VALUE BY CUSTOMERID
HTTP METHOD POST
RESPONSE TYPE XML
URL https://api.csm.next4biz.net/services/CustomerService/{CompanyID}/UpdateCustomer.json/{CustomerID}/{LangID}https://api.csm.next4biz.net/services/CustomerService/{CompanyID}/UpdateCustomer.xml/{CustomerID}/{LangID}
REQUEST HEAD Authorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+json,application/json;q=0.9,*/*;q=0.8 Content-Type: application/jsonAuthorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Type: application/xml
  • XML
  • JSON
ENDPOINT DEFINITION
POST
REQUEST BODY
                                    
                                        <Customer>
	<CustomerEmail>{CustomerEmail}</CustomerEmail>
	<CustomerFields>
		<CustomerField>
			<CustomerFieldID>{CustomerFieldID}</CustomerFieldID>
			<CustomerFieldValues>
				<CustomerFieldReferenceValue>
					<CustomerFieldReferenceValueID>{ID}</CustomerFieldReferenceValueID>
				</CustomerFieldReferenceValue>
			</CustomerFieldValues>
		</CustomerField>
		<CustomerField>
			<CustomerFieldID>{CustomerFieldID}</CustomerFieldID>
			<CustomerFieldValue>{Value}</CustomerFieldValue>
		</CustomerField>
	</CustomerFields>
	<CustomerHomePhoneNumber>{Number}</CustomerHomePhoneNumber>
	<CustomerMobilePhoneNumber>{Number}</CustomerMobilePhoneNumber>
	<CustomerName>{Name}</CustomerName>
	<CustomerSurname>{Surname}</CustomerSurname>
	<CustomerPassword>{Password}</CustomerPassword>
	<CustomerWorkPhoneNumber>{Number}</CustomerWorkPhoneNumber>
	<CustomerBusinessChannelID>{BusinessChannelID}</CustomerBusinessChannelID>
	<CustomerUnitID>0</CustomerUnitID>
</Customer>                                    
                                
                                                                         
                                        {
    "CustomerEmail": "{CustomerEmail}",
    "CustomerFields": [
            {
                "CustomerFieldID": "{CustomerFieldID}",
                "CustomerFieldValues": [
                        "CustomerFieldReferenceValueID": "{ID}"
                    ]
            },
            {
                "CustomerFieldID": "{CustomerFieldID}",
                "CustomerFieldValue": "{Value}"
            }
        ],
    "CustomerHomePhoneNumber": "{Number}",
    "CustomerMobilePhoneNumber": "{Number}",
    "CustomerName": "{Name}",
    "CustomerSurname": "{Surname}",
    "CustomerPassword": "{Password}",
    "CustomerWorkPhoneNumber": "{Number}",
    "CustomerBusinessChannelID": "{BusinessChannelID}",
    "CustomerUnitID": "0"
}                                    
                                                                    
RESPONSE BODY
                                    
                                        <?xml version="1.0" encoding="utf-8"?>
<boolean>true</boolean>                                    
                                
                                                                        
                                        {
    "0": "true"
}