{"authentication":{"example":"Authorization: Bearer imz_xxxxx","format":"Authorization: Bearer <api_key>","header":"Authorization","required_for":["/api/v1/batch","/api/v1/status/{job_id}","/api/v1/autofill/receive","/api/v1/queue","/api/v1/jobs/{job_id}/approve","/api/v1/jobs/{job_id}/reject"],"type":"Bearer API Key"},"base_url":"https://api.immenzo.com","documentation_updated":"2026-05-12","endpoints":{"documentation":{"get_docs":{"description":"Interactive Swagger UI for the current public API spec","method":"GET","path":"/docs"},"get_docs_json":{"description":"JSON summary of the current public API contract","method":"GET","path":"/docs/json"},"get_openapi":{"description":"OpenAPI 3.0 specification for the public OCR and review contract","method":"GET","path":"/docs/openapi.json"}},"erp_handoff":{"receive_autofill":{"description":"Record reviewed or reprocessed extracted fields in IngestX by Immenzo for downstream autofill processing, connector pickup, or audit history. The referenced job_id must already be completed and approved for the calling API key. Direct ERP writeback is deployment-specific.","errors":{"403":"client_id must match the workspace bound to the calling API key (response includes workspace_id)","409":"job_id must already be completed and approved for the calling API key","422":"source must be 'validation' or 'reprocess', and fields must satisfy autofill validation"},"method":"POST","path":"/api/v1/autofill/receive","request_body":{"client_id":"string (required workspace identifier bound to the calling API key and provisioned with the integration)","document_id":"string (required)","fields":"array of {field_name, value, confidence, source_page?, source_snippet?, required?, transform?}","generated_at":"ISO-8601 datetime (optional)","job_id":"UUID string (required approved review job owned by the calling API key)","profile_id":"string (optional)","source":"string ('validation' or 'reprocess')"},"response":{"confidence_avg":"float","fields_flagged":"integer","fields_written":"integer","flagged":"array (present when any field falls below threshold)","job_id":"UUID string","review_job_id":"UUID string","status":"string ('accepted' or 'needs_review')","workspace_id":"string or null"}}},"health":[{"description":"Service health status","method":"GET","path":"/health"},{"description":"Liveness probe","method":"GET","path":"/health/live"},{"description":"Readiness probe","method":"GET","path":"/health/ready"}],"job_management":{"get_status":{"description":"Get job processing status and, when available, extracted results. The job_id path parameter must be a UUID returned by a processing endpoint.","method":"GET","path":"/api/v1/status/{job_id}","response":{"approval_status":"string (pending_review, approved, rejected; completed jobs default to pending_review)","approved_at":"ISO-8601 datetime or null","attempts":"integer (worker attempts so far, >=0)","completed_at":"ISO-8601 datetime or null","created_at":"ISO-8601 datetime","error":"string (failed jobs only)","extracted_data":"object (completed jobs only)","job_id":"UUID string","processing_time_ms":"integer or null (set on completion)","progress":"integer (0-100)","started_at":"ISO-8601 datetime or null (set when worker claims the job)","status":"string (pending, processing, completed, failed)","validator_name":"string or null"}}},"review_queue":{"approve_job":{"description":"Approve a completed job before downstream intake or export.","method":"POST","path":"/api/v1/jobs/{job_id}/approve","request_body":{"notes":"string (optional)","statement_accepted":"boolean (optional)","validator_name":"string (optional)"},"response":{"approval_status":"'approved'","approved_at":"ISO-8601 datetime","approved_by":"API key prefix","job_id":"UUID string","notes":"string or null","statement_accepted":"boolean or null","success":"boolean","validator_name":"string or null"}},"list_review_queue":{"description":"List completed jobs awaiting (or finished with) review for the calling API key. The same jobs are also visible to the API key's owning user in the IngestX by Immenzo dashboard History and Review Queue; approve/reject from either side stays in sync.","method":"GET","path":"/api/v1/queue","query_params":{"approval_status":"pending_review (default) | approved | rejected | all","limit":"integer 1..100, default 20"},"response":{"approval_status":"string","count":"integer","items":"array of {job_id, document_type, doc_type, output_format, completed_at, approval_status, validator_name, approved_at}"}},"reject_job":{"description":"Reject a completed job with an optional reason before downstream intake.","method":"POST","path":"/api/v1/jobs/{job_id}/reject","request_body":{"reason":"string (optional)","validator_name":"string (optional)"},"response":{"approval_status":"'rejected'","approved_at":"ISO-8601 datetime","approved_by":"API key prefix","job_id":"UUID string","rejection_reason":"string or null","success":"boolean","validator_name":"string or null"}}},"upload_submission":{"batch_process":{"description":"Primary asynchronous upload endpoint for one or more documents. Store each returned job_id, poll status per job, review completed output, then submit approved fields downstream. batch_id is informational only and is not a lookup handle. Every submission also creates a mirrored entry in the IngestX by Immenzo dashboard History/Review Queue for the API key's owning user \u2014 no extra call is required.","method":"POST","path":"/api/v1/batch","request_body":{"documents":"array of 1..100 document objects with image_base64 and optional doc_type/output_format metadata"},"response":{"batch_id":"string (informational only)","job_count":"integer","jobs":"array of UUID job_ids to poll individually","message":"string"}}}},"environment":"production","error_codes":{"INTERNAL_ERROR":"Unexpected server error","NOT_FOUND":"Requested job or resource was not found","PROCESSING_ERROR":"Document processing failed","RATE_LIMIT_EXCEEDED":"Too many requests for the current API key","VALIDATION_ERROR":"Request body validation failed"},"example_document_categories":["invoice","purchase_order","receipt","statement","form","record"],"http_status_codes":{"200":"Success","202":"Accepted for asynchronous processing","400":"Bad Request - Validation error","401":"Unauthorized - Missing or invalid API key","404":"Not Found","429":"Too Many Requests - Rate limited","500":"Internal Server Error"},"overview":{"notes":["IngestX by Immenzo is typically embedded as a licensed OCR layer inside an ERP, SIS, CRM, or other back-office system.","Current public processing endpoints accept JSON bodies with base64-encoded images.","Direct file upload, file listing, and template-management APIs are not part of this authenticated spec.","The public API does not expose a generic endpoint for reading ERP-native field definitions by API key; target mapping is handled by the embedded widget, connector, or customer middleware layer.","The workspace-bound client_id required by /api/v1/autofill/receive is provisioned alongside your API key or embedded integration config; it is not returned by upload responses.","Webhook delivery for managed integrations is arranged outside this public callback contract. The documented public pattern is submit, poll, review, then hand off.","Processing is asynchronous. Typical end-to-end latency for a single image is 5-15s when the OCR backend is reachable; jobs stuck pending >30s indicate an upstream processing incident.","Completed jobs default to approval_status=pending_review until they are approved or rejected through the review endpoints.","doc_type drives extraction routing. Use a known label like invoice, receipt, purchase_order, or any client-defined label such as delivery_note or service_report; unknown labels trigger dynamic schema inference from the document type plus OCR text.","output_format is recorded with the job as a response-shaping hint, while extracted_data always contains the normalized OCR payload returned by the live backend workflow.","Job status responses now include started_at, attempts, and processing_time_ms to support client-side progress UX and stale-job detection."],"summary":"Interactive reference for the current public OCR, review, and downstream handoff API.","workflow":["Authenticate with an API key using Authorization: Bearer <api_key>.","Start with POST /api/v1/batch for one or more base64-encoded document images.","Store each returned job_id (the batch_id is informational only).","Poll GET /api/v1/status/{job_id} until the job is completed or failed.","Read extracted_data from completed jobs and route them through review before downstream posting.","Use GET /api/v1/queue plus POST /api/v1/jobs/{job_id}/approve or /reject to record review state in IngestX by Immenzo.","Submit approved field payloads to POST /api/v1/autofill/receive with the approved review job_id and workspace-bound client_id, or post to your own ERP connector layer."]},"rate_limits":{"defaults_per_api_key":{"requests_per_day":10000,"requests_per_hour":1000,"requests_per_minute":60},"note":"Per-key overrides and customer-specific quotas may apply."},"request_constraints":{"accepted_output_format_metadata":{"public_api":["json","markdown","structured_profile","csv","xml","fhir","fhir_observation"]},"batch_max_documents":100,"content_type":"application/json","image_field":"image_base64","max_image_size_mb":10,"min_image_size_bytes":100,"supported_image_formats":["jpeg","png","gif","tiff"]},"review_status_values":["pending_review","approved","rejected"],"status_values":["pending","processing","completed","failed"],"supported_languages":["Bahasa Indonesia (id)","English (en)"],"title":"IngestX by Immenzo API Documentation","version":"1.0.0"}
