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.
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.
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.
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6Token that /catalogs/replace/start returns.
eqRqTF7xFznYoG0MLs1sIqM1JhmhGLTZ7I5NtM5fEmpty success response
The request is malformed
The Rest API Key is not valid for this project
The replace session is unknown or no longer open.
Too Many Requests
Unexpected error
Batch's services are under maintenance. Please try again later
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.
Last updated

