curl --request POST \
--url https://api.royalti.io/file/upload-from-drive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"driveLink": "https://drive.google.com/file/d/1234567890/view",
"category": "royalty",
"identifier": "monthly_report",
"fileMetaData": {
"originalname": "royalty.csv",
"mimetype": "text/csv"
}
}
'{
"success": true,
"message": "File uploaded from Google Drive",
"data": {
"id": "file-uuid-123",
"status": "pending",
"name": "royalty.csv"
}
}Uploads a file from Google Drive to storage for royalty processing.
curl --request POST \
--url https://api.royalti.io/file/upload-from-drive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"driveLink": "https://drive.google.com/file/d/1234567890/view",
"category": "royalty",
"identifier": "monthly_report",
"fileMetaData": {
"originalname": "royalty.csv",
"mimetype": "text/csv"
}
}
'{
"success": true,
"message": "File uploaded from Google Drive",
"data": {
"id": "file-uuid-123",
"status": "pending",
"name": "royalty.csv"
}
}const response = await fetch('https://api.royalti.io/file/upload-from-drive', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"driveLink": "sample-driveLink",
"category": "sample-category",
"identifier": "sample-identifier",
"fileMetaData": {
"originalname": "sample-originalname",
"mimetype": "sample-mimetype"
}
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"