Skip to content

ReplyCollaboration

Walter Lara edited this page May 3, 2023 · 1 revision

Reply Collaboration

Allows a collaborator to accept or reject a Collaboration invitation. This operation is only allowed when the requestor is the collaborator and the status is Waiting.

Request

URL: /v1/collaborations/{collaborationId}/reply

Method: PUT

Path Parameters:

Parameter Type Description
collaborationId string UUID of the Collaboration to reply.

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

Content-Type: application/json

Content:

Field Type Description Requirement Type
accepted boolean Indicates if the collaboration is accepted or rejected. If true, the Collaboration status is set to Accepted. Otherwise, is set to Rejected. Required

Content example:

{
    "accepted": true
}

✅ Success Response

Code: 204 NO CONTENT

Headers: None

❌ Error Responses

1. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

2. Forbidden

Code: 403 FORBIDDEN

Condition: If the requestor is not the collaborator.

Headers:

Content-Type: application/json

Content example:

{
    "code": 403,
    "description": "Forbidden",
    "cause": "operation allowed only by collaborator"
}

3. Not Found

Code: 404 NOT FOUND

Condition: If the specified Collaboration is not found.

Headers:

Content-Type: application/json

Content example:

{
    "code": 404,
    "description": "Not Found",
    "cause": "Entity CollaborationEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}

4. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If operation attempted when status is other thanWaiting .

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Operation only allowed when status = Waiting"
}

See Also

Post Collaboration (Add New Collaboration)

Patch Collaboration (Update Collaboration)

Get Collaboration

Get Collaborations

Get Collaboration Count

Delete Collaboration

Reply Collaboration

Get Collaborators

Get Collaborator Count

Clone this wiki locally