> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withleaf.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Growers

> How Leaf manages growers in the Grower/Farm/Field hierarchy, including provider sync from John Deere, manual creation, and the grower-farm-field relationship.

Growers sit at the top of Leaf's field hierarchy. They represent the data owner, typically a farmer or farm operation. Growers are synced from connected providers or created manually.

## How growers map to providers

Each provider has its own concept of the data owner:

* **John Deere** — Growers correspond to John Deere "Clients." The `name` property comes directly from the Client name.
* **Other providers** — The mapping varies. Some providers have a direct grower equivalent; others do not.

When Leaf syncs from a provider, it creates grower records with the provider's identifiers attached (`providerName`, `providerGrowerId`).

## Grower resource

```json theme={null}
{
  "id": 873300016,
  "name": "Smith Farms",
  "leafUserId": "1d3ecb0f-bf3d-42db-aae6-8c45c045d28c",
  "providerName": "JohnDeere",
  "providerId": 2,
  "providerGrowerId": "1Grower",
  "farmIds": [1538766, 1538767],
  "createdTime": "2023-06-06T03:31:39.966630Z",
  "updatedTime": "2023-06-07T20:01:14.814346Z"
}
```

A grower links to one Leaf user and contains a list of farm IDs. Farms in turn contain field IDs. The `name` property is present only when a name is available from the provider or was set manually.

## Creating a grower

`POST /services/fields/api/users/{leafUserId}/growers`

```json theme={null}
{
  "name": "Smith Farms"
}
```

Only the `name` field is accepted. Leaf assigns the grower an auto-generated integer ID.

## Updating a grower

`PUT /services/fields/api/users/{leafUserId}/growers/{id}`

You can update the `name` field.

## Listing growers

`GET /services/fields/api/growers`

Returns a paged list of all growers. Filter by `provider`, `leafUserId`, or use `page` and `size` for pagination.

## Enabling preview fields by grower

When `customDataSync` is enabled, you can activate all preview fields under one or more growers at once:

`POST /services/fields/api/growers/enableSync`

```json theme={null}
{
  "growerIds": [873300016, 873300017]
}
```

This removes all of those growers' fields from `PREVIEW` mode and queues them for the next full sync. It's faster than enabling fields individually when you want to onboard an entire grower.

## Farms

Farms group fields under a grower. They work the same way as growers: synced from providers or created manually.

`POST /services/fields/api/users/{leafUserId}/farms` creates a farm. You can pass `name` and optionally `growerId` to link it to a grower.

`GET /services/fields/api/farms` lists all farms, filterable by `growerId`, `provider`, and `leafUserId`.

## What to do next

* [Fields Overview](/fields/overview) — The full Grower/Farm/Field hierarchy.
* [Managing Fields](/fields/managing-fields) — Working with fields and boundaries.
* [API Reference: Growers](/api-reference/growers) — Full endpoint reference for grower and farm operations.
