Recipe + prompt
Retention and deletion periods
Periods sit on the record. A task is created before expiry, not after deletion.
- 01 Holdings
Record with a date
- 02 Period
Derive retention
- 03 Calendar
Set due date
- 04 Task
Create before expiry
- 05 Evidence
Keep the log
Implement as
- Starting point
- Retention and deletion periods live in rules, not in the team's daily view.
- Automated result
- A task with a source exists before expiry. No silent deletion without evidence.
- Inputs
-
- Record
- Retention rule
- Calendar
- Outputs
-
- Deletion date
- Task
- Evidence
Flow
- 01Read due dates
- 02Search records
- 03List tasks
- 04Check job status
- 05Write evidence
- Authentication
- Server-side secret key (po_sk_)
Server-side secret key po_sk_ only in the server environment. Idempotent, backoff, no endless retry.
- MCP profile
- Endpoints
-
GET /analytics/calendar-due-datesGET /documents/document-searchPOST /workflow_tasks/listGET /job/get/{job_id}
- Modules
-
- Search
- Workflow
- Permissions
- Scope only for GET /analytics/calendar-due-dates, GET /documents/document-search, POST /workflow_tasks/list, GET /job/get/{job_id}. 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. Mark partial failures.
- Security
-
- Secret only in ENV
- No silent deletion
- Gate critical actions
Prompt for Autonomous agent
Read in full first:
https://api.paperoffice.ai/latest/docs/llms-full.txt
Task:
Retention and deletion periods sit on the record. A task is created before expiry. Use documented endpoints only.
Frame:
- Base URL: https://api.paperoffice.ai/latest
- Build a server-side agent. Credentials only from the environment. Work idempotently.
Only these endpoints:
- GET /analytics/calendar-due-dates
- GET /documents/document-search
- POST /workflow_tasks/list
- GET /job/get/{job_id}
Errors: 401/403 stop and check the key. 402 show budget. 429 backoff. Retry a network error once. No invented endpoints, no real tokens. - records-retention-sample.pdf
- company: Example Ltd
Expected result
recipe=records-retention, status=ok
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