Skip to content

Create one or more jobs from job templates

Request

🔐 Required role: PROJ_C

📖 Data dictionary: Project

Create jobs from job templates

Creates one or more jobs for a client from job templates. Up to 100 templates may be provided in a single request. Each entry in jobTemplates can override field-level defaults defined on the template.

Required fields:

  • clientId — the client for whom the jobs are being created
  • jobTemplates — list of job templates to instantiate (1–100 entries)
    • jobTemplateId — the template to create a job from

Optional per-template overrides (each overrides the template default if provided):

  • startDate — job start date
  • name — job name
  • serviceDescription — service description
  • estimationHours — estimated hours
  • feeAmount — fee amount
  • requiredPrepayment — required prepayment amount
  • includeWipType — WIP billing behavior (INCLUDE_WIP, INCLUDE_WIP_IF_FINAL, DO_NOT_INCLUDE)
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/jsonrequired
clientIdinteger, (int64)required

Unique identifier of the client for whom jobs are being created

Example:420
jobTemplatesArray of objects, [ 1 .. 100 ] itemsrequired

List of job templates to instantiate (1–100 entries)

curl -i -X POST \
  https://api.sandbox.aiwyn.app/api/v1/projects/create_from_template \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "clientId": 420,
    "jobTemplates": [
      {
        "jobTemplateId": 7
      }
    ]
  }'

Responses

Jobs created successfully

Bodyapplication/json
Array of integers, (int64)

List of IDs for the newly created jobs

Response
[ 1001, 1002 ]