# Parts sales extraction

Use this pattern to retrieve changed parts-sale invoices and pass each summary `InvoiceID` to the detail request as the Part Deal ID.

## Prerequisites

- Part Deal access is approved for the dealership credential.
- The integration is authorized for customer-linked invoice, refund, pickup, order, shipping, tax, price, and quantity data.
- A checkpoint and `InvoiceID` deduplication store are available.


## Retrieve sale summaries

Send `POST /v1/PartDeal/Summary` with an `ApiPartDealSearchCriteria` body. Available criteria include `CustomerId`, `PartBrand`, `Supplier`, created and updated ranges, `Take`, `Skip`, and `OrderBy`.

Each `ApiPartDeal` summary item includes `InvoiceID`, `InvoiceNo`, `InvoiceStatus`, dates, `CustomerId`, and a `Parts` collection. Deduplicate on `Items[].InvoiceID`; do not use the display invoice number as the durable UUID.

## Retrieve selected detail

Use `Items[].InvoiceID` as `{id}` in `GET /v1/PartDeal/GetPartDealDetail/{id}`. DX1 product review confirms that Part Deal ID and `InvoiceID` are the same identifier.

The detail schema retains `InvoiceID` and can link the transaction to a major-unit `DealId` or repair-order `ROHeaderId` in addition to its part rows.

Review [Cost and profitability data](/docs/dx1-dealership-api/guides/field-conventions#cost-and-profitability-data) before using part pricing fields.

Request filters use `FromUpdatedDate`/`ToUpdatedDate`, while summary and detail response fields use `UpdateDate`. Keep those exact API spellings in separate request and response models.

## Commit and protect the checkpoint

Commit the updated-date checkpoint after required detail is durably processed. Use overlap plus `InvoiceID` deduplication as client guidance. Apply dealership-level throttling and safe-read retry, and keep customer and transaction payloads out of public diagnostics.