Skip to main content
POST
/
invoice_groups
/
{invoice_group_id}
/
add_accounts
Add accounts to an invoice group
curl --request POST \
  --url https://api.togai.com/invoice_groups/{invoice_group_id}/add_accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountIds": [
    "ACC0001",
    "ACC0002"
  ]
}
'
{
  "id": "inv_group.20rvWRxQcQK.0ZwPG",
  "dailyInvoiceConsolidation": true,
  "accountsCount": 2,
  "gracePeriod": 3,
  "netTermDays": 45,
  "invoiceCurrency": "USD",
  "billingAddress": {
    "phoneNumber": "+919876543210",
    "line1": "2281 Broadway Street",
    "line2": "G-31",
    "postalCode": "29501",
    "city": "Florence",
    "state": "South Carolina",
    "country": "US"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

invoice_group_id
string
required
Maximum string length: 512
Example:

"inv_grp.20rqjgFJf2O.ejl25"

Body

application/json

Payload to add or remove accounts to/from an invoice group

Add accounts to an invoice group

accountIds
string[]
required
Required array length: 1 - 100 elements

Response

Response to create invoice group request

Invoice group details

id
string
required
name
string
required
email
string
required
dailyInvoiceConsolidation
boolean
required
invoiceCurrency
string
required
billingAddress
object
required

billing address of the customer

accountsCount
integer<int32>
required
Required range: x >= 0
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
netTermDays
integer<int32>