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

# Quickstart

> Make your first ESA check in minutes

## Prerequisites

Before you begin, you'll need:

1. **An API key** — Contact [support@acreblitz.com](mailto:support@acreblitz.com) or visit [acreblitz.com/contact](https://www.acreblitz.com/contact) to get one
2. **A GeoJSON field boundary** — Polygon or MultiPolygon in EPSG:4326 (WGS84)
3. **Product EPA numbers** — Registration numbers for products in the tank mix

## Step 1: Set Your Auth Header

All requests require the `X-API-Key` header:

<Snippet file="auth-header.mdx" />

## Step 2: Make Your First ESA Check

Send a POST request to the `/api/v1/esa-check` endpoint with your application data.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://esa.acreblitz.com/api/v1/esa-check \
    -H "Content-Type: application/json" \
    -H "X-API-Key: your_api_key_here" \
    -d '{
      "account_id": "acct-98765",
      "provider_id": "your_provider_id",
      "field_name": "South Field 25",
      "application_id": "job-2024-06-15-002",
      "provider_field_id": "field-south-25",
      "application_method": "ground",
      "application_date": "2024-06-15",
      "field_boundary": {
        "type": "Feature",
        "geometry": {
          "type": "Polygon",
          "coordinates": [[
            [-95.284265, 42.263233],
            [-95.284470, 42.254180],
            [-95.267536, 42.254063],
            [-95.267341, 42.263116],
            [-95.284265, 42.263233]
          ]]
        }
      },
      "products": [
        {
          "epa_number": "62719-442",
          "product_name": "INTREPID 2F",
          "rate": 16.0,
          "rate_unit": "fl oz/acre"
        }
      ],
      "crop": ["corn"],
      "pest": ["corn borer"],
      "gpa": 10
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    'https://esa.acreblitz.com/api/v1/esa-check',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': process.env.ACREBLITZ_API_KEY!,
      },
      body: JSON.stringify({
        account_id: 'acct-98765',
        provider_id: 'your_provider_id',
        field_name: 'South Field 25',
        application_id: 'job-2024-06-15-002',
        provider_field_id: 'field-south-25',
        application_method: 'ground',
        application_date: '2024-06-15',
        field_boundary: {
          type: 'Feature',
          geometry: {
            type: 'Polygon',
            coordinates: [[
              [-95.284265, 42.263233],
              [-95.284470, 42.254180],
              [-95.267536, 42.254063],
              [-95.267341, 42.263116],
              [-95.284265, 42.263233],
            ]],
          },
        },
        products: [
          {
            epa_number: '62719-442',
            product_name: 'INTREPID 2F',
            rate: 16.0,
            rate_unit: 'fl oz/acre',
          },
        ],
        crop: ['corn'],
        pest: ['corn borer'],
        gpa: 10,
      }),
    }
  );

  const result = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://esa.acreblitz.com/api/v1/esa-check",
      headers={
          "Content-Type": "application/json",
          "X-API-Key": "your_api_key_here",
      },
      json={
          "account_id": "acct-98765",
          "provider_id": "your_provider_id",
          "field_name": "South Field 25",
          "application_id": "job-2024-06-15-002",
          "provider_field_id": "field-south-25",
          "application_method": "ground",
          "application_date": "2024-06-15",
          "field_boundary": {
              "type": "Feature",
              "geometry": {
                  "type": "Polygon",
                  "coordinates": [[
                      [-95.284265, 42.263233],
                      [-95.284470, 42.254180],
                      [-95.267536, 42.254063],
                      [-95.267341, 42.263116],
                      [-95.284265, 42.263233],
                  ]],
              },
          },
          "products": [
              {
                  "epa_number": "62719-442",
                  "product_name": "INTREPID 2F",
                  "rate": 16.0,
                  "rate_unit": "fl oz/acre",
              }
          ],
          "crop": ["corn"],
          "pest": ["corn borer"],
          "gpa": 10,
      },
  )

  result = response.json()
  ```
</CodeGroup>

## Step 3: Handle the Response

The response tells you whether ESA compliance is required and provides a portal URL if it is.

The first thing to check is the `esa_required` field. If **none** of the products in the tank mix have ESA obligations, the API returns early with `esa_required: false` — no field record is created, no PULA analysis is performed, and no portal URL is generated.

```json Example Response — No ESA Required theme={null}
{
  "success": true,
  "esa_required": false,
  "account_id": "acct-98765",
  "provider_id": "your_provider_id",
  "products": [
    {
      "epa_number": "62719-442",
      "product_name": "INTREPID 2F",
      "product_status": "Active",
      "esa_required": false,
      "pulas": []
    }
  ],
  "summary": {
    "total_pulas": 0,
    "total_limitations": 0,
    "products_checked": 1,
    "products_with_limitations": 0
  }
}
```

When `esa_required` is `true`, the full PULA analysis is performed and the response includes a `field_id`, `application_event_id`, and a `mitigation_portal_url`.

```json Example Response — ESA Required theme={null}
{
  "success": true,
  "esa_required": true,
  "account_id": "acct-98765",
  "provider_id": "your_provider_id",
  "field_id": "f7a1b2c3-d4e5-6789-abcd-ef0123456789",
  "application_event_id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  "mitigations_required": true,
  "mitigation_portal_url": "https://acreblitz.com/esaportal/field?t=a2a73941e3872bdcd6aae3206060f19db3892aec67bfbef27a2d015b1bf98bc7",
  "expires_at": "2026-06-22T23:59:59Z",
  "user_email": null,
  "products": [
    {
      "epa_number": "62719-442",
      "product_name": "INTREPID 2F",
      "product_status": "Active",
      "esa_required": true,
      "pulas": [
        {
          "pula_id": 95,
          "event_name": "NMFS BiOps 2024",
          "status": "effective",
          "effective_date": "2024-04-30",
          "codes": "RPMDZ",
          "limitations": [
            {
              "limitation_id": 201,
              "code": "RPMDZ",
              "limitation": "Do not apply when soil is saturated...",
              "mitigation_options": ["epa_runoff"]
            }
          ]
        }
      ]
    }
  ],
  "summary": {
    "total_pulas": 1,
    "total_limitations": 1,
    "products_checked": 1,
    "products_with_limitations": 1
  }
}
```

## Step 4: Direct Users to the Portal

When `mitigations_required` is `true`, direct your user to the `mitigation_portal_url`. You can:

* **Embed the link** in your application UI
* **Send it via email** to the applicator or grower
* **Open it in a new tab** from your platform

The portal URL is valid for 1 year and provides a fully branded experience where your user can:

* View detailed PULA information and field maps
* Select required mitigation practices
* Review soil and weather data
* Download branded compliance reports

## Step 5: Download Reports (Optional)

After an ESA check, you can programmatically download compliance reports:

```bash Download Enlist Report theme={null}
curl -X GET "https://esa.acreblitz.com/api/v1/fields/field-south-25/reports/enlist" \
  -H "X-API-Key: your_api_key_here" \
  -o enlist-report.pdf
```

```bash Download Runoff Report theme={null}
curl -X GET "https://esa.acreblitz.com/api/v1/fields/field-south-25/reports/runoff" \
  -H "X-API-Key: your_api_key_here" \
  -o runoff-report.pdf
```

<Note>
  The `provider_field_id` in the report URL is the `provider_field_id` you submitted to `/esa-check`. If you didn't provide one, it defaults to the `application_id`.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="ESA Check Reference" icon="magnifying-glass" href="/api-reference/endpoint/esa-check">
    Full endpoint reference with all parameters and response fields
  </Card>

  <Card title="Report Endpoints" icon="file-pdf" href="/api-reference/endpoint/enlist-report">
    Programmatic report download reference
  </Card>
</CardGroup>
