Parser Processing Status

Document Processing Status Checking Guide

Overview

The status checking endpoint allows you to monitor the progress of your document processing requests and retrieve results.

Endpoint

GET /documents/status/{requestId}

Base URL: https://api.yetanotherapi.com

Authentication

x-api-key: YOUR_API_KEY

Response States

1. Processing State

{
    "requestId": "string",
    "status": "PROCESSING",
    "type": "string",        // Document type (pdf, doc, etc.)
    "createdAt": "number"    // Unix timestamp
}

2. Completed State

3. Failed State

Status Codes

  • 200: Status retrieved successfully

  • 404: Request ID not found

  • 401: Invalid API key

  • 500: Internal server error

Example Usage

cURL Example

Python Example

Polling Recommendations

  • Initial check: Wait 5 seconds after submission

  • Subsequent checks: Every 10 seconds

  • Maximum polling duration: 10 minutes

  • Implement exponential backoff for long-running processes

Error Handling

Error Code
Description

404-001

Request ID not found

404-002

Request expired (older than 7 days)

401-001

Invalid API key

500-001

Internal server error

Best Practices

  1. Implement exponential backoff in polling

  2. Handle all possible status codes

  3. Use webhook notifications for long-running processes

  4. Store request IDs for future reference

  5. Check expiration (7 days) for old requests

Last updated

Was this helpful?