Comment on a revision

An assigned reviewer and any approver can comment on revisions and/or requests (see Comment on a revision) Updating will update the active request revision.

{info} Comments can only be send in the following states: awaiting_review and awaiting_approval


Method Uri Auth Role
POST /v1/revisions/{UUID}/comment Bearer JWT-Token attached reviewer | approver

Headers

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

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

Data constraints

{
    "body": "The title should be more descriptive.",
    "field": "title"
}

Success Responses

Condition : The current revision-request state must be awaiting_review or awaiting_approval Condition : The requesting user must be one of the corresponding request reviewers or an approver

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": "6309c712-16f0-496b-afc3-b9400bd4eed3",
    "field": "title",
    "body": "The title should be more descriptive.",
    "commenter": {
        "id": "0c877865-6c51-4d93-af30-7eb720932e14",
        "firstName": "Firstname",
        "lastName": "Lastname"
    },
    "created_at": "2021-01-13T20:15:36.000000Z",
    "updated_at": "2021-01-13T20:15:36.000000Z"
}

Error Responses

Condition : If the current request is not in the awaiting_review or awaiting_approval state Condition : If the requesting user is not the corresponding request reviewer Condition : If the requesting user is not an approver

Code : 403 Unauthorized

Content example :

{
    "message": "You're not allowed to comment on this item"
}