Update a customer
curl --request PATCH \
--url https://api.talescria.com/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"additionalEmails": [
"[email protected]"
],
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
'import requests
url = "https://api.talescria.com/v1/customers/{customerId}"
payload = {
"name": "<string>",
"email": "[email protected]",
"additionalEmails": ["[email protected]"],
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '[email protected]',
additionalEmails: ['[email protected]'],
phone: '<string>',
address: {
line1: '<string>',
city: '<string>',
country: '<string>',
line2: '<string>',
stateOrProvince: '<string>',
postalCode: '<string>'
}
})
};
fetch('https://api.talescria.com/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"customer": {
"id": "cus_6f1c0d2e9a7b4c55b0d1e2f3a4b5c6d7",
"name": "<string>",
"email": "<string>",
"additionalEmails": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Customers
Update a customer
Changes the fields you send. A field you leave out is unchanged; null clears phone or address.
Requires the customers:write scope.
PATCH
/
v1
/
customers
/
{customerId}
Update a customer
curl --request PATCH \
--url https://api.talescria.com/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"additionalEmails": [
"[email protected]"
],
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
'import requests
url = "https://api.talescria.com/v1/customers/{customerId}"
payload = {
"name": "<string>",
"email": "[email protected]",
"additionalEmails": ["[email protected]"],
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '[email protected]',
additionalEmails: ['[email protected]'],
phone: '<string>',
address: {
line1: '<string>',
city: '<string>',
country: '<string>',
line2: '<string>',
stateOrProvince: '<string>',
postalCode: '<string>'
}
})
};
fetch('https://api.talescria.com/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"customer": {
"id": "cus_6f1c0d2e9a7b4c55b0d1e2f3a4b5c6d7",
"name": "<string>",
"email": "<string>",
"additionalEmails": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Headers
Body
application/json