Upload endpoints
You can upload files using either:- POST
/silo/v1/entries/{entry_id}/files
System generates the UUID. - PUT
/silo/v1/entries/{entry_id}/files/{id}
You specify the UUID.
POST and let the system generate UUIDs. However, PUT is useful when you need idempotent operations (safe retries with the same UUID), when integrating with external systems that have their own identifiers, or when you need to reference the file URL before the upload completes.
Upload options
Both endpoints support two upload methods:Inline upload (base64)
Upload the file data directly in the request body as base64-encoded content. This works well for smaller files.cURL
Placeholder with streaming upload
Create a placeholder file first, then upload the actual file contents to the URL provided in the response. This is useful for larger files or when you want to separate metadata creation from file upload.1
Create the placeholder
cURL
sha256 hash and size, use your programming language’s built-in crypto and file system libraries. In Node.js, use the crypto module with createHash('sha256') and fs.statSync(). In Python, use hashlib.sha256() and os.path.getsize(). In Go, use crypto/sha256 and os.Stat(). Most languages provide similar standard library functions for these operations.2
Upload the file to the URL from the response
Success
url field from the response to upload the file contents. Note stored is false until the file is uploaded.cURL
Request parameters
The file upload endpoints accept the following parameters:Examples
Upload a PDF invoice
Upload a PDF invoice
cURL
Upload an XML file
Upload an XML file
cURL
Create a placeholder for large file upload
Create a placeholder for large file upload
cURL
url field that can be used to upload the file contents.Response
This is an example response from the file upload endpoints:Fetching files
After uploading a file, you can retrieve it using the Fetch a File endpoint:cURL
Content-Type and Content-Disposition headers set according to the file’s source.
Embed attachments in UBL and CII documents
The OASIS UBL and UN/CEFACT CII generate actions can embed supporting documents, such as delivery notes, timesheets, or purchase orders, directly inside the XML they produce. Each file is included as a base64 binary object, so the recipient gets the attachments with the invoice and doesn’t have to download them separately. To embed attachments:1
Upload the files to the silo entry
Upload each file with
"category": "attachment", using either of the upload options above. Use desc to give the file a description, which becomes the attachment description in the XML.cURL
2
Enable the option in the workflow
In the Generate UBL document or Generate CII document step, enable Embed Attachments. In the workflow JSON this is
"embed_attachments": true in the step’s config.attachment category that has finished uploading (stored is true) is embedded. Keep the following in mind:
- Linked attachments are replaced, not repeated. If the invoice’s
attachmentsalready links to the file, using the silo file ID as the attachmentcode, the link is replaced by the embedded content. The description from the invoice is kept. - Supported file types. EN 16931 (rule BR-CL-24) only accepts PDF, PNG, JPEG, CSV, XLSX and ODS attachments. Other types fail validation.
- French CTC descriptions. For the Peppol France formats, the description must be one of the codes allowed by BR-FR-17, such as
BON_COMMANDE,BON_LIVRAISONorRIB. Any other description is replaced withPJA(additional supporting document).LISIBLEis reserved for the invoice PDF. - Chorus Pro. Each attachment is ZIP-compressed and identified by its file name, as Chorus Pro requires. Files over 100 MB are rejected.
- Failed downloads stop the step. If a file cannot be downloaded, the step fails rather than sending the invoice without it.
pdf in the format category. Both options can be enabled together.
Best practices
- Use placeholders for large files — For files larger than a few megabytes, create a placeholder first and upload via the streaming URL to avoid timeouts.
-
Provide file metadata — Include
key,desc, andcategoryto make files easier to identify and organize. -
Verify uploads — Check the
storedfield in the response to confirm the file was uploaded successfully. -
Use appropriate categories — Use
formatfor alternative invoice formats (PDF, XML) andattachmentfor supporting documents. -
Set privacy flags — Use the
privateflag for sensitive files that shouldn’t be publicly accessible.