This endpoint is used to sync Employees and other data into KPA. For additional context, please refer to this help article: Sync your employee list
For a list of available templates: Dataload Templates
Content details
Files can be submitted through the url or file parameters.
Note: When using the url parameter, we recommend using a signed S3 url: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html
Parameters
Your request data may contain the following parameters. GET or POST the object (as JSON) tohttps://api.kpaflextest.com/v1/dataload.create.
| Parameter | TypeScript | Example | Required | Description |
|---|---|---|---|---|
token |
string |
"YOUR_TOKEN" |
Required | Your API Token |
pretty |
boolean |
true |
Optional | true means the response json will include white space for readability. Default is false. |
url |
string |
"{signed-s3-url-to-csv}" |
Optional | Public, https url to the dataload file. We advise using a signed s3 url when using this path. |
file |
string |
"data:text/csv;base64,U2l0ZSxSZWNvcmRUeXBlLExpc3QsVGl0bGUsQ29kZSxEZXNjcmlwdGlvbgphY21lLERhdGFMaXN0SXRlbSxCdWlsZGluZ3MsRXhhbXBsZSBCdWlsZGluZyAxLEVYREwxLEV4YW1wbGUgaXRlbSBsb2FkZWQgdmlhIEFQSQo=" |
Optional | base64 encoded csv file. It should start with "data:text/csv;base64," followed by the encoded csv. 12MB limit. Larger files should use the url parameter. Most secure option. |
adapter |
string |
"acme-hr" |
Optional | ID of the adapter to apply to this dataload. |
failureEmails |
array |
["jane@example.com"] |
Optional | Emails to be notified if the dataload does not succeed. |
successEmails |
array |
["john@example.com"] |
Optional | Emails to be notified when the dataload finishes. |
name |
string |
"simple-file-name.csv" |
Optional | Optional display name of the file. By default, base64 encoded files will format to api.TIMESTAMP.csv. |
Example Request
Example Response
{
"ok": true,
"dataload": {
"id": "5804f0f40ef50473af5870d0"
}
}
Errors
If an error occurs, the response JSON will have ok set to false:
{
"ok": false,
"error": "token_invalid",
"description": "The token `YOUR_TOKEN` was not found."
}
The error field will contain one of the following error identifiers and there
may also be a description field with a more detailed explanation:
| Identifier | Description |
|---|---|
api_method_not_found |
The requested url did not match any KPA Flex API method. |
request_method_invalid |
The requested method was not GET or POST. |
request_data_invalid |
The request did not include a valid JSON request object. |
rate_limit_exceeded |
This token is exceeding its request limit. |
token_missing |
The request did not include a token. |
token_invalid |
The request token was invalid. |
token_inactive |
The request token was has been deactivated. |
token_permission |
The request token does not have write permission. |
account_inactive |
The request token was for an account that is not active. |
parameter_unexpected |
The request data included a parameter that is not supported. |
parameter_missing |
The request data failed to include a parameter which was required. |
parameter_invalid |
The request data included a parameter which had a value that is not allowed. |
server_error |
The server encountered an internal error. |
content_not_found |
The requested content was not found. |