Accounts

Create an account

Changed on

This API let’s you to create an account for a customer using customer_id.

post/accounts

Request

Request body

idstring required

Identifier of the account

namestring required

Name of the Account

invoiceCurrencystring

Use ISO 4217 currency code in which the account must be invoiced.
For example: AED is the currency code for United Arab Emirates dirham.

aliasesstring[]

Aliases are tags that are associated with an account. Multiple aliases are allowed for a single account.

primaryEmailstring

Primary email of the account

netTermDaysinteger

Net term for the invoices of the account

metadataobject

Additional information associated with the account. Example: GSTN, VATN

tagsstring[]

Tag for accounts are stored in lowercase

status'ACTIVE' | 'DRAFT'

Status of the created account defaults to ACTIVE

customerIdstring required

Customer Identifier for whom the account is being created

Example request

{
  "id": "ACC00001",
  "name": "Primary Account",
  "primaryEmail": "admin@example.com",
  "netTermDays": 45,
  "customerId": "C1234ewf"
}

Response

Response for Create and Get account requests

idstring required

Identifier of the account

togaiAccountIdstring required

Unique identifier of the account

togaiCustomerIdstring required

Unique identifier of the customer

namestring required

Name of the Account

customerIdstring required

Identifier of the customer

invoiceCurrencystring

ISO_4217 code of the currency in which the account must be invoiced Defaults to Base currency.

netTermDaysinteger
primaryEmailstring

Primary email of the customer

status'ACTIVE' | 'DRAFT' | 'ARCHIVED' required

Status of the account

metadataobject

Additional information associated with the account. Example: GSTN, VATN

tagsstring[]

Tag for accounts are stored in lowercase

Example response

{
  "invoiceCurrency": "USD",
  "primaryEmail": "admin@example.com",
  "status": "ACTIVE"
}

Changes

    • info

      added the optional property to the response with the status

    • breaking

      the response property became optional for the status

    • breaking

      the response property's maxLength was increased from 255 to 320 for the response status

    • warning

      added the new DRAFT enum value to the response property for the response status

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      the //// request property's maxLength was increased from 255 to 320

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status