curl --request POST \
--url https://api.royalti.io/auth/importdata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'accountingPeriod=<string>' \
--form 'salePeriod=<string>' \
--form 'royaltySource=<string>'{
"message": "Platform data Uploaded Successfully and Dataset being processed"
}/auth/importdata
curl --request POST \
--url https://api.royalti.io/auth/importdata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'accountingPeriod=<string>' \
--form 'salePeriod=<string>' \
--form 'royaltySource=<string>'{
"message": "Platform data Uploaded Successfully and Dataset being processed"
}/auth/importdata endpoint allows users to import data by uploading a file, typically a CSV file containing relevant information. This endpoint is useful for importing data into the system for further processing or analysis.
Method:POST
Request Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
| file | file | The CSV file to be uploaded. | Yes |
| accountingPeriod | string | The accounting period associated with the data (YYYY-MM-DD) | Yes |
| salePeriod | string | The sale period associated with the data (YYYY-MM-DD) | Yes |
| royaltySource | string | The source of royalties for the imported data | Yes |
See response example below
const response = await fetch('https://api.royalti.io/auth/importdata', {
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}"
Success