> This page is for API Reference.

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

# Asynchronous writes

Master Data accepts work and completes it later. Treating `202` as success is
the single most common integration mistake.

## What happens when you POST

#### Schema validation, synchronous

The payload is validated against the schema immediately. A malformed body
returns `400` and nothing is queued. Retrying will not help; fix the body.

#### Acceptance: 202 with a location

A valid body returns `202 Accepted` and a reference to the created resource
in the `Location` header. This means "queued", not "applied".

#### Backend processing, asynchronous

The enterprise controller distributes the data, or the store handles it
directly, depending on the scope you wrote at.

#### Confirmation: you poll

`GET` the location to read the resource's current status.

## A polling loop

```python
import time
import requests

def wait_for_write(location, token, timeout=180):
    """Poll a Master Data location until it reports a terminal status."""
    deadline = time.monotonic() + timeout
    delay = 1.0
    while time.monotonic() < deadline:
        resp = requests.get(
            location,
            headers={"Authorization": f"Bearer {token}"},
            timeout=15,
        )
        if resp.status_code == 429:
            time.sleep(delay)
            delay = min(delay * 2, 30.0)
            continue
        resp.raise_for_status()
        status = resp.json().get("status")
        if status and status not in ("Pending", "InProgress"):
            return status
        time.sleep(delay)
        delay = min(delay * 1.6, 15.0)
    raise TimeoutError(f"{location} did not settle within {timeout}s")
```

Bound the wait. An unbounded poll turns a stuck write into a stuck worker.

## Replays are safe

POSTs are insert-or-update keyed on `object_id`, so replaying a batch after an
ambiguous failure converges rather than duplicating. This makes Master Data
considerably easier to integrate than [Register Sale](/api/register-sale/overview), where you
must track correlation IDs yourself.

> **Note**
>
> "Safe to replay" is not "free to replay". A replayed 2 MB batch still consumes
> rate-limit budget, so reconcile before resending rather than retrying on a
> timer.

## Ordering across batches

Nothing sequences your batches for you. If batch B references entities created
in batch A, wait for A to reach a terminal status before sending B. See
[load order](/docs/guides/sync-catalog#order-matters).