Update an account
curl --request PATCH \
--url https://api.togai.com/accounts/{account_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Account Name",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina"
}
}'
{
"id": "G234DZZKBKACATFFGVGEMERFI",
"name": "ACME Enterprise - Account2",
"invoiceCurrency": "USD",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"aliases": [
{
"alias": "account2@acme.com",
"status": "ACTIVE"
},
{
"alias": "+1234567890",
"status": "ACTIVE"
}
],
"status": "ACTIVE"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
account_id corresponding to an account
Body
Name of the Account
Primary email of the account
billing address of the customer
Additional information associated with the account. Example: GSTN, VATN NOTE: This replaces the existing metadata if the metadata in the request is not null. To remove all existing metadata, use empty object
Response
Identifier of the account
Name of the Account
Identifier of the customer
ISO_4217 code of the currency in which the account must be invoiced Defaults to Base currency.
list of aliases of the account
billing address of the customer
Primary email of the customer
Status of the account
ACTIVE
, ARCHIVED
Invoice group details
Additional information associated with the account. Example: GSTN, VATN
curl --request PATCH \
--url https://api.togai.com/accounts/{account_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Account Name",
"primaryEmail": "admin@example.com",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina"
}
}'
{
"id": "G234DZZKBKACATFFGVGEMERFI",
"name": "ACME Enterprise - Account2",
"invoiceCurrency": "USD",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"aliases": [
{
"alias": "account2@acme.com",
"status": "ACTIVE"
},
{
"alias": "+1234567890",
"status": "ACTIVE"
}
],
"status": "ACTIVE"
}