Skip to main content
POST
/
file
/
royalty
Upload Royalty File
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"
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

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);

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file
required

The royalty file to upload

royaltySource
string
required
accountingPeriod
string<date>
required
salePeriod
string<date>
required
uploadType
enum<string>
required
Available options:
royalty,
invoice,
receipt,
report
originalname
string
required
mimetype
string
required

Response

File uploaded successfully

success
boolean
default:true
message
string
data
object