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

# Revert write-off

POST https://api.joincandidhealth.com/api/write-offs/v1/{write_off_id}/revert

Reverts a write off given a `write_off_id`.

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

## 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

### Path parameters

- `write_off_id` (UUID, required)

## Response

### 200

- `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)

## Types

### 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)

### InsuranceWriteOffTarget

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

### 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

**Response**

```json
{
  "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/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert"

headers = {"Authorization": "<token>."}

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

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/write-offs/v1/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert';
const options = {method: 'POST', headers: {Authorization: '<token>.'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.joincandidhealth.com/api/write-offs/v1/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert"

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

	req.Header.Add("Authorization", "<token>.")

	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/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'

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/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert")
  .header("Authorization", "<token>.")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.joincandidhealth.com/api/write-offs/v1/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/write-offs/v1/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/write-offs/v1/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32/revert")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```