Recipe + prompt
Supplier compliance portal
Suppliers upload evidence. Document type, validity, and missing files are detected and shown in the portal.
- 01 Intake
PDF evidence in the portal
- 02 Detection
OCR and layout
- 03 Classification
Type and validity
- 04 Review
Missing evidence
- 05 Status
Portal shows the result
Implement as
- Starting point
- Procurement and quality need a per-supplier status instead of evidence sitting in inboxes.
- Automated result
- Each upload yields document type, validity date, and a clear portal status.
- Inputs
-
- Certificate PDF
- Delivery note
- ISO evidence
- Outputs
-
- Document type
- Validity
- Missing evidence
- Portal status
Flow
- 01Send the upload from the browser to PaperOffice
- 02Start OCR with processing_lane=instant
- 03Finish via GET /job/get/{job_id}
- 04Run the IDP agent on the same evidence
- 05Render status and missing fields in the portal
- Authentication
- Publishable Key (po_pk_)
Publishable key po_pk_ in the browser only. Limit scope to OCR and IDP jobs. Set origin allowlist, budget, and rate limit. Plan expiry and rotation. Never put po_sk_ in the frontend.
- MCP profile
- Endpoints
-
POST /job/add/paperoffice_aiocr___generatePOST /documents/idp-agent-runGET /job/get/{job_id}
- Modules
-
- Capture
- OCR
- Classify
- Export
- Permissions
- Scope for POST /job/add/paperoffice_aiocr___generate and POST /documents/idp-agent-run. No DELETE, admin, billing, or webhook rights on po_pk_.
- Errors and approval
- 401/403: check key, scope, or origin. 402: budget. 429: wait, do not loop. 202: poll until completed. Timeout: retry once, then stop. Partial failure: mark evidence as unchecked.
- Security
-
- po_pk_ with OCR/IDP scope only
- Keep the origin allowlist tight
- Set budget and rate limit
- Rotate the key, never ship po_sk_
Prompt for Custom app
Read this first, in full:
https://api.paperoffice.ai/latest/docs/llms-full.txt
Task:
Build a browser app “Supplier compliance portal”. Suppliers upload evidence. The app detects document type and validity and shows status.
Constraints:
- Base URL: https://api.paperoffice.ai/latest
- Authorization: Bearer po_pk_PUBLISHABLE_KEY
- The browser sets Origin. The key is scope-limited, origin-allowlisted, budget (HTTP 402), rate limit (HTTP 429), TTL at most 365 days.
- No secret keys (po_sk_) in the browser. po_pk_ must not run DELETE, admin, billing, or webhook actions.
Only these endpoints:
- POST /job/add/paperoffice_aiocr___generate (multipart file, processing_lane=instant, client_wait)
- GET /job/get/{job_id} on HTTP 202 or client_wait timeout
- POST /documents/idp-agent-run (upload or pofid)
Flow:
1. Accept the file.
2. Start the OCR job.
3. On 202, poll — never endlessly.
4. Run IDP on the same document.
5. Show type, validity, and missing evidence in the UI.
Errors: 401/403 stop and check the key. 402 show budget. 429 backoff. Network: retry once. Mark partial failures. Do not invent endpoints or real tokens. - iso-9001-acme-2026.pdf
- lieferant: ACME Components GmbH
- ausgestellt: 2025-03-12, gültig bis: 2026-03-11
Expected result
typ=iso_certificate, supplier=ACME Components GmbH, valid_until=2026-03-11, missing=[], portal_status=complete
Build or sell this solution with PaperOffice?
Integrator and Reseller can be combined. The next step is the partnership — application and instant decision continue in the PaperOffice app.
Start partnership