Submit a request for review

A verified researcher is able to update his requests as long as it is in the state of concept or revision. Submitting the request for review will also check the validity of the request revision.

{info} Only a researcher can submit requests for reviews


Method Uri Auth Role
PUT /v1/requests/{UUID}/submit Bearer JWT-Token researcher

Headers

The API requires a header Accept to be submitted with the request:

{
    "Accept": "application/json",
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..." 
}

Data constraints (fillable)

{
    "title": "text",
    "coauthors": "array[text]",
    "author": "json,text",
    "has_informed_coauthors": "boolean",
    "has_agreed_terms": "boolean",
    "is_student": "boolean",
    "student_details": "text",
    "hypotheses": "text",
    "background": "text",
    "design": "text",
    "analyses": "text",
    "timeline": "text"
}

Success Responses

Condition : User must be a researcher.

Code : 200 Okay

Content example : Response will reflect back the created request. The request is the active request which is the latest created revision of the request.

{
  "id": "01e1d8ae-6826-4d63-abd8-4b965177f7c4",
  "status": "awaiting_review",
  "request": {
    "id": "50b17bb5-9270-4bfd-8f44-8206960c1bcb",
    "title": "Hello Sunshine Exposure generation",
    "author": {
      "firstName": "Jeroen",
      "lastName": "Boumans",
      ...
    },
    "coauthors": [
      "Jan Janssen"
    ],
    "has_informed_coauthors": 0,
    "has_agreed_terms": 0,
    "is_student": 0,
    "student_details": null,
    "hypotheses": null,
    "background": null,
    "design": null,
    "analyses": null,
    "timeline": null,
    ...
  },
  "revisions": [
    {
        "id": "50b17bb5-9270-4bfd-8f44-8206960c1bcb",
        "title": "Hello Sunshine Exposure",
        "author": {
        ...
    }
  ],
  "created_at": "2020-07-23T16:15:45.000000Z",
  "updated_at": "2020-07-23T16:15:45.000000Z"
}

Error Responses

Condition : If the current user does not have the role researcher attached.

Code : 403 Unauthorized

{
  "message": "User does not have the right roles."
}

Condition : If the current request is already submitted for revision.

Code : 403 Unauthorized

{
  "message": "The request cannot be submitted int the current state: awaiting_review"
}