PUT /api/v202206/vendor/{vendorId}/template

Updates the template for the specified vendor

PutVendorTemplateV202206 Permissions: Vendors (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
vendorId The vendor to apply the template to integer (int32) Required

Request Body

Array of:

TemplateVendorLineRequestV202206
Property Description Type
caption The label for this line, that will be shown on the bill Required Must be between 0 and 100 characters string
observationTypeId Specifies the type of line to create Only cost observation types are allowed To get the valid list of observation type ids call the GetObservationTypes API with ?filter=nounId one of ‘4’|‘6’|‘23’ Required integer (int32)
Example Request Body application/json
[
  {    "caption": "string",    "observationTypeId": 1
  }
]

Responses

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

Response Body Parameters

TemplateVersion
Property Description Type
beginDate The begin date of the template version string (date-time)
endDate The end date of the template version string (date-time)
templateId The identifier for the template integer (int32)
templateLines An array of template lines belonging to the template version TemplateLine[]
TemplateLine properties
Property Description Type
beginDay The begin day integer (int32)
caption The caption string
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
costUnit UnitResponse
UnitResponse properties
Property Description Type
unitCode string
unitId integer (int32)
unitInfo string
unitType UnitType
UnitType properties
Property Description Type
unitTypeCode string
unitTypeId integer (int32)
unitTypeInfo string
displayOrder The display order integer (int32)
endDay The end day integer (int32)
fromPrevTemplateLineId The from previous template line identifier integer (int32)
helpTag The help tag string
isRequired Indicates whether a template line value is required or not required boolean
observationType ObservationType
ObservationType properties
Property Description Type
creation integer (int32)
credit integer (int32)
noun integer (int32)
observationTypeCode Must be between 0 and 16 characters string
observationTypeId integer (int32)
observationTypeInfo Must be between 0 and 32 characters string
timeOfUse integer (int32)
templateLineId The template line identifier integer (int32)
unit UnitResponse
UnitResponse properties
Property Description Type
unitCode string
unitId integer (int32)
unitInfo string
unitType UnitType
UnitType properties
Property Description Type
unitTypeCode string
unitTypeId integer (int32)
unitTypeInfo string
versionId The identifier for the template version integer (int32)
Example Response application/json
{  "beginDate": "2026-03-30",  "endDate": "2026-03-30",  "templateId": 1,  "templateLines": [
    {    "beginDay": 1,    "caption": "string",    "commodity": {      "commodityCode": "string",      "commodityIcon": {},      "commodityId": 1,      "commodityInfo": "string"
    },    "costUnit": {      "unitCode": "string",      "unitId": 1,      "unitInfo": "string",      "unitType": {}
    },    "displayOrder": 1,    "endDay": 1,    "fromPrevTemplateLineId": 1,    "helpTag": "string",    "isRequired": false,    "observationType": {      "creation": 1,      "credit": 1,      "noun": 1,      "observationTypeCode": "string",      "observationTypeId": 1,      "observationTypeInfo": "string",      "timeOfUse": 1
    },    "templateLineId": 1,    "unit": {      "unitCode": "string",      "unitId": 1,      "unitInfo": "string",      "unitType": {}
    }
  }
  ],  "versionId": 1
}