Exit a task (HHD)
curl --request POST \
--url https://clarus-api.com/api/tasks/{id}/exit \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/tasks/{id}/exit"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/tasks/{id}/exit', 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": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Tasks
Exit a task (HHD)
Used by handheld devices (HHDs) to exit/release a task. Behavior depends on the current task state: if ALLOCATED to the current user, unallocates the task and clears user_id, assigned_at, and start_at; if AVAILABLE or COMPLETED, updates last_accessed_at only.
POST
/
api
/
tasks
/
{id}
/
exit
Exit a task (HHD)
curl --request POST \
--url https://clarus-api.com/api/tasks/{id}/exit \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/tasks/{id}/exit"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/tasks/{id}/exit', 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": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Behavior
This endpoint is used by handheld devices (HHDs) to release tasks they have entered.State Transitions
| Current State | Action |
|---|---|
| ALLOCATED (to current user) | Sets status to AVAILABLE, clears user_id, assigned_at, start_at |
| AVAILABLE | Updates last_accessed_at only |
| COMPLETED | Updates last_accessed_at only |
- Returns 204 No Content on success
- No request body required
Authorizations
Response
Operation completed successfully with no content to return

