Accounts

Update an account

Changed on

This API let’s you to update an account’s information using customer_id and account_id.

patch/accounts/{account_id}

Request

Path parameters

account_idstring required
Example:ACC00001

account_id corresponding to an account

Request body

namestring

Name of the Account

status'ACTIVE' | 'DRAFT'
invoiceCurrencystring

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

netTermDaysinteger
primaryEmailstring

Primary email of the account

metadataobject

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

tagsstring[]

Tag for accounts are stored in lowercase

Example request

{
  "name": "ACME Enterprise",
  "invoiceCurrency": "USD",
  "primaryEmail": "admin@example.com"
}

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 new optional request property

    • 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

      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