Skip to main content
Use these endpoints to list provider organizations for a Leaf user and, for John Deere, to control which organizations Leaf processes. For behavior, status meanings, and organizationDataSync, see Provider Organizations.

Base URL

https://api.withleaf.io/services/usermanagement/api

Endpoints

Provider organization list

Returns connected and not-connected organizations for a provider account when the provider supports that distinction.
ActionMethodPath
List organizations for a providerGET/users/{leafUserId}/organizations/{provider}
  • Supported {provider} values include JohnDeere and Trimble.
  • John Deere returns both connectedOrganizations and notConnectedOrganizations.
  • Trimble does not distinguish connected vs not connected in the same way.

Provider organization sync management

These paths control which organizations Leaf is allowed to process for a connected account.
Sync-management operations in this group are John Deere only. Use {provider} = JohnDeere.
ActionMethodPath
List provider organizationsGET/users/{leafUserId}/{provider}/organizations
Get one provider organizationGET/users/{leafUserId}/{provider}/organizations/{providerOrgId}
Update organization statusPATCH/users/{leafUserId}/{provider}/organizations/{providerOrgId}/{status}
Sync provider organizationsPOST/users/{leafUserId}/{provider}/organizations/sync

Example: organization list response

{
  "connectedOrganizations": [
    {
      "id": "organization_id_1",
      "name": "Organization Name 1",
      "managementUri": "https://connections.deere.com/connections/clientKey/connections-dialog?orgId=organization_id_1"
    }
  ],
  "notConnectedOrganizations": [
    {
      "id": "organization_id_2",
      "name": "Organization Name 2",
      "managementUri": "https://connections.deere.com/connections/clientKey/connections-dialog?orgId=organization_id_2"
    }
  ]
}

Example: GET organization list

curl -X GET \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/organizations/JohnDeere'

Provider organization resource

{
  "providerOrgId": "520674381",
  "providerOrgName": "Leaf Farms",
  "status": "SELECTED",
  "managementUri": "https://connections.deere.com/connections/clientKey/connections-dialog?orgId=Leaf Farms"
}
FieldDescription
providerOrgIdProvider organization ID
providerOrgNameProvider organization name
managementUriProvider URL to review or fix the app-to-organization connection
statusWhether Leaf processes data from this organization (SELECTED, PREVIEW, BLOCKED)

Organization statuses

StatusMeaning
SELECTEDLeaf processes resources from this organization.
PREVIEWVisible to Leaf but downstream resources are not processed.
BLOCKEDThe app lacks required provider-side access for this organization.
If a John Deere managementUri contains connections-dialog, the connection is established. If it contains select-organizations, setup is incomplete until you fix the provider-side connection and run a sync again.

Sync scope configuration

organizationDataSync on the Leaf user configuration controls whether Leaf syncs every available organization or only those you mark SELECTED:
  • ALL — sync every organization the account can access.
  • SELECTED_ONLY — sync only organizations you set to SELECTED via these endpoints.
See Configuration and Provider Organizations for details and billing implications.

Verify synced resources

Confirm grower, farm, and field counts after changing organization scope: GET https://api.withleaf.io/services/integrations/api/resources See Integrations.

What to do next

Last modified on March 23, 2026