Generates a pre-signed URL for uploading a file to the server.
Request Payload:
royaltySource
: Specifies the source of the royalty dataaccountingPeriod
: The accounting period (YYYY-MM-DD)salePeriod
: The sales period (YYYY-MM-DD)fileMetaData
: Object containing uploadType, originalname, and mimetypecurl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/file/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"royaltySource": "<string>",
"accountingPeriod": "2023-12-25",
"salePeriod": "2023-12-25",
"fileMetaData": {
"uploadType": "royalty",
"originalname": "<string>",
"mimetype": "<string>"
}
}'
{
"success": true,
"message": "File upload record created, please utilise the signedUrl to upload the file",
"data": {
"signedUrl": "https://storage.googleapis.com/royalti-uploads/..."
}
}
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Pre-signed URL generated successfully
The response is of type object
.
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/file/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"royaltySource": "<string>",
"accountingPeriod": "2023-12-25",
"salePeriod": "2023-12-25",
"fileMetaData": {
"uploadType": "royalty",
"originalname": "<string>",
"mimetype": "<string>"
}
}'
{
"success": true,
"message": "File upload record created, please utilise the signedUrl to upload the file",
"data": {
"signedUrl": "https://storage.googleapis.com/royalti-uploads/..."
}
}