Sub-jobs
Since 1/2025, sub-jobs API are fully supported via the API. This guide demonstrates best practices for working with the sub-jobs API.
Creating Sub-Jobs
When creating a sub-job under an existing parent job, keep the following points in mind:
Parent Job Requirements: The parent job must already contain at least one sub-job. This is a product limitation: sub-jobs can only be added or edited if the parent job was created with at least one sub-job.
Use Parent Data: If you set the useParentData field to true, you must include the following fields in the request: description, gps (location), assign
Refer to the payload examples below for implementation details.
Specify Parent Job ID: Every request must include the parent_job_id.
Payload example for create sub-jobs request (useParentData set to true):
{
title: 'Sub job',
code: '12234',
useParentData: true,
parentId: '12312321-sdfsf-31231231'
}
Payload example for create sub-jobs request (useParentData set to false):
{
title: 'Sub job',
code: '12234',
useParentData: false,
parentId: '12312321-sdfsf-31231231',
assign: {
type: 'both',
userIds: [],
groupIds: [123123, 13123]
},
description: 'test',
gps: {address: 'New York city'}
}
Update sub-job
Updating a single sub-job is available via the Update job method. The payload is similar to the above example, and remember to pass the sub-job ID in the path params.
Delete sub-job
In order to delete a single sub-job, simply pass the sub-job ID to the path params in the Delete job method.
Updated 2 days ago