Skip to main content

Assign Sampler to Task

Method: PATCH
/api/v1/task-requests/{id}/assign-sampler


Description

This endpoint assigns a sampler to a task request. It allows updating the task with sampler details, pickup address, due date, and priority.


🔑 Authentication

This endpoint requires authentication via headers.

ParamValueType
countryCode{{countryCode}}string (optional)
userId{{userId}}string (optional)
tenantId{{tenantId}}string (optional)

Path Parameter

NameTypeDescription
idstringThe unique ID of the task request.

Request Body

{
"samplerId": "string",
"description": "string",
"pickupAddress": "string",
"dueDate": "string",
"priority": "LOW"
}

Request Body Explanation

NameTypeDescription
samplerIdstringThe unique ID of the sampler assigned to the task.
descriptionstringA description of the task.
pickupAddressstringThe address where the sampler should pick up the task materials.
dueDatestringThe date by which the task is due (in ISO 8601 format).
prioritystringThe priority level of the task (LOW, MEDIUM, HIGH).

Response: 200

{
"message": "Sampler assigned successfully.",
"taskId": "task123",
"samplerId": "sampler456",
"status": "ASSIGNED"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /api/v1/task-requests/{id}/assign-sampler \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!