Enter a task (HHD)
curl --request POST \
--url https://clarus-api.com/api/tasks/{id}/enter \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/tasks/{id}/enter"
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}/enter', 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
Enter a task (HHD)
Used by handheld devices (HHDs) to enter/claim a task. Behavior depends on the current task state: if AVAILABLE, allocates to the current user and sets assigned_at and start_at; if ALLOCATED to the current user, updates last_accessed_at; if ALLOCATED to a different user, returns an error.
POST
/
api
/
tasks
/
{id}
/
enter
Enter a task (HHD)
curl --request POST \
--url https://clarus-api.com/api/tasks/{id}/enter \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/tasks/{id}/enter"
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}/enter', 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 claim and enter tasks.State Transitions
| Current State | Action |
|---|---|
| AVAILABLE | Allocates task to current user, sets assigned_at and start_at |
| ALLOCATED (to current user) | Updates last_accessed_at timestamp |
| ALLOCATED (to different user) | Returns 422 error |
| COMPLETED | Returns 422 error |
- Returns 204 No Content on success
- No request body required
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The unique identifier of the task to enter
Response
Operation completed successfully with no content to return

