Sync
Medicare

Sync Medicare customers and policies

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

Customer matching: mbiNumber first, then a fallback on firstName + lastName + dateOfBirth + phoneNumber. When a customer is matched via the fallback, their mbiNumber is backfilled from the request.

Policy matching: sunFireEnrollmentCode first, then the planCode + effectiveDate composite.

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 and Policy Custom Fields. Policy values are attached to the policy created or matched by the containing policy object.

Medicare plan codes: For MA and MAPD, planCode must be a CMS contract-style code starting with H or R. For PDP, it must start with S, H, R, E, or X. The three-digit segment is optional: send contract+plan only (H3146-036) and careCycle infers the segment from CMS reference data, defaulting to -000 for non-segmented plans; a record is rejected only when the plan genuinely has multiple segments (include the segment to disambiguate). Dashes are optional in requests (H1234001000 and H1234-001-000 are accepted); careCycle stores the canonical dashed form. MS plan codes are carrier-specific and are not required to follow the CMS contract format.

When a new policy is created, the customer's existing policies of the same policyType with an effectiveDate more than one year old are terminated.

policyType must be one of MA, MAPD, MS, or PDP.

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".

post/v2/sync/medicare

Request

  • Base URL
    https://api.carecycle.ai
  • URL
    https://api.carecycle.ai/v2/sync/medicare
  • Auth
    API key in header x-api-key

Request body

Example request

{
  "records": [
    {
      "policies": [
        {
          "carrierName": "Aetna",
          "planName": "Medicare Elite",
          "aorFirstName": "John",
          "aorLastName": "Doe",
          "aorNpn": "123456789",
          "policyLives": 3
        }
      ]
    }
  ]
}

Response

POST /v2/sync/medicare Positive response

succeedednumber required

Number of successfully synced records

failednumber required

Number of failed records

Changes

No recorded changes to this operation across all 2 revisions of this API.