curl --request POST \
--url https://api.royalti.io/file/royalty \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'royaltySource=<string>' \
--form accountingPeriod=2023-12-25 \
--form salePeriod=2023-12-25 \
--form uploadType=royalty \
--form 'originalname=<string>' \
--form 'mimetype=<string>'{
"success": true,
"message": "File uploaded successfully",
"data": {
"id": "file-uuid-123",
"status": "pending",
"name": "export.csv"
}
}Uploads a royalty file and associated metadata for processing.
curl --request POST \
--url https://api.royalti.io/file/royalty \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'royaltySource=<string>' \
--form accountingPeriod=2023-12-25 \
--form salePeriod=2023-12-25 \
--form uploadType=royalty \
--form 'originalname=<string>' \
--form 'mimetype=<string>'{
"success": true,
"message": "File uploaded successfully",
"data": {
"id": "file-uuid-123",
"status": "pending",
"name": "export.csv"
}
}const response = await fetch('https://api.royalti.io/file/royalty', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"