Prerequisites
- A Plangrep account
- An API key — see Authentication to create one
- A PDF file to process
Steps
Create a project
Send a Request bodyResponse (202)Project creation is asynchronous and takes 1–2 minutes to provision. Poll
POST request to create a new project. Projects act as containers for all the jobs and documents you process together.GET /api/open/v1/projects/{projectId} every 10 seconds until project.status equals "ready". Stop polling and surface an error if the project has not reached "ready" within 5 minutes.Create a job
Once your project is Request bodyAll fields are optional. You can pass a
"ready", create a job inside it. A job represents a single processing run over one or more uploaded files.webhookUrl here to receive a callback when the job finishes instead of polling — see Step 5 for details.Response (202)Upload a file
Upload one or more files to the job using a ResponseThe response includes an
multipart/form-data request. Include a metadata part (a JSON string) that describes each file part, followed by the file parts themselves named file0, file1, and so on.uploads array with a documentId for each file received. Save these IDs if you need to reference individual documents later.Complete uploads and start processing
Signal to Plangrep that all files have been uploaded and processing should begin.Request bodyAn empty JSON body completes all server-stored files for this job.Response (202)Plangrep now validates your uploads and begins processing.
Poll for completion
Poll Job status values
Continue polling until
GET /api/open/v1/jobs/{jobId} until the job reaches a terminal status.| Status | Description |
|---|---|
provisioning | Job is being set up |
awaiting_uploads | Ready to receive file uploads |
uploading | File upload in progress |
preflighting | Validating uploads before processing |
blocked_insufficient_credits | Job is paused — top up credits to continue |
processing | Actively extracting and normalizing data |
completed | All documents processed successfully |
completed_with_errors | Processing finished with one or more document errors |
failed | Job failed and cannot be retried |
cancelled | Job was cancelled before completion |
expired | Job expired before processing completed |
job.status is one of: completed, completed_with_errors, failed, cancelled, or expired.Fetch results
Once the job status is The response is a
completed or completed_with_errors, fetch the normalized JSON output.Result object with the following top-level fields:| Field | Description |
|---|---|
job | Summary of the job and its final status |
usage | Credit usage breakdown for this job |
documents | Processed documents, each containing sheets, specifications, and docs arrays |
evidence | Citable source records — individual sheets, regions, and spec sections that back the extracted data |
warnings | Non-fatal issues encountered during processing |
errors | Errors for documents that could not be fully processed |