Author driven Request Workflow - PREreview/prereview GitHub Wiki

NOTE: you need to have an account in the partner group in order to be able to mark a request as author-driven

Currently, you add a preprint to the platform with the following type of GET (where '10.1111/2222.33' is the made-up DOI):

curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" https://prereview.org/api/v2/preprints/resolve?identifier=10.1111/2222.33

To add a request to the same preprint, you would use the following POST (where the made-up API credentials are 'TEST' and '5555-5555-5555'):

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-API-App: TEST" -H "X-API-Key: 5555-5555-5555" https://prereview.org/api/v2/preprints/doi-10.1111-2222.33/requests

If the account w/ which the API credentials are associated is in the partner group, then congratulations! We trust you that the author of the preprint is the one that is making this request for review. You can specify as such by adding the isPreprintAuthor flag to the request body:

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-API-App: TEST" -H "X-API-Key: 5555-5555-5555" -d '{ "isPreprintAuthor": "true" }' https://prereview.org/api/v2/preprints/doi-10.1111-2222.33/requests

Then when a preprint is displayed on the site, it includes an indicator that labels the preprint as author driven. When you fetch requests from the site, it includes the isPreprintAuthor flag to show which requests are author-driven. See the API docs for more information on the kind of requests you can make!