This endpoint requires authentication. Include your Bearer token in the Authorization header.
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
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/..."
  }
}Generates a pre-signed URL for uploading a file to the server.
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/..."
  }
}const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/file/upload-url', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ref": "#/components/schemas/UploadUrlRequest"
  })
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"