This endpoint requires authentication. Include your Bearer token in the Authorization header.
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
multipart/form-data
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/file/royalty \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'royaltySource=<string>' \
  --form accountingPeriod=2023-12-25 \
  --form salePeriod=2023-12-25 \
  --form uploadType=royalty \
  --form 'originalname=<string>' \
  --form 'mimetype=<string>' \
  --form file=@example-file{
  "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://server26-dot-royalti-project.uc.r.appspot.com/file/royalty \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'royaltySource=<string>' \
  --form accountingPeriod=2023-12-25 \
  --form salePeriod=2023-12-25 \
  --form uploadType=royalty \
  --form 'originalname=<string>' \
  --form 'mimetype=<string>' \
  --form file=@example-file{
  "success": true,
  "message": "File uploaded successfully",
  "data": {
    "id": "file-uuid-123",
    "status": "pending",
    "name": "export.csv"
  }
}const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/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}"