latestOpenAPI 3.1.02026-08-10295186.7 KB

ec696334ff35

Catalogs

Replace Items

Beta. Catalog replace is a Beta feature and can change. Send the Batch-Beta: catalog-replace header on each call. <br/><br/>Adds a batch of items to the pending revision of an open session. The items have the same structure, validation, and rate limit as /catalogs/items/edit. The items are not visible to reads of the live catalog until you complete the replace. <br/><br/>Send as many batches as necessary to load the full catalog. The pending revision starts empty, thus every item is an add. Send each item id only once per session. If you send the same id two times, the session becomes inconsistent and you cannot complete it.

post/catalogs/replace/items

Headers

X-Batch-Projectstring required

The unique project key, identifying a project on the Batch platform

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

Beta opt-in. This endpoint is in Beta. It accepts only requests that carry the catalog-replace flag. Batch rejects a request without the flag with a 400.

Request body

replace_tokenstring required

Token that /catalogs/replace/start returns.

Response

Batch added the items to the pending revision. The items are not visible to reads of the live catalog until you complete the replace. Batch returns no indexing token, and the body is an empty JSON object. <br/>To see the indexing progress, read the pending_replace block of /catalogs/view.

EmptyResponse required