> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refactorbilling.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Claims

> Submit claims via JSON and automatically schedule payer calls.

## Authentication

All requests require an API key passed via the `x-api-key` header, along with a `tenant_id` query parameter.

<ParamField header="x-api-key" type="string" required>
  Your tenant API key.
</ParamField>

## Query Parameters

<ParamField query="tenant_id" type="integer" required>
  Your tenant ID.
</ParamField>

## Request Body

Submit an array of claims. Each claim contains claim-level fields and an array of charge lines. Claims are uniquely identified by the combination of `provider_npi` + `claim_submitter_identifier`.

<ParamField body="claims" type="Claim[]" required>
  Array of claims to import.

  <Expandable title="Claim">
    <ParamField body="patient_name" type="string" required>
      Patient full name.
    </ParamField>

    <ParamField body="patient_dob" type="string" required>
      Patient date of birth (YYYY-MM-DD).
    </ParamField>

    <ParamField body="patient_gender" type="string" required>
      Patient gender.
    </ParamField>

    <ParamField body="provider_name" type="string" required>
      Rendering provider name.
    </ParamField>

    <ParamField body="provider_address" type="string" required>
      Provider address.
    </ParamField>

    <ParamField body="provider_npi" type="string" required>
      Provider NPI. Used as part of the unique key for claim deduplication.
    </ParamField>

    <ParamField body="provider_tax_id" type="string">
      Provider tax ID.
    </ParamField>

    <ParamField body="patient_member_id" type="string" required>
      Patient member/subscriber ID.
    </ParamField>

    <ParamField body="payer_name" type="string">
      Payer name.
    </ParamField>

    <ParamField body="payer_identification_code" type="string">
      Payer identification code.
    </ParamField>

    <ParamField body="claim_submitter_identifier" type="string" required>
      Claim submitter identifier. Used as part of the unique key for claim deduplication.
    </ParamField>

    <ParamField body="facility_code_value" type="string" required>
      Place of service / facility code.
    </ParamField>

    <ParamField body="icd_codes" type="string[]" required>
      ICD diagnosis codes for the claim.
    </ParamField>

    <ParamField body="visit_number" type="string" required>
      Your internal visit identifier. Used to look up results from other endpoints.
    </ParamField>

    <ParamField body="payer_phone_number" type="string" required>
      Payer phone number to call (E.164 format, e.g. `+18005551234`).
    </ParamField>

    <ParamField body="charge_lines" type="ChargeLine[]" required>
      Array of charge lines for this claim.

      <Expandable title="ChargeLine">
        <ParamField body="hcpcs_code" type="string" required>
          HCPCS/CPT procedure code.
        </ParamField>

        <ParamField body="monetary_amount" type="number" required>
          Charge amount in dollars.
        </ParamField>

        <ParamField body="units" type="number">
          Number of units billed.
        </ParamField>

        <ParamField body="diagnosis_code_pointers" type="string[]">
          Pointers to the ICD codes on the claim (e.g. `["1", "2"]`).
        </ParamField>

        <ParamField body="service_date_from" type="string">
          Service start date (YYYY-MM-DD).
        </ParamField>

        <ParamField body="service_date_to" type="string">
          Service end date (YYYY-MM-DD).
        </ParamField>

        <ParamField body="modifiers" type="string[]">
          Procedure modifiers (e.g. `["25", "59"]`).
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the import completed successfully.
</ResponseField>

<ResponseField name="claim_ids" type="integer[]">
  List of created or updated claim IDs.
</ResponseField>

<ResponseField name="total_claims" type="integer">
  Number of claims processed.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.refactorbilling.com/claims-import?tenant_id=1" \
    -H "x-api-key: your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "claims": [
        {
          "patient_name": "John Doe",
          "patient_dob": "1985-04-12",
          "patient_gender": "M",
          "provider_name": "Dr. Smith",
          "provider_address": "123 Medical Dr, Suite 100, San Francisco, CA 94102",
          "provider_npi": "1234567890",
          "patient_member_id": "MEM987654",
          "payer_name": "Aetna",
          "claim_submitter_identifier": "CLM-2026-001",
          "facility_code_value": "11",
          "icd_codes": ["M54.5", "G89.29"],
          "visit_number": "V12345",
          "payer_phone_number": "+18005551234",
          "charge_lines": [
            {
              "hcpcs_code": "99213",
              "monetary_amount": 150.00,
              "units": 1,
              "diagnosis_code_pointers": ["1"],
              "service_date_from": "2026-03-01",
              "service_date_to": "2026-03-01",
              "modifiers": ["25"]
            },
            {
              "hcpcs_code": "20610",
              "monetary_amount": 250.00,
              "units": 1,
              "diagnosis_code_pointers": ["1", "2"],
              "service_date_from": "2026-03-01",
              "service_date_to": "2026-03-01"
            }
          ]
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "claim_ids": [101],
    "total_claims": 1
  }
  ```
</ResponseExample>
