Update customer¶
Order API v1
PUT
*base*/customers/*customerId*
Authentication:API key
Update customer information.
Parameters¶
int
required
|
The customerID from List customers. |
customer object
|
The customer object is explained in Get Customer Parameters. |
boolean
optional
|
Response in xml format instead of json. |
Request example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | PUT <base>/customers/4234 HTTP/1.1
Content-type: application/json
{
"firstName": "Benjamin",
"lastName": "Simon",
"address1": "",
"address2": "New Address2",
"zipCode": "10500",
"city": "BRIGHTON",
"country": "US",
"state": "CA",
"phoneNumber": "9004505123",
"gender": "",
"consents": [
{
"key": "firts_con",
"consented": true
},
{
"key": "second_con",
"consented": false,
"version": "1.0",
"language": "EN"
}
]
}
|
Response¶
200
Content-type: application/json
string
required
|
ok if success, else no . |
object
required
|
Customer object. The customer object is explained in Get Customer Parameters. |
Response example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"status": "ok",
"customer": {
"customerId": "1",
"email": "benjamin.simon@example.com",
"firstName": "Benjamin",
"lastName": "Simon",
"address1": "",
"address2": "New Address2",
"zipCode": "10500",
"city": "BRIGHTON",
"state": "CA",
"country": "US",
"phoneNumber": "9004505123",
"newsletter": true,
"gender": "",
"registered": false,
"consents": [
{
"key": "test_key1",
"name": "Consent1",
"consented": false,
"text": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley ",
"language": "",
"version": "",
"created": "2018-03-15 20:42:59",
"modified": "2018-03-15 20:42:59"
},
{
"key": "firts_con",
"name": "",
"consented": true,
"text": "",
"language": "",
"version": "",
"created": "2018-03-21 12:17:54",
"modified": "2018-03-21 12:17:54"
},
{
"key": "second_con",
"name": "",
"consented": false,
"text": "",
"language": "EN",
"version": "1.0",
"created": "2018-03-21 12:17:54",
"modified": "2018-03-21 12:17:54"
}
],
"created": "2018-03-15 20:42:59",
"modified": "2018-03-15 20:42:59"
}
}
|
Error example¶
1 2 3 4 | {
"status": "no",
"msg": "The customer was not found."
}
|