Skip to main content
POST
/
api
/
v1
/
tasks
/
{id}
/
complete
curl -X POST 'https://www.wiseyield.co/api/v1/tasks/aaaaaaaa.../complete' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "photoUrl": "https://example.com/proof.jpg",
    "gpsLat": 30.0444,
    "gpsLng": 31.2357,
    "notes": "Applied 2.5 L/ha"
  }'

Documentation Index

Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt

Use this file to discover all available pages before exploring further.

POST https://www.wiseyield.co/api/v1/tasks/{id}/complete
Sets status="completed" and completedDate=now() (unless already set), and persists optional evidence fields on the task row.
SOP-step completion deferred. The dashboard /api/tasks/{id}/complete route also supports step-by-step completion for SOP-driven tasks (Blueprint §9.5). The v1 wrapper handles plain-task completion only. SOP-step completion via API key is part of a future batch.

Authentication

Requires a key with the tasks:write scope.

Path parameters

id
string
required
Task UUID.

Request body

All fields optional.
photoUrl
string
URL pointing to evidence photo (e.g. uploaded to your own S3).
gpsLat
number
Latitude, −90 to 90.
gpsLng
number
Longitude, −180 to 180.
notes
string
Up to 2,000 characters.

Response

Returns the updated task wrapped under data (status now completed).
curl -X POST 'https://www.wiseyield.co/api/v1/tasks/aaaaaaaa.../complete' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "photoUrl": "https://example.com/proof.jpg",
    "gpsLat": 30.0444,
    "gpsLng": 31.2357,
    "notes": "Applied 2.5 L/ha"
  }'

Errors

StatusWhen
400 INVALID_ID{id} is not a valid UUID
400 VALIDATION_ERRORBody validation failed
401Missing, malformed, expired, or revoked API key
403 INSUFFICIENT_SCOPEKey lacks tasks:write scope
404 NOT_FOUNDTask doesn’t exist or belongs to another user
429 RATE_LIMIT_EXCEEDEDPer-user rate limit reached
5xxServer error