Get Task Requests
Method: GET
/api/v1/task-requests
Description
This endpoint retrieves a list of task requests based on various filters. The tasks may be related to laboratories or samplers and can be filtered by task type, status, priority, and more.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
countryCode | {{countryCode}} | string |
userId | {{userId}} | string |
tenantId | {{tenantId}} | string |
Query Parameters
| Name | Type | Description | Available Values |
|---|---|---|---|
byTaskType | string | Filter by task type. | LABORATORY, SAMPLER |
byPriority | string | Filter by task priority. | LOW, MEDIUM, HIGH |
bySamplerStatus | string | Filter by sampler status. | PENDING, ACCEPTED, DECLINED |
byLaboratoryStatus | string | Filter by laboratory status. | PENDING, ACCEPTED, DECLINED |
byEntityType | string | Filter by entity type related to the task. | TRADE, PRODUCT |
byIndependentSamplerIds | string | Filter by independent sampler IDs. | N/A |
byLaboratoryIds | string | Filter by laboratory IDs. | N/A |
byTenantIds | string | Filter by tenant IDs. | N/A |
Response: 200 OK
A successful response returns a list of task requests with their details.
Example Response:
[
{
"taskId": "12345",
"taskType": "SAMPLER",
"priority": "HIGH",
"samplerStatus": "PENDING",
"laboratoryStatus": "ACCEPTED",
"entityType": "TRADE",
"independentSamplerId": "67890",
"laboratoryId": "54321",
"tenantId": "tenant123"
},
{
"taskId": "67891",
"taskType": "LABORATORY",
"priority": "MEDIUM",
"samplerStatus": "ACCEPTED",
"laboratoryStatus": "DECLINED",
"entityType": "PRODUCT",
"independentSamplerId": "11223",
"laboratoryId": "33445",
"tenantId": "tenant456"
}
]
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/task-requests \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!