Leaf connects to the CLAAS partner API using OAuth 2.0. Once connected, Leaf syncs equipment outbox files (ISO 11783 / ISOXML format) and processes them through the standard operations pipeline.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.
Prerequisites
- OAuth client credentials (
clientKeyandclientSecret) for the CLAAS partner/OFT API. - A grower’s
refreshTokenobtained through the CLAAS OAuth 2.0 consent flow.
Setup steps
- Complete the CLAAS OAuth 2.0 flow to obtain a
refreshTokenfor the grower’s account. - POST the credentials to Leaf:
- Leaf validates the credentials and begins syncing. Check credential status with
GET /users/{leafUserId}/claas-credentials.
Credentials schema
Create request body:| Field | Type | Required | Description |
|---|---|---|---|
clientKey | string | Yes | Your application’s client key from CLAAS |
clientSecret | string | Yes | Your application’s client secret |
refreshToken | string | Yes | The grower’s OAuth refresh token |
clientEnvironment | string | No | STAGE or PRODUCTION. Defaults to STAGE if omitted |
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
| Action | Method | Path |
|---|---|---|
| Get credentials | GET | /users/{leafUserId}/claas-credentials |
| Create credentials | POST | /users/{leafUserId}/claas-credentials |
| Delete credentials | DELETE | /users/{leafUserId}/claas-credentials |
| Get credential events | GET | /users/{leafUserId}/claas-credentials/events |
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 CLAAS OAuth flow.
- STAGE vs. PRODUCTION mismatch: Make sure
clientEnvironmentmatches the environment your CLAAS app is registered in. If omitted, Leaf defaults toSTAGE.
What to do next
- Provider Authentication Overview — How provider credentials work across all providers.
- API Reference: Providers — Full endpoint reference for provider credentials.

