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
}
}
'import requests
url = "https://clarus-api.com/api/tasks/complete_collection"
payload = {
"warehouse_id": 1,
"task_type_code": "PICK",
"filters": {
"location_from_id": 10,
"product_id": 42
}
}
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
warehouse_id: 1,
task_type_code: 'PICK',
filters: {location_from_id: 10, product_id: 42}
})
};
fetch('https://clarus-api.com/api/tasks/complete_collection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Tasks
Complete filtered tasks
Complete multiple tasks of a single type matching the supplied filters in one request. Tasks are matched by warehouse, task type, and the contents of filters; up to 50 are completed per call. The values in attributes are applied to each matched task before completion, so they apply uniformly to the whole set. This endpoint does NOT use JSON:API format.
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
}
}
'import requests
url = "https://clarus-api.com/api/tasks/complete_collection"
payload = {
"warehouse_id": 1,
"task_type_code": "PICK",
"filters": {
"location_from_id": 10,
"product_id": 42
}
}
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
warehouse_id: 1,
task_type_code: 'PICK',
filters: {location_from_id: 10, product_id: 42}
})
};
fetch('https://clarus-api.com/api/tasks/complete_collection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}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
| Field | Required | Description |
|---|---|---|
warehouse_id | Yes | Warehouse ID to scope the tasks |
task_type_code | Yes | Task type code. One of: PICK, DISP, RCV, PWAY, TRAN, REPLEN, LOAD, CONV |
filters | Yes | Must contain at least one filter key. Filters are combined with AND. |
filters.location_from_id | No | Restrict to tasks with this source location |
filters.product_id | No | Restrict to tasks for this product |
filters.storage_unit_from_id | No | Restrict to tasks with this source storage unit |
attributes | No | Attributes applied to each matched task before completion. Same shape as the PATCH /api/tasks/{id} attributes. |
Minimum Attributes per Task Type
Theattributes 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 type | Minimum attributes |
|---|---|
PICK | confirmed_quantity, location_to_id |
RCV | confirmed_quantity, location_to_id, storage_unit_to_id |
PWAY | confirmed_quantity, location_to_id, storage_unit_to_id |
TRAN | location_to_id, storage_unit_to_id |
CONV | confirmed_quantity (optional; defaults to the task’s start_quantity) |
REPLEN | confirmed_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_quantityon aPICK).
Authorizations
Body
application/json
Response
Operation completed successfully with no content to return

