Skip to main content

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.

ParamValueType
countryCode{{countryCode}}string
userId{{userId}}string
tenantId{{tenantId}}string

Query Parameters

NameTypeDescriptionAvailable Values
byTaskTypestringFilter by task type.LABORATORY, SAMPLER
byPrioritystringFilter by task priority.LOW, MEDIUM, HIGH
bySamplerStatusstringFilter by sampler status.PENDING, ACCEPTED, DECLINED
byLaboratoryStatusstringFilter by laboratory status.PENDING, ACCEPTED, DECLINED
byEntityTypestringFilter by entity type related to the task.TRADE, PRODUCT
byIndependentSamplerIdsstringFilter by independent sampler IDs.N/A
byLaboratoryIdsstringFilter by laboratory IDs.N/A
byTenantIdsstringFilter 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

AUTHORIZATION

Bearer

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!