Difference between revisions of "Update Customer Name"
From MyMobileWorkers API
(→Successful) |
(→Unsuccessful) |
||
| Line 45: | Line 45: | ||
<source lang="java"> | <source lang="java"> | ||
| − | |||
{"error_code":"CUS002","error_message":"Customer cannot be found"} | {"error_code":"CUS002","error_message":"Customer cannot be found"} | ||
{"error_code":"CUS011","error_message":"Customer name not provided. Please specify customer name in the request."} | {"error_code":"CUS011","error_message":"Customer name not provided. Please specify customer name in the request."} | ||
{"result":"failed","existing_customer_name":"testName24","new_customer_name":"darrenTest24"} | {"result":"failed","existing_customer_name":"testName24","new_customer_name":"darrenTest24"} | ||
| − | |||
</source> | </source> | ||
Revision as of 12:53, 7 February 2014
Contents |
Summary
The Update Customer Name API call allows an existing customer to be updated with a new name by giving the existing name of a customer, along with the new name.
Multi Part Form Data
| Update Customer Name | |||
|---|---|---|---|
| URL | http://base_url/api_path/version/assets | ||
| Type | POST | ||
| Params: | api_key | required | |
| existing_name | required | ||
| new_name | required | ||
| Response | JSON | ||
Example Curl Request
curl -F api_key=YOUR_KEY -F existing_name=CUSTOMER_EXISTING_NAME -F new_name=CUSTOMER_NEW_NAME http://live.mymobileworkers.com:8080/api/1/companies/company/customers/updatename
Responses
Successful
{"result":"success","existing_customer_name":"testName24","new_customer_name":"darrenTest24"}
Unsuccessful
{"error_code":"CUS002","error_message":"Customer cannot be found"} {"error_code":"CUS011","error_message":"Customer name not provided. Please specify customer name in the request."} {"result":"failed","existing_customer_name":"testName24","new_customer_name":"darrenTest24"}