Create a task in the order
https://carchost.fieldcontrol.com.br/orders/{id}/tasksAdds a task to an existing work order.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredWork order identifier.
Example: NDJiMWQ0YzQtOWNmOC00NWE2LTg2MjItYjNjNzZjZjk0MmM4OjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
statusstringrequiredTask status.
Accepted values: pending, scheduled, in-progress, done, canceled, reported, on-route, paused.
employeeobjectEmployee in charge.
Fields of employee
idstringEmployee identifier.
namestringEmployee name. Texts are accepted, but the link is made by id.
taskTypeobjectTask type.
Fields of taskType
idstringTask type identifier.
descriptionstringTask description.
Accepts: null.
statusDescriptionstringNote about the status. Up to 6,000 characters.
Accepts: null.
durationintegerExpected duration, in minutes. If omitted when creating the order, the API uses the duration of the work order type.
Accepts: null.
positionintegerOrder of the task within the work order.
Default: 100.
archivedbooleanArchives the task.
Default: false.
schedulingobjectrequiredScheduling. type is calculated: with date and time it becomes scheduled-date-and-time, with only date it becomes scheduled-date, and without a date it becomes non-scheduled.
Fields of scheduling
typestringIgnored; calculated from date and time.
Accepted values: scheduled-date, scheduled-date-and-time, non-scheduled.
datestringDate (AAAA-MM-DD).
Accepts: null.
timestringTime (HH:MM:SS).
Accepts: null.
coordsobjectrequiredCoordinates of the task location.
Fields of coords
latitudenumberrequiredlongitudenumberrequiredResponses
- 201
Task created.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 404
Resource not found. The response body is empty.
- 422
Invalid body (resourceValidationErr): employee not found or inactive, nonexistent or archived task type, invalid status or scheduling. Invalid order identifier: uriValidationErr.
- 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.