---
title: "Replace Complete"
method: POST
path: "/catalogs/replace/complete"
tags: ["Catalogs"]
---

# Replace Complete

`POST /catalogs/replace/complete`

**Beta.** Catalog replace is a Beta feature and can change. Send the `Batch-Beta: catalog-replace` header on each call.
<br/><br/>Applies the pending revision in one atomic operation. When this call is successful, the catalog serves the new revision and Batch removes the previous contents. Readers see the complete old catalog, then the complete new catalog. They never see a state between the two.
<br/><br/>Batch must index every item in the pending revision before you can apply it. If indexing is not complete, the call returns `409 CATALOG_REPLACE_NOT_READY`. Retry the call after a short delay. To follow the progress, read the `pending_replace` block of `/catalogs/view`.

## Headers

- `X-Batch-Project` string, required
- `Batch-Beta` string, required — Value of the `Batch-Beta` header. It is a comma-separated list of Beta contract flags. Thus one request can opt into more than one Beta contract at the same time (`first-flag, second-flag`). Flags are lowercase and case-sensitive, and the order does not matter. Batch rejects an unknown flag with a `400` on any endpoint. When a contract becomes generally available, Batch continues to accept its flag but the flag has no more effect. Thus you never need to remove it.

## Request body

- object
  - `replace_token` string, required — Token that `/catalogs/replace/start` returns.

## Response `200`

Empty success response

- EmptyResponse

## Other responses

- `400` — The request is malformed
- `401` — The Rest API Key is not valid for this project
- `409` — You cannot apply the pending revision.
- `429` — Too Many Requests
- `500` — Unexpected error
- `503` — Batch's services are under maintenance. Please try again later

---

[API](https://skmtc.net/batch/apis/batch-rest-api.md) · [All operations](https://skmtc.net/batch/apis/batch-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/batch/batch-rest-api/revisions/ec696334ff35/schema)
