POST /api/v202407/summaryAccount/{summaryAccountId}/subAccount

Links sub-accounts to a summary account

LinkSubAccountsV202407 Permissions: Accounts (Edit)
Use this endpoint to add sub-accounts to a summary account for consolidated billing. This only adds links — it does not remove existing links. Use DELETE /summaryAccount/{summaryAccountId}/subAccount to remove links. Accepts either an explicit list of sub-account IDs or filter criteria to select accounts by code, info, vendor, or cost center. Because the number of linked sub-accounts can be large, only the count is returned. To see all linked sub-accounts, use GET /account with the summaryAccountId filter.

Request Headers

Header Value Required Description
ECI-ApiKey string Yes Your API key. See Authentication.
Content-Type application/json Yes All requests must specify JSON content type, including the request body.

Path Parameters

Name Description Type Required
summaryAccountId The unique numeric identifier of the summary (parent) account to link sub-accounts to integer (int32) Required

Request Body

LinkSubAccountsRequest
Property Description Type
linkSubAccountsFilters LinkSubAccountsFilters
LinkSubAccountsFilters properties
Property Description Type
accountCodeContains Account code contains the specified string At least one of AccountInfoContains, AccountCodeContains, VendorId, TopmostCostCenterId must not be null string
accountInfoContains Account info contains the specified string At least one of AccountInfoContains, AccountCodeContains, VendorId, TopmostCostCenterId must not be null string
topmostCostCenterId All accounts under the specified topmost cost center id Topmost (CostCenter) At least one of AccountInfoContains, AccountCodeContains, VendorId, TopmostCostCenterId must not be null integer (int32)
vendorId All accounts with the specified vendor id At least one of AccountInfoContains, AccountCodeContains, VendorId, TopmostCostCenterId must not be null integer (int32)
subAccountIds List of AccountIds to assign as sub accounts Cannot be Empty NULL Valid Only one of SubAccountIds, LinkSubAccountsFilters can be set integer[]
Example Request Body application/json
{  "linkSubAccountsFilters": {    "accountCodeContains": "string",    "accountInfoContains": "string",    "topmostCostCenterId": 1,    "vendorId": 1
  },  "subAccountIds": [
    1
  ]
}

Responses

200 OK The request succeeded and the response body contains the requested data.

Response Body Parameters

GenericCount
Property Description Type
count Number of items integer (int32)
description A short description of the items counted string
Example Response application/json
{  "count": 1,  "description": "string"
}