Create a task template: a configuration that creates tasks automatically when a platform trigger fires. The trigger names a business fact (tour created, tour assigned, stop arrived, tour completed, shipment created); 'stop-arrived' covers driver arrival steps and integrated-carrier arrival reports alike. Each trigger provides data objects (tour; additionally stop for stop arrival; shipment for shipment triggers) that the template's task name, description, and form may reference in Liquid expressions, resolved once per created task; the same objects' fields are available to the optional rule-group filter that narrows which occurrences fire (dotted paths, e.g. 'tour.carrier' or 'stop.address.city').
Liquid syntax, unknown root variables, and filter fields/operators are validated at save time; a broken definition is rejected with per-field issues. Tasks created by a template carry origin 'template', the template's id in templateId, and the resolved form snapshot; a stop task references its STOP by the stop's stable id (orn:
An optional key gives the template a stable routing label that created tasks carry as templateKey. It must be unique per organization (deleted templates keep theirs, so a key is never reused for a different template) and cannot be changed after creation. The template's identity stays id.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400bad request - invalid template definition
401unauthorized
409conflict - the key is already used by another template (internalCode TASK_TEMPLATE_KEY_TAKEN; the body names the holder in holderId and its status in holderStatus when the caller may read that template)
