Nymble Commerce’s Company Docs feature gives your organization a secure document repository — files are organized in folders, stored in encrypted cloud storage, and served via signed CDN URLs that expire after 1 hour. All data is isolated to your organization; no other tenant can access your documents.
Base URL
All Company Docs endpoints are available under:
Every request must include a valid JWT in the Authorization header:
The JWT must contain an OrganizationId claim. Nymble Commerce uses this claim to enforce organization-level isolation — you only ever see your organization’s folders and documents.
Folder management
Folders let you organize documents into a hierarchy. You can nest folders to any depth by setting parentId when you create a child folder.
Create a folder
Response
Name rules: maximum 255 characters; the / and \ characters are not allowed.
Build a nested folder structure
Use the folderId returned from a parent folder creation as the parentId for child folders:
List all folders
Response
Delete a folder
Returns 204 No Content on success. You must remove all documents and subfolders from a folder before you can delete it — attempting to delete a non-empty folder returns a 400 error.
Uploading documents
Upload files using a multipart POST request. Include the file in the file field and optionally specify a target folderId.
Response
Constraints:
- Maximum file size: 50 MB
- Files are scanned before storage; uploads that fail the virus scan are rejected
- Omit
folderId (or send null) to place the file at the root level
Listing and retrieving documents
List all documents in your organization, or filter to a specific folder:
Response shape
Retrieve metadata for a single document:
Downloading documents
To stream a file’s binary content directly (for example, to trigger a browser download), use the download endpoint:
The response includes the file’s binary content with the appropriate Content-Type and a Content-Disposition: attachment; filename="..." header.
Moving documents
Move a single document to a different folder:
Set targetFolderId to null to move the document back to the root level. Returns 204 No Content on success.
Move multiple documents at once using the bulk endpoint:
CDN URL expiry and refresh
The cdnUrl on every document is a signed URL that expires after 1 hour. If you cache document metadata and display the URL later, you must refresh it first.
Response
Do not cache cdnUrl values for longer than 1 hour. Presenting an expired URL to a user results in an access-denied error from the CDN. Always call refresh-url if there is any chance the URL has aged past its expiry window.
Storage statistics
Check your organization’s storage usage at any time:
Response
Bulk operations
Use bulk endpoints to perform batch actions in a single API call, reducing round-trips and improving performance.
Bulk delete
Delete up to 100 documents at once:
Both bulk-delete and bulk-move accept a maximum of 100 document IDs per request. Split larger batches into multiple calls.