Example request to upload a document to an employee
This requires a multipart form-data POST request.
One part must contain the file to upload and subsequent parts will be used to provide other data such as documentTypeId (How to get valid IDs)
For more information about using formdata, see: https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData
For more information about using multipart/form-data, see: http://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean
Below is an example multipart/form-data POST request body:
POST /Employees/12345/documents Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468
---------------------------acebdf13572468 Content-Disposition: form-data; name="fieldNameHere"; filename="test.txt" Content-Type: text/plain
Test file contents XYZ...
---------------------------acebdf13572468 Content-Disposition: form-data; name="expirationDate"
2012-12-21
---------------------------acebdf13572468 Content-Disposition: form-data; name="documentTypeId"
1
---------------------------acebdf13572468 Content-Disposition: form-data; name="version"
1
---------------------------acebdf13572468 Content-Disposition: form-data; name="description"
test
---------------------------acebdf13572468--