Polling
This section outlines how to poll for both case file status and document status.
While Webhooks are the recommended approach for real-time updates, Polling allows your system to proactively check the status of case files by making repeated requests to the API. This method is suitable for integrations with lower volume or where a slight delay in receiving status updates is not business critical.
Polling methods
You can check the status of a single case file or a list of case files. Polling in batches is generally more efficient when handling larger volumes.
- Checking an Individual case file status To check the status of a specific case file, use a GET request with the case file ID. The key information is located in the "status" parameter of the response body.
// Check case file status on a specific case file
GET <<penneo_api_base_url>>/casefiles/<casefile id>
- Polling a List of Case Files To poll for updates on multiple case files, omit the case file ID in the request path. This endpoint supports filtering and sorting to help you manage the result set and avoid processing unnecessary data. You can see the options for filtering here.
// Check case file status on a list of case files
GET <<penneo_api_base_url>>/casefiles
Batch polling strategies
Strategy A: Get latest completed case files
This simple approach works best when you can ensure that the number of newly completed case files between your polling checks is consistently low.
Goal: Retrieve the most recently completed case files.
// need example
Strategy B: Get updates by date range This strategy provides certainty that you haven't missed any updates by defining a clear time window for updates.
Parameters: Use Unix timestamps for the date filters (completedAfter and completedBefore).
// Example Request:
//Get completed case files between two Unix timestamps
GET <<penneo_api_base_url>>/casefiles?sort=-completed&status=5&completedAfter=1490000000&completedBefore=1500000000
Best Practice: To avoid gaps and duplicates, set the completedAfter timestamp to the completion time of the newest case file already processed and stored in your local system.
Updated about 1 month ago
