Skip to main content
POST
/
file
/
detection
/
{sessionId}
curl --request POST \
  --url https://api.royalti.io/file/detection/{sessionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "royaltySourceId": "456e7890-e89b-12d3-a456-426614174001",
  "accountingPeriod": "2024-01",
  "salePeriod": "2024-01",
  "confirm": true
}
'
{
"status": "success",
"message": "Detection confirmed and file queued for processing",
"data": {
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"fileId": "789e0123-e89b-12d3-a456-426614174002",
"jobId": "job_abc123xyz",
"status": "confirmed",
"markedForReview": false
}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Confirm or reject detected royalty source After file upload and automatic detection, use this endpoint to confirm the detected royalty source and trigger processing, or reject it for manual review. Confirming starts the processing workflow, while rejecting marks the file for manual review.

Code Examples

const response = await fetch('https://api.royalti.io/file/detection/example-id', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "royaltySourceId": "sample-royaltySourceId",
    "accountingPeriod": "sample-accountingPeriod",
    "salePeriod": "sample-salePeriod",
    "confirm": true
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

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

Path Parameters

sessionId
string<uuid>
required

The detection session ID

Body

application/json
royaltySourceId
string
required

ID of the royalty source

accountingPeriod
string
required

Accounting period (YYYY-MM format)

salePeriod
string
required

Sale period (YYYY-MM format)

confirm
boolean
required

true to confirm and process, false to reject

Response

Success - Returns jobId if confirmed, or marks for manual review if rejected

status
enum<string>
Available options:
success
message
string
data
object