For the complete documentation index, see llms.txt. This page is also available as Markdown.

Replace cancel

Use /catalogs/replace/cancel to close an open replace session without an apply. Batch discards the pending revision and all its staged items. The live catalog does not change.

Replace Cancel

post

Cancels an open replace session. Batch discards the pending revision and all of its items. The live catalog does not change. A session that is already complete or cancelled returns 409 CATALOG_REPLACE_UNKNOWN.

Authorizations
AuthorizationstringRequired

API Key Authentication

Authentication is required in order to interact with Batch's APIs.

Batch implements authentication using API Keys, that we call the "REST API Key". You can find it on your dashboard.

Please make sure that you keep this key secret. You should never use it in client apps to call APIs from there as it would easily be extractable.

How to authenticate

In order to authenticate your requests, add your REST API Key in the Authorization header and prefix it by Bearer. Example: Authorization: Bearer bcd38d9rfb38ra28.

Header parameters
X-Batch-ProjectstringRequired

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

Example: project_0664hxvwffvbpn278gxdyhsadddqgna6
Body
replace_tokenstringRequired

Token that /catalogs/replace/start returns.

Example: eqRqTF7xFznYoG0MLs1sIqM1JhmhGLTZ7I5NtM5f
Responses
200

Empty success response

application/json
object · EmptyResponseOptional
post/catalogs/replace/cancel
POST /2.13/catalogs/replace/cancel HTTP/1.1
Host: api.batch.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-Batch-Project: text
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "replace_token": "eqRqTF7xFznYoG0MLs1sIqM1JhmhGLTZ7I5NtM5f"
}
{}

Rate limiting

Request structure

Route

The Catalog API has a POST endpoint that cancels a replace session:

/catalogs/replace/cancel

Headers and authentication

See Overview → Using Project APIs.

Post data

The body of the request must contain a valid JSON payload. The payload gives the replace_token from /catalogs/replace/start.

Responses

Success

If the call is successful, you receive an HTTP 200 confirmation with an empty body. The session is closed. Batch discards the pending revision.

Failure

If the replace_token is unknown, or its session is complete or cancelled, you receive an HTTP 409 with the CATALOG_REPLACE_UNKNOWN error code.

For each other problem, you receive an error message that tells you what to do. Contact us at support@batch.com if you need more help.

If you need the limits described on this page adjusted for your use case. It can be evaluated on request for certain customer tiers. Reach out to your Customer Success Manager to learn more.

Last updated