Skip to main content
Use this endpoint to check the status of a batch PDF generation request. This is useful when:
  • You’ve sent a batch request with async: true and want to poll for progress
  • A synchronous batch request timed out (>30 seconds) and you need to check on its progress
If you want to check the status of a single PDF generation (not a batch), use the Get PDF Status endpoint instead.
GET https://api.pdfnoodle.com/v1/pdf/batch/status/:batchRequestId

Request

curl --location 'https://api.pdfnoodle.com/v1/pdf/batch/status/pdfnoodle_batch_123456789' \
--header 'Authorization: Bearer pdfnoodle_api_123456789'

Response

The endpoint responds with 200 OK and returns the current status of the batch PDF generation:
{
  "batchRequestId": "pdfnoodle_batch_123456789",
  "status": "ONGOING",
  "total": 3,
  "completed": 1,
  "merge": false,
  "results": [
    {
      "requestId": "pdfnoodle_request_abc123",
      "renderStatus": "SUCCESS",
      "signedUrl": "https://pdforge-production.s3.us-east-2.amazonaws.com/...",
      "metadata": {
        "executionTime": "1.805 seconds",
        "fileSize": "4.066 kB"
      }
    },
    {
      "requestId": "pdfnoodle_request_def456",
      "renderStatus": "ONGOING",
      "signedUrl": "",
      "metadata": {}
    },
    {
      "requestId": "pdfnoodle_request_ghi789",
      "renderStatus": "ONGOING",
      "signedUrl": "",
      "metadata": {}
    }
  ]
}

Parameters

batchRequestId
string
required
The batchRequestId returned from a batch PDF generation request

Response Fields

If any individual PDF has renderStatus of FAILED, you should contact support to figure out why the PDF generation failed.

Usage Example

Here’s a complete example of polling for batch PDF status:
async function checkBatchStatus(batchRequestId) {
  const maxAttempts = 60; // Poll for up to 5 minutes (60 * 5 seconds)
  let attempts = 0;

  while (attempts < maxAttempts) {
    const response = await fetch(
      `https://api.pdfnoodle.com/v1/pdf/batch/status/${batchRequestId}`,
      {
        method: "GET",
        headers: {
          Authorization: "Bearer pdfnoodle_api_123456789",
        },
      }
    );

    const result = await response.json();

    if (result.status === "SUCCESS" || result.status === "PARTIAL_SUCCESS") {
      return result;
    }

    if (result.status === "FAILED") {
      throw new Error("All PDFs in the batch failed to generate");
    }

    // Wait 5 seconds before checking again
    await new Promise((resolve) => setTimeout(resolve, 5000));
    attempts++;
  }

  throw new Error("Batch PDF generation timed out");
}

Checking Individual PDF Status

If you want to check on the status of a specific PDF within the batch, you can use the Get PDF Status endpoint with the individual requestId from the results array.