GET /ine/{request_id}
GET parameters, stored-job states, and result expiration.
On this page
GET https://ocr.ecostudios.dev/api/v3/ine/{request_id}
GET returns the current stored state without starting, resuming, or repeating extraction. It consumes no additional reading unit.
Request
| Parameter | Location | Contract |
|---|---|---|
request_id | Path | Job identifier returned by the API. |
X-API-Key | Header | Active key for the account that owns the job. |
Accept | Header | Optional application/json. |
No request body or Idempotency-Key is required.
Node.js 22+; TypeScript with Node.js types; Python 3 with requests. cURL saves the body in INE_RESULT_PATH and headers in INE_HEADERS_PATH, and prints only the HTTP status. The functions return the HTTP response without logging extracted data.
curl --silent --show-error --max-time 90 \
--output "$INE_RESULT_PATH" \
--dump-header "$INE_HEADERS_PATH" \
--write-out '%{http_code}\n' \
"https://ocr.ecostudios.dev/api/v3/ine/$INE_REQUEST_ID" \
-H "X-API-Key: $INE_API_KEY" \
-H 'Accept: application/json'
export function retrieveResult({ apiKey, requestId }) {
return fetch(`https://ocr.ecostudios.dev/api/v3/ine/${encodeURIComponent(requestId)}`, {
method: 'GET',
headers: {
'X-API-Key': apiKey,
Accept: 'application/json',
},
signal: AbortSignal.timeout(90_000),
redirect: 'error',
});
}
const response = await retrieveResult({
apiKey: process.env.INE_API_KEY,
requestId: process.env.INE_REQUEST_ID,
});
import os
from urllib.parse import quote
import requests
def retrieve_result(api_key, request_id):
return requests.get(
f"https://ocr.ecostudios.dev/api/v3/ine/{quote(request_id, safe='')}",
headers={"X-API-Key": api_key, "Accept": "application/json"},
timeout=90,
allow_redirects=False,
)
response = retrieve_result(
os.environ["INE_API_KEY"],
os.environ["INE_REQUEST_ID"],
)
type ResultInput = { apiKey: string; requestId: string };
export function retrieveResult({ apiKey, requestId }: ResultInput): Promise<Response> {
return fetch(`https://ocr.ecostudios.dev/api/v3/ine/${encodeURIComponent(requestId)}`, {
method: 'GET',
headers: {
'X-API-Key': apiKey,
Accept: 'application/json',
},
signal: AbortSignal.timeout(90_000),
redirect: 'error',
});
}
const response = await retrieveResult({
apiKey: process.env.INE_API_KEY!,
requestId: process.env.INE_REQUEST_ID!,
});
Each example performs one request without automatic retries or redirect following. The client timeout is 90 seconds; Python requests applies it to connection and read inactivity, not a total wall-clock deadline. HTTP error responses remain available to the caller.
Processing state
202 processing includes Retry-After: 2, a relative Location, and status_url: "/api/v3/ine/{request_id}". This is a stored state report, not a durable queue acknowledgment.
A job with an unconfirmed submission can transition from 202 to 409 submission_unknown. Failed and expired jobs do not become new jobs through GET or replay. Error actions distinguish temporary retrieval failures from terminal states.
Monthly quota, concurrency, rate limits, and pilot expiry do not block existing-result retrieval. Key revocation does.
Status handling
| HTTP | State or error | Semantics |
|---|---|---|
200 | succeeded | Completed reading with data, warnings, and expires_at. |
202 | processing | Active or pending job; next retrieval interval in Retry-After. |
401 | invalid_api_key | Authentication failed. |
404 | not_found | Unknown job or job outside the authenticated account. |
409 | submission_unknown | Original submission state is unconfirmed. |
410 | result_expired | Result-access window ended. |
422 | Stored job failure | Terminal state; subsequent retrieval does not restart extraction. |
503 | Service or result unavailable | Temporary or support-dependent condition identified by error.code and error.action. |
An error's correlation request_id is not proof of a reserved job. Pre-reservation rejection can produce an identifier that returns 404 on GET.
Expiration
The access window is 23 hours from reservation. expires_at is its absolute deadline. Completion, GET, and replay do not extend this window.
Historical compatible results can have expires_at: null; the value does not imply indefinite retention. Jobs are shared across API versions, and /api/v3 projects the English representation without another extraction. Older extended results can omit data.address_parts and sources.address_parts; omitted objects represent unavailable parsed data.