Skip to main content
POST
/
file
/
getUploadUrl
Get File Upload URL (Legacy)
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=..."
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Please use /file/upload-url instead, which provides:
  • Auto-detection of royalty source and period
  • Pre-upload analysis with confidence scores
  • Support for ZIP files with multiple royalty files
  • Better error handling and validation
This legacy endpoint generates a pre-signed URL for uploading a royalty file with manual source/period specification.

Code Examples

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);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
royaltySource
string
required
accountingPeriod
string<date>
required
salePeriod
string<date>
required
fileMetaData
object
required

Response

Signed upload URL generated.

signedUrl
string<uri>