> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.joincandidhealth.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.joincandidhealth.com/_mcp/server.

# Create write-off

POST https://api.joincandidhealth.com/api/write-offs/v1
Content-Type: application/json

Creates one or many write-offs applied toward a specific service line,
claim, or billing provider.

Reference: https://docs.joincandidhealth.com/api-reference/write-offs/v-1/create

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.joincandidhealth.com` (Production, default)
- `https://api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:5050` (Local)

## Request

### Body (application/json)

This endpoint expects an object.

- `write_offs` (list of WriteOffCreate, required)

## Response

### 200

- `write_offs` (list of WriteOff, required)

## Types

### WriteOffCreate

- `type`: `patient`
  - `amount_cents` (integer, required)
  - `service_line_id` (UUID, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `CHARITY_OR_FINANCIAL_ASSISTANCE`, `PATIENT_EXPERIENCE_OR_SERVICE_RECOVERY`, `OON_COURTESY_ADJUSTMENT`, `PROMPT_PAY_DISCOUNT`, `BAD_DEBT`, `COLLECTION_AGENCY`, `OTHER`, `UNKNOWN`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `DECEASED`, `BANKRUPTCY`
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `write_off_note` (string, optional)
- `type`: `insurance`
  - `amount_cents` (integer, required)
  - `payer_identifier` (PayerIdentifier, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `OON_WRITE_OFF`, `NO_AUTHORIZATION_REFERRAL`, `TIMELY_FILING`, `STALE_DATE`, `TIMELY_FILING_LATE_ENCOUNTER`, `CREDENTIALING_OR_CONTRACTING`, `NON_COVERED_MAX_BENEFIT`, `NOT_MEDICALLY_NECESSARY`, `BUNDLED_OR_INCLUSIVE`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `EFFORTS_EXHAUSTED`, `ADMINISTRATIVE_WRITE_OFF`, `CASE_RATE_OR_CAPITATED`, `OTHER`, `UNKNOWN`, `CONTRACTUAL_ADJUSTMENT`, `PRIMARY_PAID_MAX_BENEFITS`, `INTEREST`
  - `write_off_target` (InsuranceWriteOffTarget, required)
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `write_off_note` (string, optional)
- `type`: `non_insurance_payer`
  - `amount_cents` (integer, required)
  - `non_insurance_payer_id` (UUID, required)
  - `service_line_id` (UUID, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `OON_WRITE_OFF`, `NO_AUTHORIZATION_REFERRAL`, `TIMELY_FILING`, `STALE_DATE`, `TIMELY_FILING_LATE_ENCOUNTER`, `CREDENTIALING_OR_CONTRACTING`, `NON_COVERED_MAX_BENEFIT`, `NOT_MEDICALLY_NECESSARY`, `BUNDLED_OR_INCLUSIVE`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `EFFORTS_EXHAUSTED`, `ADMINISTRATIVE_WRITE_OFF`, `CASE_RATE_OR_CAPITATED`, `OTHER`, `UNKNOWN`, `CONTRACTUAL_ADJUSTMENT`, `PRIMARY_PAID_MAX_BENEFITS`, `INTEREST`
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `write_off_note` (string, optional)

### WriteOff

- `type`: `patient`
  - `amount_cents` (integer, required)
  - `claim_id` (UUID, required)
  - `patient_external_id` (string, required)
  - `service_line_id` (UUID, required)
  - `write_off_id` (UUID, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `CHARITY_OR_FINANCIAL_ASSISTANCE`, `PATIENT_EXPERIENCE_OR_SERVICE_RECOVERY`, `OON_COURTESY_ADJUSTMENT`, `PROMPT_PAY_DISCOUNT`, `BAD_DEBT`, `COLLECTION_AGENCY`, `OTHER`, `UNKNOWN`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `DECEASED`, `BANKRUPTCY`
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `reverted_by_write_off_id` (UUID, optional)
  - `reverts_write_off_id` (UUID, optional)
  - `write_off_note` (string, optional)
- `type`: `insurance`
  - `amount_cents` (integer, required)
  - `payer` (Payer, required)
  - `write_off_id` (UUID, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `OON_WRITE_OFF`, `NO_AUTHORIZATION_REFERRAL`, `TIMELY_FILING`, `STALE_DATE`, `TIMELY_FILING_LATE_ENCOUNTER`, `CREDENTIALING_OR_CONTRACTING`, `NON_COVERED_MAX_BENEFIT`, `NOT_MEDICALLY_NECESSARY`, `BUNDLED_OR_INCLUSIVE`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `EFFORTS_EXHAUSTED`, `ADMINISTRATIVE_WRITE_OFF`, `CASE_RATE_OR_CAPITATED`, `OTHER`, `UNKNOWN`, `CONTRACTUAL_ADJUSTMENT`, `PRIMARY_PAID_MAX_BENEFITS`, `INTEREST`
  - `write_off_target` (InsuranceWriteOffTarget, required)
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `reverted_by_write_off_id` (UUID, optional)
  - `reverts_write_off_id` (UUID, optional)
  - `write_off_note` (string, optional)
- `type`: `non_insurance_payer`
  - `amount_cents` (integer, required)
  - `non_insurance_payer` (NonInsurancePayer, required)
  - `service_line_id` (UUID, required)
  - `write_off_id` (UUID, required)
  - `write_off_reason` (enum, required)
    - Allowed values: `SMALL_BALANCE`, `OON_WRITE_OFF`, `NO_AUTHORIZATION_REFERRAL`, `TIMELY_FILING`, `STALE_DATE`, `TIMELY_FILING_LATE_ENCOUNTER`, `CREDENTIALING_OR_CONTRACTING`, `NON_COVERED_MAX_BENEFIT`, `NOT_MEDICALLY_NECESSARY`, `BUNDLED_OR_INCLUSIVE`, `UNCOLLECTIBLE_OR_NON_BILLABLE`, `EFFORTS_EXHAUSTED`, `ADMINISTRATIVE_WRITE_OFF`, `CASE_RATE_OR_CAPITATED`, `OTHER`, `UNKNOWN`, `CONTRACTUAL_ADJUSTMENT`, `PRIMARY_PAID_MAX_BENEFITS`, `INTEREST`
  - `write_off_timestamp` (datetime, required)
  - `custom_write_off_reason` (string, optional) — An organization-specific sub-reason
  - `reverted_by_write_off_id` (UUID, optional)
  - `reverts_write_off_id` (UUID, optional)
  - `write_off_note` (string, optional)

### PayerIdentifier

- `type`: `payer_info`
  - `payer_id` (string, required)
  - `payer_name` (string, required)
- `type`: `payer_uuid`
  - `value` (UUID, required)

### InsuranceWriteOffTarget

- `type`: `service_line_id`
  - `value` (UUID, required)
- `type`: `claim_id`
  - `value` (UUID, required)
- `type`: `billing_provider_id`
  - `value` (UUID, required)

### Payer

- `payer_uuid` (UUID, required) — Auto-generated ID set on creation.
- `payer_id` (string, required) — The primary national payer ID of the payer.
- `payer_name` (string, required) — The primary display name of the payer.
- `availity_payer_name` (string, optional) — The name of the payer as it appears in Availity.
- `availity_claims_payer_id` (string, optional) — The ID of the payer as it appears in Availity.
- `availity_eligibility_id` (string, optional) — The eligibility ID of the payer as it appears in Availity.
- `availity_remittance_payer_id` (string, optional) — The remittance ID of the payer as it appears in Availity.
- `street_address` (StreetAddressLongZip, optional)

### NonInsurancePayer

- `non_insurance_payer_id` (UUID, required)
- `name` (string, required)
- `enabled` (boolean, required)
- `clinical_trials` (list of ClinicalTrial, required)
- `description` (string, optional)
- `category` (string, optional)
- `payer_id` (string, optional) — The identifier used to route claims to this payer. Required in order to submit an 837 to this payer. Must be between 2 and 80 characters.
- `address` (StreetAddressShortZip, optional)

### StreetAddressLongZip

- `address1` (string, required)
- `city` (string, required)
- `state` (enum, required)
  - Allowed values: `AA`, `AE`, `AP`, `AL`, `AK`, `AS`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MH`, `MI`, `MN`, `MP`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `PR`, `PW`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VI`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`, `FC`
- `zip_code` (string, required) — 5-digit zip code
- `zip_plus_four_code` (string, required) — 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4
- `address2` (string, optional)

### ClinicalTrial

- `clinical_trial_id` (UUID, required)
- `clinical_trial_number` (string, required) — Must be 8 characters long
- `is_active` (boolean, required)
- `name` (string, required)
- `non_insurance_payer_id` (UUID, required)
- `clinical_trial_phase` (enum, optional)
  - Allowed values: `Phase 1`, `Phase 2`, `Phase 3`

### StreetAddressShortZip

- `address1` (string, required)
- `city` (string, required)
- `state` (enum, required)
  - Allowed values: `AA`, `AE`, `AP`, `AL`, `AK`, `AS`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DC`, `DE`, `FL`, `FM`, `GA`, `GU`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MH`, `MI`, `MN`, `MP`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `PR`, `PW`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VI`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`, `FC`
- `zip_code` (string, required) — 5-digit zip code
- `address2` (string, optional)
- `zip_plus_four_code` (string, optional) — 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4

## Examples

**Request**

```json
{
  "write_offs": [
    {
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    },
    {
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    }
  ]
}
```

**Response**

```json
{
  "write_offs": [
    {
      "type": "patient",
      "amount_cents": 1,
      "claim_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "patient_external_id": "patient_external_id",
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z",
      "custom_write_off_reason": "custom_write_off_reason",
      "reverted_by_write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "reverts_write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_note": "write_off_note"
    },
    {
      "type": "patient",
      "amount_cents": 1,
      "claim_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "patient_external_id": "patient_external_id",
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z",
      "custom_write_off_reason": "custom_write_off_reason",
      "reverted_by_write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "reverts_write_off_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_note": "write_off_note"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.joincandidhealth.com/api/write-offs/v1"

payload = { "write_offs": [
        {
            "type": "patient",
            "amount_cents": 1,
            "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
            "write_off_reason": "SMALL_BALANCE",
            "write_off_timestamp": "2024-01-15T09:30:00Z"
        },
        {
            "type": "patient",
            "amount_cents": 1,
            "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
            "write_off_reason": "SMALL_BALANCE",
            "write_off_timestamp": "2024-01-15T09:30:00Z"
        }
    ] }
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/write-offs/v1';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"write_offs":[{"type":"patient","amount_cents":1,"service_line_id":"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32","write_off_reason":"SMALL_BALANCE","write_off_timestamp":"2024-01-15T09:30:00Z"},{"type":"patient","amount_cents":1,"service_line_id":"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32","write_off_reason":"SMALL_BALANCE","write_off_timestamp":"2024-01-15T09:30:00Z"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.joincandidhealth.com/api/write-offs/v1"

	payload := strings.NewReader("{\n  \"write_offs\": [\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    },\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.joincandidhealth.com/api/write-offs/v1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"write_offs\": [\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    },\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.joincandidhealth.com/api/write-offs/v1")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"write_offs\": [\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    },\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.joincandidhealth.com/api/write-offs/v1', [
  'body' => '{
  "write_offs": [
    {
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    },
    {
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    }
  ]
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/write-offs/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"write_offs\": [\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    },\n    {\n      \"type\": \"patient\",\n      \"amount_cents\": 1,\n      \"service_line_id\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"write_off_reason\": \"SMALL_BALANCE\",\n      \"write_off_timestamp\": \"2024-01-15T09:30:00Z\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = ["write_offs": [
    [
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    ],
    [
      "type": "patient",
      "amount_cents": 1,
      "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "write_off_reason": "SMALL_BALANCE",
      "write_off_timestamp": "2024-01-15T09:30:00Z"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/write-offs/v1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```