> ## 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.

# Update field

> Update mutable fields on a field. Only provided fields are touched.

```
PUT https://www.wiseyield.co/api/v1/farms/{id}/fields/{fieldId}
```

### Authentication

Requires a key with the `fields:write` scope.

### Path parameters

<ParamField path="id" type="string" required>Farm UUID.</ParamField>
<ParamField path="fieldId" type="string" required>Field UUID.</ParamField>

### Request body

All fields are optional. Only fields you include in the body are updated.

<ParamField body="name" type="string">1–200 characters.</ParamField>
<ParamField body="description" type="string">Up to 2,000 characters. Pass `null` to clear.</ParamField>
<ParamField body="area" type="number | string">Positive number in the farm's `areaUnit`.</ParamField>
<ParamField body="boundaries" type="object">GeoJSON `Polygon`. Pass `null` to clear.</ParamField>
<ParamField body="soilType" type="string">Up to 100 characters. Pass `null` to clear.</ParamField>
<ParamField body="soilPh" type="number | string">Pass `null` to clear.</ParamField>
<ParamField body="status" type="string">One of `active`, `fallow`, `preparing`, `planted`.</ParamField>
<ParamField body="notes" type="string">Up to 5,000 characters. Pass `null` to clear.</ParamField>

### Irrigation overrides (Blueprint §9.4)

These override the farm-wide irrigation defaults for this field.

<ParamField body="irrigationFlowRatePerEmitter" type="number">Liters/hour per emitter, 0–100.</ParamField>
<ParamField body="emittersPerPlant" type="integer">0–50.</ParamField>
<ParamField body="dripLineSpacingMeters" type="number">0–20 meters.</ParamField>
<ParamField body="customIrrigationSystem" type="string">One of `drip`, `sprinkler`, `flood`, `pivot`, `manual`, `none`.</ParamField>

### Response

Returns the updated field wrapped under `data`.

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888...' \
    -H "Authorization: Bearer $WISEYIELD_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "status": "preparing", "notes": "Tilled, ready for planting" }'
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    `https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}`,
    {
      method: 'PUT',
      headers: {
        Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ status: 'preparing' }),
    }
  );
  const { data: field } = await res.json();
  ```

  ```python Python theme={null}
  import os, requests
  res = requests.put(
      f'https://www.wiseyield.co/api/v1/farms/{farm_id}/fields/{field_id}',
      headers={
          'Authorization': f"Bearer {os.environ['WISEYIELD_API_KEY']}",
          'Content-Type': 'application/json',
      },
      json={'status': 'preparing'},
  )
  field = res.json()['data']
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "88888888-9999-aaaa-bbbb-cccccccccccc",
      "farmId": "11111111-2222-3333-4444-555555555555",
      "name": "North Field",
      "status": "preparing",
      "notes": "Tilled, ready for planting",
      "updatedAt": "2026-05-17T17:05:00.000Z"
    }
  }
  ```
</ResponseExample>

## Errors

| Status                    | When                                                                     |
| ------------------------- | ------------------------------------------------------------------------ |
| `400 INVALID_ID`          | `{id}` or `{fieldId}` is not a valid UUID                                |
| `400 VALIDATION_ERROR`    | Body validation failed                                                   |
| `401`                     | Missing, malformed, expired, or revoked API key                          |
| `403 INSUFFICIENT_SCOPE`  | Key lacks `fields:write` scope                                           |
| `404 NOT_FOUND`           | Farm or field doesn't exist, is soft-deleted, or belongs to another user |
| `429 RATE_LIMIT_EXCEEDED` | Per-user rate limit reached                                              |
| `5xx`                     | Server error                                                             |
