-
Notifications
You must be signed in to change notification settings - Fork 5
GetCollaboration
Allows to retrive a Collaboration. This operation is only allowed when the requestor is the Collaboration owner or the collaborator.
URL: /v1/collaborations/{collaborationId}
Method: GET
Path Parameters:
Parameter | Type | Description |
---|---|---|
collaborationId | string | UUID of the Collaboration to retrieve. |
Query Parameters: None
Headers:
Authorization: Bearer {accessToken}
Accept: application/json
Code: 200 OK
Headers:
Content-Type: application/json
Content:
Field | Type | Description | Condition |
---|---|---|---|
id | string | UUID of the Collaboration. | Always |
createdAt | string | Date and time when the Collaboration was created (ISO-8601 format). | Always |
songId | string | UUID of the underying Song. | Always |
string | Email of the Collaborator. | Always | |
role | string | Collaborator role. | Only if available |
royaltyRate | decimal | Percentage of total royalties owned to the Collaborator. | Only if available |
credited | boolean | Indicates whether or not the Collaboration has been credited to the Collaborator. | Always |
featured | boolean | Indicates whether or this Collaboration is for a featured Collaborator. | Always |
status | string | Collaboation status. Valid values are: Editing, Waiting, Accepted & Rejected | Always |
Content example:
{
"id": "7bd2862f-8deb-4814-8943-156d9dab80dd",
"createdAt": "2022-04-22T20:47:55.738918",
"songId": "842f5460-76f8-41d8-add9-d043a7a381de",
"email": "[email protected]",
"role": "Composer",
"royaltyRate": 10.5,
"credited": true,
"featured": true,
"status": "Accepted"
}
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.
Code: 403 FORBIDDEN
Condition: If the requestor is not the Song owner or collaborator.
Headers:
Content-Type: application/json
Content example:
{
"code": 403,
"description": "Forbidden",
"cause": "Operation allowed only by owner or collaborator"
}
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 CollaborationyEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}
Code: 422 UNPROCESSABLE ENTITY
Condition: If {collaborationId}
is malformed.
Headers:
Content-Type: application/json
Content example:
{
"code": 422,
"description": "Unprocessable Entity",
"cause": "Invalid UUID string: 123456789"
}
Post Collaboration (Add New Collaboration)