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.
This page covers CNHI FieldOps, CNH Industrial’s current API platform. For the legacy CNHI (AFS Connect) integration, see CNHI (AFS Connect).
Prerequisites
- A CNH developer account registered with a company-domain email (generic email domains like Gmail and Hotmail are not supported). Register here.
- A FieldOps application registered in the CNH Developer Portal, with your
clientId,clientSecret, andsubscriptionKey. - A grower’s
refreshTokenobtained through the CNHI FieldOps OAuth 2.0 consent flow.
Setup steps
- Complete the CNHI FieldOps OAuth 2.0 flow to obtain a
refreshTokenfor the grower’s account. - POST the credentials to Leaf:
- Leaf validates the token and begins syncing. Check credential status with
GET /users/{leafUserId}/cnhi-field-ops-credentials.
Credentials schema
Create request body:| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your application’s client ID from the CNH Developer Portal |
clientSecret | string | Yes | Your application’s client secret |
subscriptionKey | string | Yes | Your FieldOps subscription key (not reusable from legacy CNHI) |
refreshToken | string | Yes | The grower’s OAuth refresh token |
clientEnvironment | string | No | STAGE or PRODUCTION. Defaults to STAGE |
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
| Action | Method | Path |
|---|---|---|
| Get credentials | GET | /users/{leafUserId}/cnhi-field-ops-credentials |
| Create credentials | POST | /users/{leafUserId}/cnhi-field-ops-credentials |
| Delete credentials | DELETE | /users/{leafUserId}/cnhi-field-ops-credentials |
| Get credential events | GET | /users/{leafUserId}/cnhi-field-ops-credentials/events |
Data sync behavior
CNHI FieldOps supports webhook-based change notifications. When new files, operations, or field changes occur in a grower’s FieldOps account, CNH pushes events to Leaf. This reduces sync latency compared to the legacy CNHI provider, which relies on periodic polling. Leaf manages webhook subscriptions automatically for each connected account. No additional configuration is needed.Troubleshooting
Use the events endpoint to inspect credential health:- Status changes to invalid: The grower may have revoked access or the refresh token expired. Have the grower re-authorize through the FieldOps OAuth flow.
- STAGE vs. PRODUCTION mismatch: Make sure
clientEnvironmentmatches the environment your CNHI FieldOps app is registered in. - Missing or invalid subscription key: FieldOps requires a new
subscriptionKeyseparate from any legacy CNHI keys. Verify you’re passing the correct key. - Account mismatch: The grower’s FieldOps account may not exist in the environment you specified. Staging and production identities are separate.
- Grower cannot authorize: The grower must have the Farm Manager title in their FieldOps account and must have logged into the FieldOps portal at least once before they can complete the OAuth consent flow.
How FieldOps data appears in Leaf’s APIs
CNHI FieldOps data flows through the same Leaf endpoints as every other provider — fields, files, and operations. Theprovider field on each object identifies the source:
- Fields from FieldOps:
"provider": "CNHIFieldOps" - Machine files from FieldOps:
"provider": "CNHIFieldOps" - Field operations from FieldOps:
"provider": "CNHIFieldOps"
"provider": "CNHI".
You can filter by provider when querying:
provider value on the returned objects.
What to do next
- Connect CNHI FieldOps Tutorial — Step-by-step walkthrough.
- Migrate from CNHI to CNHI FieldOps — For customers moving from the legacy provider.
- Provider Authentication Overview — How provider credentials work across all providers.
- API Reference: Providers — Full endpoint reference for provider credentials.

