Skip to main content

Create a batch of renders

POST 

/renders/batch

Up to 1,000 renders in one job, always asynchronous: the answer is 202 with the job, and Location names the job's absolute URL (GET /jobs/{id}). Each item is a render request as for POST /renders (its mode is ignored); the batch's template, output and canary_key fill in what an item leaves out. Every item renders in the region of the first one. Needs render:create.

Nothing is queued unless every item can be: an invalid item answers 400 invalid_request, and a refusal of one item (an unknown template, the plan, an e-invoice block, validate_data) answers with that problem, which names the item's position in index or at the start of its detail (Item 3: …). On a live key without overage, the period must hold at least one unit per item (402 quota_exceeded). Items are never answered from the dedup cache. Follow the job with GET /jobs/{id} or the webhook_url.

Request​

Responses​

Job queued.

Response Headers
    Location

    Absolute URL of the job (GET /jobs/{id}), which answers 200 with the job's state at any time.

    Retry-After

    Seconds to wait before reading the job.

    RateLimit-Limit

    Size of the workspace's request bucket: the plan's requests per second. Free test keys are also held to 30 requests a minute, and the headers then describe whichever bucket is closer to empty.

    RateLimit-Remaining

    Requests left in the bucket.

    RateLimit-Reset

    Seconds until the bucket is full again.

    X-Units-Charged

    Units this request costs; 0 for test keys, for an answer from the dedup cache, and for a render or batch that was queued, which counts its units when it finishes.

    X-Units-Remaining

    Units left in the organisation's billing period after this request (included units and prepaid packs), rounded down.