# Sync ACA customers and policies (/docs/api-reference/sync/sync-aca-customers-and-policies)



{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

Create or update ACA customers and their policies in one request.

<Callout type="info">
  **Customer matching** (first identifier present wins): `healthSherpaCustomerId` → `externalId` → `carrierAssignedCustomerId` → fallback on `firstName` + `lastName` + `dateOfBirth` + `phoneNumber`.

  **Policy matching**: `healthSherpaPolicyId`, then `carrierAssignedPolicyId`.

  **Custom fields**: Put customer values in `records[].customFields` and policy values in `records[].policies[].customFields`. Each entry uses a configured `fieldKey` and `value`. Find keys in [Customer Custom Fields](https://app.carecycle.ai/settings/crm-settings/custom-fields/customer) and [Policy Custom Fields](https://app.carecycle.ai/settings/crm-settings/custom-fields/policy). Policy values are attached to the policy created or matched by the containing policy object.

  When a new policy is created, the customer's existing ACA policies with an `effectiveDate` more than one year old are terminated. `policyType` is always set to `ACA`.

  **Response**: For each successfully synced record, `results` contains the full customer record (same shape as the `customer.created`/`customer.updated` webhook) along with the policies this request changed: those created or updated from the request, plus any older policies auto-terminated as a side effect. The customer's untouched existing policies are not returned. Each returned policy carries a `previousStatus` field (its status before this request, or `null` if newly created); compare it with the policy's `status` to detect a flip; e.g. an auto-terminated policy comes back with `previousStatus: "Active"` and `status: "Terminated"`.
</Callout>

<APIPage document="&#x22;../../apps/api/openapi/specs/openapi-public.yaml&#x22;" operations="[{&#x22;path&#x22;:&#x22;/v2/sync/aca&#x22;,&#x22;method&#x22;:&#x22;post&#x22;}]" />
