Update customer
curl --request PATCH \
--url https://api.anchorage-staging.com/v4/customers/{customerId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"customerType": "INDIVIDUAL",
"externalId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "jsmith@example.com",
"idNumber": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v4/customers/{customerId}"
payload = {
"customerType": "INDIVIDUAL",
"externalId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "jsmith@example.com",
"idNumber": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerType: 'INDIVIDUAL',
externalId: '<string>',
firstName: '<string>',
lastName: '<string>',
dateOfBirth: '2023-12-25',
email: 'jsmith@example.com',
idNumber: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v4/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"customerId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"customerType": "INDIVIDUAL",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"idNumber": "<string>",
"address": {
"country": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>"
},
"state": "DRAFT",
"createdAt": "2019-01-02T12:34:56.000Z",
"updatedAt": "2019-01-02T12:34:56.000Z",
"documents": [
{
"documentId": "<string>",
"state": "PENDING",
"signedUrl": "<string>",
"expiresAt": "2019-01-02T12:34:56.000Z"
}
],
"externalId": "<string>",
"dateOfBirth": "2023-12-25"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Update customer
Permissions required: Manage Customers
Partially update a customer. Only fields supplied in the request body are applied; omitted fields are left unchanged.
PATCH
/
customers
/
{customerId}
Update customer
curl --request PATCH \
--url https://api.anchorage-staging.com/v4/customers/{customerId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"customerType": "INDIVIDUAL",
"externalId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "jsmith@example.com",
"idNumber": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v4/customers/{customerId}"
payload = {
"customerType": "INDIVIDUAL",
"externalId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "jsmith@example.com",
"idNumber": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerType: 'INDIVIDUAL',
externalId: '<string>',
firstName: '<string>',
lastName: '<string>',
dateOfBirth: '2023-12-25',
email: 'jsmith@example.com',
idNumber: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v4/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"customerId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"customerType": "INDIVIDUAL",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"idNumber": "<string>",
"address": {
"country": "<string>",
"streetAddress": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>"
},
"state": "DRAFT",
"createdAt": "2019-01-02T12:34:56.000Z",
"updatedAt": "2019-01-02T12:34:56.000Z",
"documents": [
{
"documentId": "<string>",
"state": "PENDING",
"signedUrl": "<string>",
"expiresAt": "2019-01-02T12:34:56.000Z"
}
],
"externalId": "<string>",
"dateOfBirth": "2023-12-25"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Headers
Path Parameters
Body
application/json
- Update Individual Customer
- Update Business Customer
Request to update an individual customer. All fields besides customerType are optional (PATCH semantics).
Was this page helpful?