Upload Files for Staging Apps
This endpoint allows you to upload files to process in staging apps.
Endpoint
Post /v1/domains/{domainKey}/integration/staging/drop/{fileName}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| domainKey | string | The domain key. Value can be found from within Kahua in Domain Settings -> Authentication |
| fileName | string | The name of the file that is being uploaded |
Query Parameters
None
Request Body
Binary data of file. Required.
Response Body
There is no response body for a successful call to this endpoint. There may be a response for some failed calls to this endpoint.
Example: Successfully Uploading a File
Request
/v1/domains/MagsevenBuilders/integration/staging/drop/PO_TEST.xlsx
Response
Status Code: 204
Results in Integration App
Error Code
Status Code: 400 This error occurs when no file is included in the request body of the API call.
{
"error": "Bad request",
"message": "Request body is missing file to upload.",
}
Status Code: 500 This error occurs when the file couldn't be processed correctly.
Please note that a 200 status code may not indicate the the desired action was achieved. Make sure to always look within the response body to ensure that your desired action was achieved without errors.
Steps to Resolve Error
-
Check to make sure that the filename parameter is correct and that there aren't any special characters in it (for example, spaces, ampersands, etc.)
-
Make sure that the right file is being uploaded
-
Ensure that the integration configuration has been set up properly
-
Test using regular SFTP or uploading it in Kahua to identify if it is an issue with the file or configuration vs. an issue with the API call itself