Update Batch
Updates the category or status of an existing batch.
POST Parameters
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | {key} | An API key that can access the batch resource. | |
batch_id | {integer} | The batch to update. | |
category_id | {integer} | Move the batch to this category in its batch workflow. | |
batch_status | ready, onhold, deleted, done | Set the supported batch status. |
Sample Request
POST https://api-app.xtracta.com/v1/batch/update HTTP/1.1 api_key=123&batch_id=456789&batch_status=onhold
Sample Response
<?xml version="1.0" encoding="UTF-8"?> <batch_response> <status>200</status> <message>The request has been successfully processed</message> </batch_response>
Schema Definition
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="batch_response">
<xs:complexType><xs:sequence>
<xs:element name="status" type="xs:positiveInteger"/>
<xs:element name="message" type="xs:string"/>
</xs:sequence></xs:complexType>
</xs:element>
</xs:schema>
Error responses
For JSON and XML responses generated by this endpoint, the response is wrapped in batch_response and includes the HTTP status code and a message.
| Status | Message | Description |
|---|---|---|
400 | batch_id is required / batch_id must be natural number | Supply the positive integer batch ID. |
400 | category_id must be natural number | Use a positive integer category ID. |
400 | batch_status must be one of the values of [onhold,deleted,done,ready] | Use a supported batch status. |
400 | Cannot update batch (...) as it is in processing status. | Wait for processing to finish before updating the batch. |
400 | Cannot update batch status from ... to ... | The requested status transition is not supported from the current state. |
400 | Incorrect category_id provided for batch (...) | Choose a category belonging to the batch workflow. |
500 | Internal server error occurred. Please try again later or contact support@xtracta.com | Retry and contact support with the batch ID and request timestamp if it persists. |
Authentication, permission, IP-access-control, and rate-limit failures can be returned before this endpoint processes the request. Confirm the API key and caller access first.