Skip to main content
POST
/
file
/
confirm-detection
/
{sessionId}
Confirm File Detection
curl --request POST \
  --url https://api.royalti.io/file/confirm-detection/{sessionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "royaltySource": "merlin_snap",
  "accountingPeriod": "2024-03-01",
  "salePeriod": "2024-01-01"
}
'
{
  "success": true,
  "message": "File detection confirmed"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

detection session results and queues the file for processing. For ZIP files, provide an array of file confirmations with individual source/period assignments for each extracted file. Dual-Period Sources: Some sources (e.g., Merlin SNAP) require both a sale period and an accounting period. For these sources, provide both salePeriod (when sales occurred) and accountingPeriod (when royalties are reported).

Code Examples

const response = await fetch('https://api.royalti.io/file/confirm-detection/example-id', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "royaltySource": "sample-royaltySource",
    "accountingPeriod": "2024-01-21",
    "salePeriod": "2024-01-21",
    "schema": {},
    "parameters": {},
    "fileConfirmations": [
      {
        "fileName": "sample-fileName",
        "royaltySource": "sample-royaltySource",
        "accountingPeriod": "2024-01-21",
        "salePeriod": "2024-01-21"
      }
    ]
  })
});

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

Detection session ID from file upload

Body

application/json
royaltySource
string

Confirmed royalty source name (for single files)

accountingPeriod
string<date>

Confirmed accounting period (for single files, or both single and dual-period sources)

salePeriod
string<date>

Sale period for dual-period sources (when sales occurred)

schema
object

Confirmed schema mapping (optional)

parameters
object

Additional processing parameters

fileConfirmations
object[]

Individual file confirmations for ZIP files

Response

File detection confirmed

success
boolean
default:true
message
string