curl --request POST \
--url https://api.royalti.io/file/getUploadUrl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"royaltySource": "testsource",
"accountingPeriod": "2017-05-01",
"salePeriod": "2017-01-01",
"fileMetaData": {
"uploadType": "royalty",
"originalname": "export.csv",
"mimetype": "csv"
}
}
'{
"signedUrl": "https://storage.googleapis.com/royalti-uploads/royalty/file-uuid-123?signature=..."
}DEPRECATED: This endpoint is deprecated and will be removed in a future version.
curl --request POST \
--url https://api.royalti.io/file/getUploadUrl \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"royaltySource": "testsource",
"accountingPeriod": "2017-05-01",
"salePeriod": "2017-01-01",
"fileMetaData": {
"uploadType": "royalty",
"originalname": "export.csv",
"mimetype": "csv"
}
}
'{
"signedUrl": "https://storage.googleapis.com/royalti-uploads/royalty/file-uuid-123?signature=..."
}/file/upload-url instead, which provides:
const response = await fetch('https://api.royalti.io/file/getUploadUrl', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"royaltySource": "sample-royaltySource",
"accountingPeriod": "2024-01-21",
"salePeriod": "2024-01-21",
"fileMetaData": {}
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Signed upload URL generated.