Skip to main content

POST /batches

POST

Create Bulk Batch Job

https://staging-api.heypeppy.ai/v1
/batches

Submits a collection of receipt documents for parallel batch extraction. The HeyPeppy work queue distributes tasks across Cloud Tasks workers in chunks of 50, enforces tenant rate limits, and updates batch progress. Use `GET /batches/{batchId}` to poll live progress.

Headers

HTTP Headers
ParameterTypeDescription
Authorizationrequiredstring
Bearer token format: Bearer <API_KEY> (hp_test_...) or X-API-Key header.
Example: Bearer hp_test_99281a8b
X-Tenant-IDoptionalstring
B2B Tenant identifier.
Example: stepup
Content-Typerequiredstring
application/json

Request Body

application/json
FieldTypeDescription
itemsrequiredarray<BatchReceiptItem>
Array of up to 1,000 receipt items to process in parallel.
↳receiptUrloptionalstring (URI)
Public or pre-signed URL to the receipt document. (Provide receiptUrl or fileBase64).
↳fileBase64optionalstring (base64)
Base64-encoded receipt content.
↳fileNameoptionalstring
Original file name. Defaults to receipt_<index>.pdf.
↳mimeTypeoptionalstring
MIME type of document. Defaults to application/pdf.
↳metadataoptionalobject
Arbitrary item metadata.

Responses

3 status codes
202 AcceptedBulk batch accepted and individual tasks queued.
{
  "batchId": "batch_stepup_1726590000000_4a1b2c3d",
  "tenantId": "stepup",
  "status": "processing",
  "totalItems": 2,
  "pollUrl": "/v1/batches/batch_stepup_1726590000000_4a1b2c3d",
  "message": "Successfully queued 2 documents for parallel processing."
}

Interactive Test Console

https://staging-api.heypeppy.ai/v1Sandbox / Staging
Bearer