Skip to main content
POST
/
file
/
confirm-upload-completion
Confirm Upload Completion
curl --request POST \
  --url https://api.royalti.io/file/confirm-upload-completion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fileId": "file-uuid-123",
  "fileName": "spotify_royalties_2024-01.csv",
  "uploadStatus": "completed"
}
'
{
  "success": true,
  "message": "Upload confirmed and auto-processing started successfully",
  "data": {
    "fileId": "file-uuid-123",
    "status": "processing",
    "uploadedAt": "2024-01-15T10:30:00.000Z",
    "autoProcessed": true,
    "requiresConfirmation": false,
    "detectionSessionId": "session-uuid-456",
    "jobId": "job-789",
    "queueName": "royalty-excel-processing",
    "estimatedCompletionTime": "2024-01-15T10:35:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidocs.royalti.io/llms.txt

Use this file to discover all available pages before exploring further.

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

Description

This endpoint is called by the frontend after a successful direct upload to Google Cloud Storage using a signed URL. Based on auto-detection settings and confidence thresholds, the file will either be automatically processed or require manual confirmation. Auto-Processing Logic:
  • If detection session status is ‘auto_confirmed’, processing starts immediately
  • If detection session status is ‘detected’, manual confirmation is required
  • Returns processing job information if auto-processing is enabled

Code Examples

const response = await fetch('https://api.royalti.io/file/confirm-upload-completion', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "fileId": "sample-fileId",
    "fileName": "sample-fileName",
    "uploadStatus": "sample-uploadStatus"
  })
});

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
fileId
string<uuid>
required

The unique identifier of the uploaded file

fileName
string

Original name of the uploaded file (for logging)

uploadStatus
enum<string>
default:completed

Status of the upload operation

Available options:
completed,
failed

Response

Upload completion confirmed successfully

success
boolean
default:true
message
string
data
object