Skip to main content
POST
/
file
/
upload-url
Get File Upload URL
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. Request Payload:
  • royaltySource: Specifies the source of the royalty data
  • accountingPeriod: The accounting period (YYYY-MM-DD)
  • salePeriod: The sales period (YYYY-MM-DD)
  • fileMetaData: Object containing uploadType, originalname, and mimetype

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Responses

āœ… 200 - Pre-signed URL generated successfully

āš ļø 400 - undefined

āš ļø 401 - undefined

āŒ 500 - undefined

Tags

File

Authorizations

Authorization
string
header
required

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

Body

application/json
royaltySource
string
required

Source of the royalty data

accountingPeriod
string<date>
required

The accounting period (YYYY-MM-DD)

salePeriod
string<date>
required

The sales period (YYYY-MM-DD)

fileMetaData
object
required

Response

Pre-signed URL generated successfully

success
boolean
default:true
message
string
data
object
⌘I