Update a Customer
Update a customer information
Method and URL
PUT
| [BASE_URL]
/open-api/api/v1.0/customers:/id
Request
Example Body Request Payload
{
"firstName":"John",
"lastName":"Doe",
"email": "johndoe@gmail.com",
"phoneNumber":"081234567890",
"merchantId": "7822-9dfu-2156-lgtm",
"address": {
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"city": "Jakarta",
"state" : "DKI Jakarta",
"country": "ID",
"postalCode": "123456"
},
"metadata": {
"foo": "bar"
}
}
Request Body Schema
firstName
First Name of the customer
Required
Alphanumeric
lastName
Last Name of the customer
Required
Alphanumeric
Email Address of the customer
Required
Email validated
phoneNumber
Phone Number of the customer
Required
Unique
merchantId
Merchant Id where the customer first registered
Required
address
Address of residence of the customer
Optional
address.addressLine1
Address of the customers i.e. Street Name and Number
Optional
address.addressLine2
Additional address information of the customers. i.e. Building Name, Room Number
Optional
address.city
City of the address
Optional
address.state
State / Province of the address
Optional
address.postalCode
Postal code of the address
Optional
address.country
Country of the address
Optional
metadata
Key-value pairs object to store additional information of the customer
Optional
Response
Example Response Body
{
"code": "string",
"message": "string",
"data": {
// customer object
}
}
Response Data Schema
code
Response Code from Harsya
String
message
Human readable message that represent response from Harsya
String