Customers
Update a customer
This API let’s you to update a customer’s information using customer_id.
PATCH
/
customers
/
{customer_id}
curl --request PATCH \
--url https://api.togai.com/customers/{customer_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "ACME Enterprise",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
}
}'
{
"id": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
"name": "ACME Enterprise",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"status": "ACTIVE",
"updatedAt": "2020-07-04T12:00:00.000Z",
"createdAt": "2020-07-04T12:00:00.000Z"
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
customer_id
string
requiredBody
application/json
name
string
Name of the Customer
primaryEmail
string
Primary email of the customer
address
object
billing address of the customer
Response
200 - application/json
id
string
requiredIdentifier of customer
name
string
requiredName of the Customer
primaryEmail
string
requiredPrimary email of the customer
billingAddress
string
requiredbilling address of the customer
address
object
requiredbilling address of the customer
status
enum<string>
requiredStatus of the customer
Available options:
ACTIVE
, ARCHIVED
createdAt
string
requiredupdatedAt
string
requiredcurl --request PATCH \
--url https://api.togai.com/customers/{customer_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "ACME Enterprise",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
}
}'
{
"id": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
"name": "ACME Enterprise",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"status": "ACTIVE",
"updatedAt": "2020-07-04T12:00:00.000Z",
"createdAt": "2020-07-04T12:00:00.000Z"
}