Flow
- Create a company document upload URL with Create a document upload URL.
- Upload bytes directly to
upload.signedUrlwith HTTPPUT. - Create a company document with Create a company document, passing
upload.hostedUrlasfileUrl. - Register the returned
file.fileIdto the incorporation with Register an incorporation file. - Link the registered
fileIdto a participant with Link a participant document.
Endpoint map
| Step | Endpoint | API surface | Output |
|---|---|---|---|
| Create upload target | POST /partner/commenda-os/companies/{companyId}/documents/upload-url | Commenda OS Partner API | upload.signedUrl, upload.hostedUrl |
| Create company file record | POST /partner/commenda-os/companies/{companyId}/documents | Commenda OS Partner API | file.fileId |
| Register file to incorporation | POST /partner/incorporation/{incorporationId}/files | Partner Incorporation API | Registered fileId |
| Link typed participant document | POST /partner/incorporation/{incorporationId}/documents | Partner Incorporation API | document.documentId |
Important handoffs
- Use
upload.signedUrlonly for the direct S3PUT. - Use
upload.hostedUrlasfileUrlwhen creating the company document. - Do not store
upload.signedGetUrlas the document reference. It is short-lived and only useful for immediate preview/debugging. - Use
file.fileIdwhen registering and linking incorporation documents. - The current requirements DSL determines which participant roles need documents, which
documentKindvalues are valid, and which file types are accepted.