Request a case's order timeline, stored or live, and poll the job for the result.
By default this reads whatever orders CourtMesh already has stored for the case, priced at 1 credit, and the response says so with meta.liveFetch: false. Send refresh: true to actually ask the source court portal for current orders; that only costs the full 20 credits when it genuinely triggers live upstream work (meta.liveFetch: true), never for a stored read that happened to satisfy the request anyway. High Court and District Court cases can be live-fetched this way; tribunal cases cannot, and a refresh request against one falls back to the stored read with liveFetchSupported: false rather than erroring.
LIVE_FETCH_NOT_ALLOWED before any work or charge. A plain stored read (refresh omitted or false) still works on Free.LIVE_FETCH_LIMIT_REACHED and a Retry-After header; a plain stored read is unaffected.Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| case_id | string | Yes | The case identifier to fetch orders for. Note the snake_case name: this endpoint predates the camelCase convention used elsewhere. Missing it returns HTTP 400. |
| refresh | boolean | No | Default false. When true, actually asks the source court portal for current orders instead of returning what is already stored, subject to the gates below. Not available on the Free tier: TIER_LIMITS.free.liveFetchAllowed is false, so a Free key sending refresh:true is refused before any work with LIVE_FETCH_NOT_ALLOWED. Tribunal cases are never live-fetchable regardless of tier; a stored-only read is all this endpoint can do for one, reported as liveFetchSupported: false. |
curl -X POST https://research.courtmesh.ai/api/v1/prod/request-timeline \
-H "X-API-Key: cm-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"case_id": "507f1f77bcf86cd799439011"}'
# Ask for a genuine live fetch instead of the stored read (not on Free,
# not for tribunal cases, subject to its own per minute and per day caps):
curl -X POST https://research.courtmesh.ai/api/v1/prod/request-timeline \
-H "X-API-Key: cm-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"case_id": "507f1f77bcf86cd799439011", "refresh": true}'Poll the status of a timeline job. Status is one of pending, running, completed or failed. Completed jobs return the orders inline. Failed jobs carry an error string. Poll every few seconds and keep the polling inside your ten requests per minute budget, since this endpoint is priced at zero credits but still consumes a rate limit slot.
curl https://research.courtmesh.ai/api/v1/prod/get-timeline/507f1f77bcf86cd799439012 \
-H "X-API-Key: cm-YOUR_KEY_HERE"