Field work records

Update Field Work Record

Changed on

Change what a field work 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 fieldwork. Needs a grant that allows editing the task. Never invent a batch, expiry, rate or withholding period. The id is the fieldwork.id of the task, not the task's id. Read warnings on the response: a harvest or a hay cut before a withholding period ends is flagged there. 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.

patch/fieldwork-records/{id}

Request

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

Path parameters

idstring required

The field work record's id (fieldwork.id on the task).

Request body

Example request

{
  "data": {
    "date": "2026-09-28"
  }
}

Response

The task, with its fieldwork.

Example response

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

Changes

    • info

      added the new enum value to the request property //// (media type: application/vnd.api+json)

    • info

      added the new enum value to the request property //// (media type: application/vnd.api+json)

    • info

      added the new enum value to the request property /// (media type: application/json)

    • info

      added the new enum value to the request property /// (media type: application/json)

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status