Skip to main content

Create a task in the order

POSThttps://carchost.fieldcontrol.com.br/orders/{id}/tasks

Adds a task to an existing work order.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Work order identifier.

Example: NDJiMWQ0YzQtOWNmOC00NWE2LTg2MjItYjNjNzZjZjk0MmM4OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

statusstringrequired

Task status.

Accepted values: pending, scheduled, in-progress, done, canceled, reported, on-route, paused.

employeeobject

Employee in charge.

Fields of employee
idstring

Employee identifier.

namestring

Employee name. Texts are accepted, but the link is made by id.

taskTypeobject

Task type.

Fields of taskType
idstring

Task type identifier.

descriptionstring

Task description.

Accepts: null.

statusDescriptionstring

Note about the status. Up to 6,000 characters.

Accepts: null.

durationinteger

Expected duration, in minutes. If omitted when creating the order, the API uses the duration of the work order type.

Accepts: null.

positioninteger

Order of the task within the work order.

Default: 100.

archivedboolean

Archives the task.

Default: false.

schedulingobjectrequired

Scheduling. 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
typestring

Ignored; calculated from date and time.

Accepted values: scheduled-date, scheduled-date-and-time, non-scheduled.

datestring

Date (AAAA-MM-DD).

Accepts: null.

timestring

Time (HH:MM:SS).

Accepts: null.

coordsobjectrequired

Coordinates of the task location.

Fields of coords
latitudenumberrequired
longitudenumberrequired

Responses

  • 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.