Apply a task template to a trip
Applies one of the agency's task templates (templateId from GET /crm/settings, taskTemplates) to a trip: each step of the template becomes a task of the trip, dated its offsetDays from the trip's start, end or creation (undated when the trip lacks that date), with origin TEMPLATE, all written at once. Every task is assigned to the caller, to assignedUserId, or with assignedUserId null to the trip's advisor. Publishes crm.task-changed.v1 with action CREATED for each task, and answers them all, in the template's order, with nextToken null. The caller must be the trip's advisor of record or an agency admin. Requires an Idempotency-Key header: a retry with the same key and body answers the same tasks. Errors: 400 ERROR_BODY_VALIDATION, 400 CRM_TASK_TEMPLATE_NOT_FOUND for a template the agency does not have, 404 ERROR_ITEM_NOT_FOUND for a trip the caller may not write about, 409 CRM_IDEMPOTENCY_CONFLICT for a key used with another body, and for a template already applied to the trip.
Authorization
Path parameters
Header parameters
Request body JSON required
Returns
200
OK