Drench records

Update Drench Record

Change a drench's head and/or products in place (products replaces the set). On a done record this never reopens the task; on an open task the same child is updated. Answers with the task exactly as GET /tasks/{id} would. id is the DrenchRecord id (drench.id on the task), not the task id. A done record with no product row is refused (422, "A drench needs at least one product"). If the label has no ESI, send the WHP number as esi_days. Never invent a batch, WHP or ESI. If the call errors or times out, read the record back before retrying. Needs a grant that allows writing in the record's business. A 403 whose code is insufficient_access is that refusal; show its detail and do not retry. Photos. A file on disk: call createImageUpload, run the returned curl_example from the shell, then pass 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.

put/drench-records/{id}

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/drench-records/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The DrenchRecord id (drench.id on the task).

Request body

Example request

{
  "data": {
    "date": "2025-12-23",
    "description": "Drench rams"
  }
}

Response

Success. The task, with its drench.

Example response

{
  "data": {
    "type": "task"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.