1.3 KiB
1.3 KiB
Proforma archive contract
Rules
- Archive uses
archived_atand does not changestatus. - Only
draftandrejectedproformas can be archived in V1. - Only
draftandrejectedarchived proformas can be unarchived in V1. - Archived proformas remain available through
GET /proformas/:id. - Deleted proformas remain excluded from every flow.
- Numbering is never reused and
document_series.next_numberis untouched. - Archived
draftproformas can be deleted directly without unarchiving.
Endpoints
PATCH /proformas/:proforma_id/archivePATCH /proformas/:proforma_id/unarchive
Both endpoints:
- return
200with the updated proforma snapshot - return
404when the proforma does not exist, belongs to another company, or is deleted - return
409when the state is not allowed, when the proforma is already archived/non-archived, or when it is linked to an issued invoice
Listing behavior
GET /proformasexcludes archived proformas by defaultGET /proformas?archived=falselists only active proformasGET /proformas?archived=truelists only archived proformas
Notes
archivedis a visibility dimension, not a business status- V1 does not support archiving
sent,approved, orissued - V1 does not add
archived_byorarchive_reason