# Lead retrieval

Use this pattern to retrieve changed Lead records. Leads are retrieve-only in the documented APIs.

## Prerequisites

- Lead access is approved for the dealership credential.
- The integration is authorized for Customer identity, contact, address, unit, trade, status, and note data.
- A checkpoint and `LeadId` deduplication store are available.


## Retrieve summaries

Send `POST /v1/Lead/Summary` with an `ApiSearchCriteria` body. Available criteria include:

- `Take`, `Skip`, and `OrderBy`;
- `FromCreateDate` and `ToCreateDate`;
- `FromUpdatedDate` and `ToUpdatedDate`;
- `LeadType` and `UserCreated`.


The creation fields intentionally use `Create`, not `Created`. Preserve unrecognized `LeadType` values so the integration remains compatible with values added later.

For each page, deduplicate `Items[].LeadId`, advance `Skip` by the actual number of items, and retain the date range until the page sequence finishes.

## Retrieve selected detail

Use `LeadId` as `{id}` in `GET /v1/Lead/GetLead/{id}`. The detail operation uses GET.

Detail can include `CustomerId`, lead source and status fields, contact/address fields, `State`, `StateCode`, units, trades, and notes. Display and preserve state names exactly as the API presents them, and keep `StateCode` as a separate returned field.

Lead data is personal production data. Commit checkpoints only after durable processing and exclude payloads from public examples, logs, screenshots, and portal feedback.