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

Link sub accounts to a summary account This only adds sub accounts to a summary account. It will not remove any links. Use the Delete to remove accounts. Because the number of linked sub accounts can be large we just return the total number of accounts linked To get the list of all sub accounts linked to a summary account call the Get All Accounts API with the summaryAccountID filter.

LinkSubAccountsV202407 Permissions: Accounts (Edit)

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 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"
}