Skip to content

Lead Docket Integration

This integration pulls Lead Docket REST API v1 data into Resplendent Data for intake reporting and dashboards.

The integration never creates, updates, or deletes records in Lead Docket. Write APIs such as create contact, update lead, change status, add note, and create/update/delete task are not used.

You need:

  1. A Lead Docket firm hostname, such as yourfirm from https://yourfirm.leaddocket.com
  2. The firm API Key from Lead Docket: Manage → Settings → Account Settings (bottom of Account Settings)

Lead Docket issues one API key per firm. Treat it as a secret.

Resplendent Data authorizes with the OpenAPI api_key header. The API console at https://{hostname}.leaddocket.com/api/ uses the same field.

Dataset Sync behavior Notes
Leads Incremental; first batch then page history GET /api/leads/lastupdatedsince. Watermark is LastUpdateDate. Nightly resync recovers deletes
Contacts Incremental; first batch then page history GET /api/contacts/lastupdatedsince. Watermark is LastUpdatedDTM
Opportunities Incremental; first batch then page history GET /api/opportunities/lastupdatedsince. Watermark is LastUpdateDate
Users Snapshot every 1440 minutes by default GET /api/users. Full list in one job
Statuses Snapshot every 1440 minutes by default GET /api/statuses. Nested sub-statuses are stored as JSON

Leads, Contacts, and Opportunities are incremental. initial_pull writes one configured batch (batch_pull_size, default 1000), then get_old_rows continues with integer page values. Lead Docket caps itemsPerPage at 500, so a 1000-row batch spans two API pages in one job. That is the same ConnectWise / HaloPSA page-number crawl, not a third pager. last_resync_timestamp does not change fetch size.

Users and Statuses are snapshots. initial_pull returns the current list. Later scheduled ticks replace parquet. get_old_rows is unused.

History uses lastupdatedsince with date=2000-01-01T00:00:00. Lead Docket rejects earlier dates on Leads and Contacts (Invalid Date). GET /api/leads requires a status filter, so it is not used for the warehouse crawl. Incremental updates use the same lastupdatedsince endpoints with the warehouse watermark plus a two-minute overlap.

Hard deletes on incremental Datasets are recovered by nightly resync (wipe, then the first configured batch, then history recrawl). Snapshot replace already drops users or statuses that left Lead Docket.

Tasks are nested under a lead (GET /api/tasks/leads/{leadId}) and are not synced. Per-lead notes, files, and get-by-id detail endpoints are skipped so a 60-second job never N+1s.

  1. Sign in to your Lead Docket firm
  2. Open Manage → Settings
  3. Scroll to the bottom of Account Settings
  4. Copy the API Key
  1. Go to Settings → Integrations
  2. Find Lead Docket and click Connect
  3. Enter the Hostname (subdomain such as yourfirm, or yourfirm.leaddocket.com)
  4. Paste the API Key
  5. Click Save & Test
  6. After a successful test, click Sync Dataset and choose the Datasets to sync
  • Paginated endpoints accept page (1-based) and itemsPerPage from 1 to 500. This is an internal API page size, not the Dataset batch size.
  • Incremental history uses integer page numbers stored on crawler_step.
  • Auth is the api_key HTTP header from Lead Docket’s OpenAPI spec.
  • HTTP 429 responses are retried using Retry-After or X-RateLimit-Reset.
  • Nested objects (contact tags, status sub-statuses, user roles) are stored as JSON strings.
Symptom Likely cause What to try
Invalid credentials Wrong hostname or revoked API key Confirm the subdomain and paste a current Account Settings API key
Hostname is not recognized Subdomain is not a live Lead Docket firm Use the subdomain from the firm login URL ({subdomain}.leaddocket.com)
Access denied Key cannot read the requested Lead Docket resources Confirm the key still appears in Account Settings
Throttling / temporary failures Lead Docket rate limit Wait and retry; reduce concurrent API consumers
Incomplete history after save Incremental Datasets recrawl one batch per minute Wait for get_old_rows to finish, or raise the Dataset history setting
Missing deleted leads Nightly resync has not run since the delete Wait for nightly resync, or resync the Dataset