careCycle
Sync

Sync Medicare customers and policies

Syncs Medicare customers and policies.

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.

Medicare plan codes: For MA and MAPD, planCode must be a complete CMS contract-style code starting with H or R. For PDP, it must start with S, H, R, E, or X. 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

Authorization

x-api-key
x-api-key<token>

API key required for authentication.

Keys begin with 'cc_' prefix. Get your API key from the Developer Dashboard.

In: header

Request Body

application/json

POST /v2/sync/medicare Request body

TypeScript Definitions

Use the request body type in TypeScript.

array<object>

Array of Medicare customer/policy records to sync (1-100)

Items1 <= items <= 100
string
Length1 <= length <= 255
string
Length1 <= length <= 255
string

Medicare Beneficiary Identifier

Length1 <= length <= 255
string

Customer phone number (required). Accepts: +1XXXXXXXXXX, XXXXXXXXXX, (XXX) XXX-XXXX

string | null
Lengthlength <= 255
string | null

Customer postal code. Required if timezone is not provided (for TCPA compliance).

string | null

Customer timezone. Required if postalCode is not provided (for TCPA compliance). Accepts IANA format (America/New_York) or abbreviations (EST, CST, MST, PST).

string | null
Lengthlength <= 50
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null

Customer date of birth. Format: MM-DD-YYYY or MM/DD/YYYY

Match^(0[1-9]|1[0-2])[-/](0[1-9]|[12]\d|3[01])[-/]\d{4}$
string | null
Lengthlength <= 50
string | null
Value in"Male" | "Female" | "Non-Binary" | "Other" | "Prefer Not to Say"
string | null
Value in"Single" | "Married" | "Divorced" | "Widowed" | "Separated" | "Domestic Partnership"
string | null
Lengthlength <= 50
integer | null
Range-2147483648 <= value <= 2147483647
integer | null
Range-2147483648 <= value <= 2147483647
boolean | null
boolean | null
string | null
Lengthlength <= 255
boolean | null
string | null
Lengthlength <= 255
boolean | null
string | null
Lengthlength <= 255
boolean | null
boolean | null
boolean | null
boolean | null
string | null
Lengthlength <= 255
string | null

Your external system identifier for this customer

Lengthlength <= 255
array<object>

Custom field values (max 50) Your Custom Field keys can be found here in your settings

Itemsitems <= 50
string

Custom field key (e.g., 'lead_source', 'utm_campaign')

Length1 <= length <= 100
string | number | boolean | array<string> | null

Value for the custom field

array<object>

Medicare policies to sync (max 10). policyType must be MA, MAPD, MS, or PDP.

Itemsitems <= 10
string | null

Insurance carrier name. Resolved against the canonical carrier list at https://api.carecycle.ai/v2/carriers — accepts any carrier displayName or registered alias (e.g. 'UHC', 'BCBSIL', 'Cigna Health and Life Insurance Company'). Generic 'BCBS' / 'Blue Cross Blue Shield' inputs are disambiguated to the correct state plan using the customer's state.

Lengthlength <= 255
string | null

Name of the policy

Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
string | null
string | null

Agent Of Record NPN

Lengthlength <= 50
string | null
Lengthlength <= 50
string

Policy type (required). Must be one of: MA, MAPD, MS, PDP

Value in"MA" | "MAPD" | "MS" | "PDP"
string | null
Lengthlength <= 100
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null

The current status of the policy

Default"Active"Value in"Active" | "Pending" | "Pending Effectuation" | "Pending Followup" | "Suspended" | "Cancelled" | "Terminated" | "Future Cancel" | "Deceased" | "Not Approved"
string | null
string | null
string | null
string | null
string | null
Value in"IEP" | "AEP" | "OEP" | "SEP" | "ICEP" | "MA-OEP"
string | null
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Formatuuid
string | null

Agent Of Record First Name

Lengthlength <= 255
string | null

Agent Of Record Last Name

Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 100
string | null
string | null
boolean | null
string | null
string | null
string | null
string | null
string | null
string | null
string | null
string | null
integer | null

Number of lives covered by the policy

Range-2147483648 <= value <= 2147483647
boolean | null
string | null
Value in"New Business" | "Like Plan Change" | "Unlike Plan Change" | "Reinstatement" | "Rewrite"
string | null
Lengthlength <= 255
boolean | null
string | null
string | null
string | null

SunFire enrollment code (primary identifier for matching)

Lengthlength <= 255
string | null
Lengthlength <= 255
string | null
Lengthlength <= 255

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.carecycle.ai/v2/sync/medicare" \  -H "Content-Type: application/json" \  -d '{    "records": [      {        "firstName": "string",        "lastName": "string",        "mbiNumber": "string",        "phoneNumber": "string"      }    ]  }'
{
  "succeeded": 0,
  "failed": 0,
  "results": [
    {
      "id": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "externalId": "string",
      "status": "string",
      "firstName": "string",
      "middleName": "string",
      "lastName": "string",
      "salutation": "string",
      "suffix": "string",
      "preferredName": "string",
      "phoneNumber": "string",
      "lineType": "string",
      "email": "string",
      "dateOfBirth": "string",
      "language": "string",
      "ethnicity": "string",
      "gender": "string",
      "maritalStatus": "string",
      "address": "string",
      "address2": "string",
      "city": "string",
      "county": "string",
      "state": "string",
      "postalCode": "string",
      "timezone": "string",
      "mbiNumber": "string",
      "medicareCard": true,
      "medicarePartADate": "string",
      "medicarePartBDate": "string",
      "hasMedicaid": true,
      "medicaidNumber": "string",
      "socialSecurityDisability": true,
      "veteran": true,
      "vaNumber": "string",
      "householdIncome": 0,
      "annualIncome": 0,
      "filingStatus": "string",
      "dependentCount": 0,
      "subsidyEligible": true,
      "subsidyAmount": 0,
      "carrierAssignedCustomerId": "string",
      "agentName": "string",
      "agentNpn": 0,
      "assignedUser": {
        "id": "string",
        "name": "string",
        "email": "string",
        "npn": "string",
        "role": "string",
        "licensedStates": [
          "string"
        ]
      },
      "doNotCall": true,
      "doNotSMS": true,
      "doNotEmail": true,
      "doNotMail": true,
      "testCustomer": true,
      "policies": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "createdAt": "string",
          "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
          "updatedAt": "string",
          "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e",
          "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
          "policyType": "MA",
          "policySubType": "string",
          "policyNumber": "string",
          "applicationId": "string",
          "carrierId": "81a9910c-2657-4f54-9feb-7f6d85d613bc",
          "carrierName": "string",
          "planName": "string",
          "planCode": "string",
          "carrierAssignedPolicyId": "string",
          "healthSherpaPolicyId": "string",
          "sunFireEnrollmentCode": "string",
          "hiosId": "string",
          "metalLevel": "Catastrophic",
          "status": "Active",
          "applicationApprovalDate": "string",
          "effectiveDate": "string",
          "terminationDate": "string",
          "renewalDate": "string",
          "enrollmentDate": "string",
          "cancelledDate": "string",
          "declineReason": "string",
          "declineReasonDescription": "string",
          "cancellationReason": "string",
          "cancellationReasonDescription": "string",
          "electionPeriod": "IEP",
          "gracePeriodStartDate": "string",
          "paidThroughDate": "string",
          "ffmApplicationId": "string",
          "ffmSubscriberId": "string",
          "aorAgentId": "b69824d9-b3c3-46ff-b624-5d3573bdf8fa",
          "aorFirstName": "string",
          "aorLastName": "string",
          "aorNpn": "string",
          "writingAgentNpn": "string",
          "writingAgentName": "string",
          "sepType": "string",
          "sepCode": "string",
          "sepStartDate": "string",
          "sepEndDate": "string",
          "sepDocumentationReceived": true,
          "sepDocumentationDate": "string",
          "sepNotes": "string",
          "monthlyPremium": "string",
          "deductible": "string",
          "outOfPocketMax": "string",
          "subsidyAmount": "string",
          "usingSubsidy": true,
          "premiumMode": "Monthly",
          "grossPremium": "string",
          "netPremium": "string",
          "initialCommission": "string",
          "renewalCommission": "string",
          "spifAmount": "string",
          "policyLives": -2147483648,
          "wasAgent": true,
          "writtenAs": "New Business",
          "isReplacing": "string",
          "isRewrite": true,
          "hospitalNetwork": "string",
          "pcpNetwork": "string",
          "dailyBenefit": "string",
          "eliminationPeriod": -2147483648,
          "benefitPeriod": -2147483648,
          "hasCola": true,
          "deathBenefit": "string",
          "term": -2147483648,
          "maturityDate": "string",
          "riders": "string",
          "exchangeStatus": "FFM",
          "billingMethod": "string",
          "benefitReminder": "string",
          "surveyCompleted": true,
          "reasonForPurchase": "string",
          "policyNotes": "string",
          "previousStatus": "string"
        }
      ]
    }
  ],
  "errors": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "externalId": "string",
      "error": "string"
    }
  ]
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "VALIDATION_ERROR",
  "errors": [
    {
      "path": [
        "string"
      ],
      "message": "string",
      "expected": "string",
      "received": "string",
      "code": "string"
    }
  ],
  "failedRecords": [
    {
      "index": 0,
      "phoneNumber": "string",
      "firstName": "string",
      "lastName": "string",
      "externalId": "string"
    }
  ]
}
{
  "message": "string",
  "code": "string",
  "retryAfter": 0
}
{
  "message": "string",
  "code": "string"
}