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

# Prescriptions

> Upload prescription maps through Leaf and use provider-specific list or download endpoints where available.

The Prescriptions API lets you upload prescription (Rx) maps to a grower's provider account. Leaf also stores uploaded prescription files and prescription records. Depending on the provider, you can also list existing prescriptions or download them through provider-specific endpoints.

## How it works

You upload a `.zip` file containing a shapefile set (`.shp`, `.dbf`, `.shx` — all with the same base name) to the provider-specific endpoint for a Leaf user. Leaf uses that user's provider credentials to push the prescription into the provider's platform and stores the uploaded file and prescription metadata. Where provider list or download endpoints exist, you can use those to retrieve provider-side prescription data.

Each provider has slightly different requirements and endpoint support:

**John Deere** — The zip must contain a folder named `Rx/` holding the shapefile set. Requires an `organizationId` query parameter. Supports upload, list, and download.

**CNHi** — Flat zip with no subfolders. Requires a `companyId` query parameter, which you can get from the grower endpoints' `providerOrganizationId` field. Supports upload and list.

**Climate FieldView** — Flat zip, no subfolders. No extra parameters needed. Upload only.

**Raven Slingshot** — Flat zip, no subfolders. Supports upload and list.

**Trimble** — Flat zip, no subfolders. Requires `organizationId`, `rateColumn`, and `rateUnit`. Upload only.

**Ag Leader** — Flat zip, no subfolders. Upload only.

## Key concepts

**Shapefile set** — Every prescription upload requires three files with identical base names: `.shp` (geometry), `.dbf` (attributes), `.shx` (spatial index). These are bundled into a single `.zip`.

**Provider-scoped** — Listing and download availability depends on the provider endpoint. John Deere supports upload, list, and download. CNHi and Raven Slingshot support upload and list. Climate FieldView, Trimble, and Ag Leader support upload only.

**Organization/company ID** — John Deere and CNHi require you to specify which provider-side organization the prescription belongs to. Other providers derive this from the Leaf user's credentials.

## What to do next

* [Prescriptions API Reference](/api-reference/beta-prescriptions) — Full endpoint details for uploading and listing prescriptions across all supported providers.
