Skip to main content
POST
/
api
/
tasks
/
complete_collection
Complete filtered tasks
curl --request POST \
  --url https://clarus-api.com/api/tasks/complete_collection \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "warehouse_id": 1,
  "task_type_code": "PICK",
  "filters": {
    "location_from_id": 10,
    "product_id": 42
  }
}
'
{
  "error": "<string>"
}

Request Structure

{
  "warehouse_id": 1,
  "task_type_code": "PICK",
  "filters": {
    "location_from_id": 10,
    "product_id": 42
  },
  "attributes": {
    "confirmed_quantity": 10.0,
    "notes": "Completed via bulk action"
  }
}

Key Fields

FieldRequiredDescription
warehouse_idYesWarehouse ID to scope the tasks
task_type_codeYesTask type code. One of: PICK, DISP, RCV, PWAY, TRAN, REPLEN, LOAD, CONV
filtersYesMust contain at least one filter key. Filters are combined with AND.
filters.location_from_idNoRestrict to tasks with this source location
filters.product_idNoRestrict to tasks for this product
filters.storage_unit_from_idNoRestrict to tasks with this source storage unit
attributesNoAttributes applied to each matched task before completion. Same shape as the PATCH /api/tasks/{id} attributes.

Minimum Attributes per Task Type

The attributes block needs to carry the fields each task type requires in order to complete. The minimum payload per type mirrors the single-task completion path:
Task typeMinimum attributes
PICKconfirmed_quantity, location_to_id
RCVconfirmed_quantity, location_to_id, storage_unit_to_id
PWAYconfirmed_quantity, location_to_id, storage_unit_to_id
TRANlocation_to_id, storage_unit_to_id
CONVconfirmed_quantity (optional; defaults to the task’s start_quantity)
REPLENconfirmed_quantity, location_to_id
DISP and LOAD tasks are not usually completed via this endpoint. Use the shipment dispatch flow for DISP and POST /api/load_tasks/{id}/load_storage_unit for LOAD.

Behavior

  • Matches tasks by warehouse_id, task_type_code, and the supplied filters (AND-combined).
  • Up to 50 matching tasks are completed per request.
  • Returns 204 No Content on success.
  • Returns 422 if no filters are supplied, if no tasks match, or if a matched task fails its per-type validations (e.g. missing confirmed_quantity on a PICK).

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.

Body

application/json
warehouse_id
integer
required

Warehouse ID to scope the tasks

task_type_code
enum<string>
required

Task type code

Available options:
PICK,
DISP,
RCV,
PWAY,
TRAN,
REPLEN,
LOAD,
CONV
filters
object
required

At least one filter must be specified. Maximum 50 tasks will be completed per request.

attributes
object

Optional attributes to set on each task before completion. Accepts the same fields as the task update endpoint.

Response

Operation completed successfully with no content to return