POST /api/v202206/bill/{billId}/account/{accountId}/template

Creates a new account template from an existing bill's cost-only line items

CreateAccountTemplateFromBillV202206 Permissions: Accounts (Edit)
Creates a template using the cost-only body lines from the specified bill that belong to the given account. Lines originating from a vendor template are excluded. The resulting template can be used for future bill entry.

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
billId Unique numeric identifier of the source bill integer (int32) Required
accountId Unique numeric identifier of the account whose lines will be used integer (int32) Required

Request Body

CreateTemplateFromBill
Property Description Type
note The template note Must be between 0 and 255 characters string
templateCode The template code Always converted to uppercase Required Must be between 0 and 32 characters string
Example Request Body application/json
{  "note": "string",  "templateCode": "string"
}

Responses

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

Response Body Parameters

TemplateResponse
Property Description Type
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
demandUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
note string
templateCode string
templateId integer (int32)
templateInfo string
useUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
versions VersionChild[]
VersionChild properties
Property Description Type
beginDate string (date-time)
endDate string (date-time)
versionId integer (int32)
Example Response application/json
{  "commodity": {    "commodityCode": "string",    "commodityIcon": {      "code": "string",      "color": "string"
    },    "commodityId": 1,    "commodityInfo": "string"
  },  "demandUnit": {    "unitCode": "string",    "unitId": 1,    "unitInfo": "string"
  },  "note": "string",  "templateCode": "string",  "templateId": 1,  "templateInfo": "string",  "useUnit": {    "unitCode": "string",    "unitId": 1,    "unitInfo": "string"
  },  "versions": [
    {    "beginDate": "2026-06-29",    "endDate": "2026-06-29",    "versionId": 1
  }
  ]
}