Skip to main content
POST
Get File Upload URL
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Auto-Detection Feature:
  • Set autoDetect: true to enable automatic source and period detection
  • Provide fileSample (base64-encoded) for pre-upload analysis
  • Use autoProcessIfConfident: true to skip manual confirmation when confidence is high
  • Set forceManualConfirmation: true to always require manual review
ZIP Files with Content Analysis:
  • For ZIP files, the client can extract one CSV from the archive and send it as fileSample
  • This enables full content-based source detection (header matching, schema detection)
  • If source confidence is low, sourceCreatorEligible will be set in the response
  • Without fileSample, ZIP files fall back to filename-only detection
Request Payload:
  • fileMetaData: Required - contains uploadType, originalname, mimetype, size
  • royaltySource: Optional if autoDetect is enabled
  • accountingPeriod: Optional if autoDetect is enabled
  • salePeriod: Optional sales period
  • autoDetect: Enable automatic source/period detection (default: true)
  • fileSample: Base64-encoded file sample for analysis (for ZIPs: extracted CSV content)
  • autoProcessIfConfident: Auto-process if detection confidence is high
  • forceManualConfirmation: Force manual review regardless of confidence
  • isZip: Indicates ZIP file containing multiple files
Authorization:
  • Required role: user or higher

Code Examples

Authorizations

Authorization
string
header
required

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

Body

application/json
fileMetaData
object
required
royaltySource
string

Source of the royalty data (optional if autoDetect is true)

accountingPeriod
string<date>

The accounting period (YYYY-MM-DD) (optional if autoDetect is true)

salePeriod
string<date>

The sales period (YYYY-MM-DD)

autoDetect
boolean
default:true

Enable automatic detection of royalty source and period from file content

fileSample
string

Base64-encoded sample of file content for pre-upload analysis (optional)

autoProcessIfConfident
boolean
default:false

Automatically process file if detection confidence meets thresholds

forceManualConfirmation
boolean
default:false

Force manual confirmation even if auto-detection confidence is high

isZip
boolean
default:false

Indicates if the file is a ZIP archive containing multiple royalty files

Response

Pre-signed URL generated successfully

success
boolean
default:true
message
string
data
object