Leaf connects to Agvance using an API key combined with username/password credentials. Once connected, Leaf syncs growers, farms, and fields from the Agvance system.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
- Access to an Agvance instance with API access enabled.
- Your
apiKeyfrom Agvance. - The
username,password, anddatabaseIdfor the target Agvance database. - Optional:
clientEnvironmentif you need to override the default environment.
Setup steps
POST the credentials to Leaf:Credentials schema
Create request body:| Field | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Agvance API key |
clientEnvironment | string | No | STAGE or PRODUCTION. Defaults to STAGE if omitted. |
databaseId | string | Yes | The target Agvance database ID |
username | string | Yes | Agvance username |
password | string | Yes | Agvance password |
sessionId after successful authentication. If you omit clientEnvironment, Leaf defaults it to STAGE.
Confirm the credentials are attached
Check the stored credentials for the Leaf user:sessionId.
Endpoints
Base URL:https://api.withleaf.io/services/usermanagement/api
| Action | Method | Path |
|---|---|---|
| Get credentials | GET | /users/{leafUserId}/agvance-credentials |
| Create credentials | POST | /users/{leafUserId}/agvance-credentials |
| Delete credentials | DELETE | /users/{leafUserId}/agvance-credentials |
| Get credential events | GET | /users/{leafUserId}/agvance-credentials/events |
Troubleshooting
Use the events endpoint to inspect credential health:- Invalid credentials: If the password changes in Agvance, delete and recreate the credentials with the new password.
- Wrong database ID: Verify the
databaseIdmatches the target Agvance database. - STAGE vs. PRODUCTION mismatch: If you set
clientEnvironmentexplicitly, make sure it matches the Agvance instance you’re connecting to.
What to do next
- Growers for how Agvance grower and farm data appears in Leaf.
- Fields Overview for the synced resource hierarchy.
- Provider Credentials API Reference for the credential path matrix.

