Self-serve contractor payments
Self Serve Get Invoice Attachment Upload Url
Mints an attachment id and fileKey and returns a signed S3 upload URL for an invoice attachment.
POSThttps://api.toku.com/hris/self-serve-get-invoice-attachment-upload-url
Not available to API keys.
curl --request POST \
--url 'https://api.toku.com/hris/self-serve-get-invoice-attachment-upload-url' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fileName": "string",
"mimeType": "application/pdf",
"fileSize": 0
}'200 response
{
"uploadUrl": "string",
"fileKey": "string",
"attachmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.
Body
application/json
fileNamestringrequiredAllowed: 1 to 255 characters
mimeTypestringrequiredAvailable options: application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/csv, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/msword, image/png, image/jpeg, image/webp
fileSizeintegerrequiredAllowed: at least 1
Response
200Successful response
uploadUrlstringfileKeystringattachmentIdstring<uuid>400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits