Get Batches

Returns all batches available to the API-key group, or one batch when batch_id is supplied. The response includes the batch data, related documents and pages, and the current batch status.

POST Parameters

ParameterRequiredValueDescription
api_key{key}An API key that can access the batch resource.
batch_id{integer}Return one specific batch. Omit it to return the accessible batches for the API-key group.

Sample Request

POST https://api-app.xtracta.com/v1/batch HTTP/1.1
api_key=123&batch_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<batch_response>
  <status>200</status>
  <message>The request has been successfully processed</message>
  <Batch>
    <Id>456789</Id>
    <BatchWorkflowId>123</BatchWorkflowId>
    <Documents>
      <Document>
        <Id>987654</Id>
      </Document>
    </Documents>
    <Status>
      <Status>ready</Status>
    </Status>
  </Batch>
</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:element name="Batch" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
      </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.

StatusMessageDescription
400batch_id must be natural numberUse a positive integer batch ID.
404No records foundNo accessible batch matched batch_id, or the group has no batches.
500Internal server error occurred. Please try again later or contact support@xtracta.comRetry and contact support with the batch ID and request timestamp if it persists.
Information Circle

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.