Create an account
curl --request POST \
--url https://api.togai.com/accounts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"id": "ACC00001",
"name": "Primary Account",
"customerId": "C1234qwd",
"aliases": [
"acme_primary",
"acme_1"
],
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"settings": [
{
"id": "accountSettingId",
"value": "INR",
"namespace": "USER",
"name": "Settings Name",
"dataType": "STRING"
}
],
"netTermDays": 45
}'
{
"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.
Body
Identifier of the account
Name of the Account
Use ISO 4217 currency code in which the account must be invoiced.
For example: AED is the currency code for United Arab Emirates dirham.
Aliases are tags that are associated with an account. Multiple aliases are allowed for a single account.
billing address of the customer
Primary email of the account
Net term for the invoices of the account
Additional information associated with the account. Example: GSTN, VATN
Customer Identifier for whom the account is being created
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 POST \
--url https://api.togai.com/accounts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"id": "ACC00001",
"name": "Primary Account",
"customerId": "C1234qwd",
"aliases": [
"acme_primary",
"acme_1"
],
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"settings": [
{
"id": "accountSettingId",
"value": "INR",
"namespace": "USER",
"name": "Settings Name",
"dataType": "STRING"
}
],
"netTermDays": 45
}'
{
"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"
}