Skip to main content
PATCH
/
api
/
tasks
/
{id}
Update or complete a task
curl --request PATCH \
  --url https://clarus-api.com/api/tasks/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "tasks",
    "attributes": {
      "priority": 10,
      "notes": "Urgent - customer waiting",
      "location_to_id": 25,
      "confirmed_quantity": 8
    }
  }
}
'
{
  "data": {
    "id": "1",
    "type": "tasks",
    "attributes": {
      "status": "AVAILABLE",
      "subtype": "standard",
      "priority": 10,
      "notes": "Urgent - customer waiting",
      "start_quantity": 10,
      "confirmed_quantity": 8,
      "stock_description": "Widget A",
      "created_at": "2026-03-10T08:00:00Z",
      "completed_at": null,
      "last_accessed_at": "2026-03-12T09:30:00Z",
      "start_at": null,
      "boolean1": null,
      "boolean2": null,
      "boolean3": null,
      "boolean4": null,
      "boolean5": null,
      "datetime1": null,
      "datetime2": null,
      "datetime3": null,
      "datetime4": null,
      "datetime5": null,
      "integer1": null,
      "integer2": null,
      "integer3": null,
      "integer4": null,
      "integer5": null,
      "string1": null,
      "string2": null,
      "string3": null,
      "string4": null,
      "string5": null
    },
    "relationships": {
      "account": {
        "data": {
          "id": "1",
          "type": "accounts"
        }
      },
      "warehouse": {
        "data": {
          "id": "1",
          "type": "warehouses"
        }
      },
      "product": {
        "data": {
          "id": "42",
          "type": "products"
        }
      },
      "location_from": {
        "data": {
          "id": "10",
          "type": "locations"
        }
      },
      "location_to": {
        "data": {
          "id": "25",
          "type": "locations"
        }
      },
      "task_type": {
        "data": {
          "id": "1",
          "type": "task_types"
        }
      },
      "goods_out": {
        "data": {
          "id": "100",
          "type": "goods_outs"
        }
      },
      "goods_out_line": {
        "data": null
      },
      "goods_out_pick_list": {
        "data": null
      },
      "inbound_good": {
        "data": null
      },
      "inbound_item": {
        "data": null
      },
      "last_accessed_by_user": {
        "data": null
      },
      "stock": {
        "data": null
      },
      "storage_unit_from": {
        "data": null
      },
      "storage_unit_to": {
        "data": null
      },
      "user_completed_by": {
        "data": null
      },
      "user_created_by": {
        "data": {
          "id": "5",
          "type": "users"
        }
      }
    }
  }
}

Request Structure

{
  "data": {
    "type": "tasks",
    "attributes": {
      "priority": 10,
      "notes": "Urgent - customer waiting",
      "location_to_id": 25,
      "confirmed_quantity": 8.0
    }
  }
}

Completing a Task

A single task is completed through this endpoint by setting status to "completed" together with the attributes required for the task’s type. The table below lists the minimum payload to complete each type; additional fields may be set in the same request when they need updating at the same time.
Task typeMinimum attributes to complete
PICKstatus, confirmed_quantity, location_to_id (drop location)
RCVstatus, confirmed_quantity, location_to_id, storage_unit_to_id
PWAYstatus, confirmed_quantity, location_to_id, storage_unit_to_id
TRANstatus, location_to_id, storage_unit_to_id
CONVstatus (optionally confirmed_quantity; defaults to the task’s start_quantity)
REPLENstatus, confirmed_quantity, location_to_id
DISPstatus for SHIPMENT subtype only. LOAD-subtype DISP tasks must be completed by dispatching the load, not via this endpoint.
LOADNot completable via this endpoint. Use POST /api/load_tasks/{id}/load_storage_unit.
To complete many tasks of the same type in one call, use POST /api/tasks/complete_collection with a task_type_code and a filters block.

Key Fields

FieldRequiredDescription
account_idNoStock account ID
warehouse_idNoWarehouse ID
priorityNoTask priority (higher = more urgent)
notesNoFree-text notes
statusNoTask status. Set to completed to complete the task (see Completing a Task above).
location_from_idNoSource location ID
location_to_idNoDestination location ID
product_idNoProduct ID
start_quantityNoStarting quantity (>= 0)
confirmed_quantityNoConfirmed/completed quantity (>= 0)
start_atNoPlanned start datetime
end_atNoPlanned end datetime
completed_atNoCompletion datetime
assigned_atNoAssignment datetime
user_idNoAssigned user ID
user_created_by_idNoUser who created the task
user_completed_by_idNoUser who completed the task
device_type_idNoDevice type ID
device_idNoDevice ID
storage_unit_from_idNoSource storage unit ID
storage_unit_to_idNoDestination storage unit ID
stock_idNoAssociated stock record ID
load_idNoAssociated load ID
load_drop_idNoAssociated load drop ID
dispatch_container_idNoAssociated dispatch container ID
parent_task_idNoParent task ID for subtasks
transaction_number_idNoTransaction number ID
transaction_line_idNoTransaction line ID
stock_descriptionNoStock description text
drop_sequenceNoDrop sequence (1-9999999999)
serial_numbersNoArray of serial number strings
string1-string5NoCustom string fields
integer1-integer5NoCustom integer fields
datetime1-datetime5NoCustom datetime fields
boolean1-boolean5NoCustom boolean fields

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the task to update

Body

application/json
data
object
required

Response

Task updated successfully

Task response in JSON:API format

data
object