...
Service endpoint to Post to.
https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import to import the file and https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import?analysisOnly=true to validate and return statistics of the changes the import would have made.
Change "xxx" to the prefix of the server you are targeting (e.g., "my" if target is https://my.studtrax.com).
Change "yyy" to the customer id.
Change "zzz" with the project id.
Add an authentication token to the header: Authentication
Add the file and JSON with the import options to the request body.
The context type needs to be set as “form-data” to allow both the file and JSON to be sent.
Add the file to the body as File Content.
In Postman, to add a file, in the body section, you need to hover over the field for “Key”. A pull down will become visible allowing you to select Text or File - select File.
Add the options JSON to the body. The options are the same as those on the subject data import page in the Studytrax application.
Example options JSON: {"addMedicationsToProject": false, "allowSubjectsToExist": false, "changeReason": "test reason", "includeDuplicateSubjectMedications": false, "performDetailedValidation": false, "treatBlankAsDelete": false}
In Postman, the content type needs to be "application/json".
Post the request.
The result returned will be JSON that contains any errors or warnings and the statistics for the records modified, or, if the query string “analysisOnly=true” was added to the URL, the statistics represents records that would have been modified.