- request an upload URL;
- send the file to this URL;
- attach the file to a Bonx record.
1. Request an upload URL
Send the file name and MIME type togeneratePresignedUrlUpload.
Variables
uploadUrl, the URL where you must send the file. It expires after 10 minutes;fileName, the storage name created by Bonx. Keep this value for step 3.
2. Send the file
Send the file content with aPUT request to uploadUrl. Use the same
Content-Type header as in step 1.
3. Attach the file to the record
UseinsertFilesOne to create the link between the file and the record.
Variables
fileId: use thefileNamereceived in step 1;name: enter the name displayed in Bonx;size: enter the file size in bytes;recordId: enter the internal record ID;recordType: enter the technical record type.
Available record types
recordType contains the plural technical name of the entity.
Find a record ID
A document usually contains the visible record number, such asREC-0412. Use
this number to get the internal id.