Update Spray Record
Change any supplied spray details, including area, products, application method, equipment settings and weather readings (products replaces the set; omitted fields stay unchanged). 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 SprayRecord id (spray.id on the task), not the task id. A done record with no product row is refused (422, "A spray needs at least one product"). Never invent a batch, rate or withholding period. 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.
Request
- Base URL: https://api.purplegrain.com/api/v1
- URL: https://api.purplegrain.com/api/v1/spray-records/{id}
- Auth: HTTP bearer
Path parameters
The SprayRecord id (spray.id on the task).
Request body
Example request
{
"data": {
"date": "2026-09-28",
"description": "Spot spray the thistles"
}
}Response
Success. The task, with its spray.
Example response
{
"data": {
"type": "task"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.