A call to this route should be of content type "multipart/form-data"
, and, if using curl or a similar service, should use @ notation for the value of the "fabs" key, to indicate the local path to the file to be uploaded. Otherwise, should pass a file-like object.
This route will upload the file, then kick off the validation jobs. It will return the submission id.
Content-Type
:"multipart/form-data"
curl -i -X POST /
-H "x-session-id: abcdefg-1234567-hijklmno-89101112"
-H "Content-Type: multipart/form-data"
-F 'agency_code=2000'
-F 'test_submission=true'
-F "fabs=@/local/path/to/fabs.csv"
/v1/upload_fabs_file/
curl -i -X POST /
-H "x-session-id: abcdefg-1234567-hijklmno-89101112"
-H "Content-Type: multipart/form-data"
-F 'existing_submission_id=5'
-F "fabs=@/local/path/to/fabs.csv"
/v1/upload_fabs_file/
fabs
: (required, string) local path to file using @ notationagency_code
: (string) sub tier agency code. Required if existing_submission_id is not includedexisting_submission_id
: (integer) ID of previous submission, use only if submitting an update.test_submission
: (boolean) True when you want to create a test submission. Defaults to false (will not update existing submissions)
{
"success": true,
"submission_id": 12
}
success
: (boolean) whether the creation/update was successful or notsubmission_id
: (integer) submission ID of the created or updated submission
Possible HTTP Status Codes:
- 400:
- Missing parameter
- Submission does not exist
- 401: Login required
- 403: Permission denied, user does not have permission to view this submission