Skip to main content
POST
/
auth
/
importdata
import data
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/auth/importdata \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'accountingPeriod=<string>' \
  --form 'salePeriod=<string>' \
  --form 'royaltySource=<string>' \
  --form file=@example-file
{
  "message": "Platform data Uploaded Successfully and Dataset being processed"
}
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/auth/importdata', {
  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 CSV file to be uploaded

accountingPeriod
string
required

The accounting period associated with the data (YYYY-MM-DD)

salePeriod
string
required

The sale period associated with the data (YYYY-MM-DD)

royaltySource
string
required

The source of royalties for the imported data

Response

Success

message
string