Update Treatment Record
Change what a treatment carries after the fact: any of the attributes below, and products, which REPLACES the whole product set (position is the array index, at most 10). An attribute that is not sent is left alone. Answers with the task, exactly as GET /tasks/{id} would, with its treatment. Needs a grant that allows editing the task. Never invent a batch, expiry, rate or withholding period. The id is the treatment.id of the task, not the task's id. Photos. A file on disk is staged with createImageUpload, whose curl_example PUTs the bytes, and attached with image_upload_ids. Never base64-encode a local photo into a tool call. A public http(s) URL: pass image_urls. Only a tiny generated image (under about 100 KB decoded) uses image_base64s. One upload can be attached to several records until it expires. On update, image_mode defaults to append (add to the existing photos); replace swaps them all out; remove_image_ids deletes specific ones. If any image fails, the whole create or update is rolled back. The attaching call still needs confirm: true. createImageUpload and its PUT do not.
Request
- Base URL: https://api.purplegrain.com/api/v1
- URL: https://api.purplegrain.com/api/v1/treatment-records/{id}
- Auth: HTTP bearer
Path parameters
The treatment record's id (treatment.id on the task).
Request body
Example request
{
"data": {
"date": "2026-09-28"
}
}Response
The task, with its treatment.
Example response
{
"data": {
"type": "task"
}
}Changes
No recorded changes to this operation across all 3 revisions of this API.