---
title: "Set or remove the earliest date Median may write to QuickBooks (#5895)"
method: POST
path: "/accountant/companies/{customerId}/integrations/quickbooks/writeback-earliest-date"
tags: ["Accountants"]
---

# Set or remove the earliest date Median may write to QuickBooks (#5895)

`POST /accountant/companies/{customerId}/integrations/quickbooks/writeback-earliest-date`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/integrations/quickbooks/writeback-earliest-date`
- Auth: HTTP bearer

Separate from the posting cutoff, which keeps deciding what Median imports and posts. Median refuses every write dated before `earliestDate` (or with no readable date) when it is previewed or prepared, and checks the saved date again right before every write request to QuickBooks, resends included. If the date changed or can't be read, nothing is sent until it is checked again. An item already marked sending when the date is saved may still go out. Everything else is checked against the new date. A delete is also refused unless Median has read the exact version it would delete. An item that may already be in QuickBooks keeps its state for a person. A creation of an account has no date and is unaffected. `null` removes the limit. Needs a signed-in, assigned accountant (403 or 404 for a service principal). Every change writes an audit_logs row (entity_type company).

## Path parameters

- `customerId` string, uuid, required

## Request body

- object
  - `earliestDate` string, date, nullable, required
  - `expectedEarliestDate` string, date, nullable, required: The date being replaced
  - `reason` string, required

## Response `200`

The earliest write date as now recorded (null when there is no limit)

- object
  - `success` true, required
  - `data` object, required
    - `earliestDate` string, date, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: The company does not exist
- `409`: The date changed since it was read
- `422`: Validation error

## Changes

- **2026-12-01** `c0b9022c18ac`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/integrations/quickbooks/writeback-earliest-date/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
