Skip to content

ProcessSongStreamTokenAgreement

Walter Lara edited this page Aug 13, 2023 · 3 revisions

Process Song Stream Token Agreement

Allows to request processing (acceptance or decline) of a Song's Stream Token Agreement.

Request

URL: /v1/songs/{songId}/agreement

Method: PUT

Path Parameters:

Parameter Type Description
songId string UUID of the associated Song

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

Content-Type: application/json

Content:

Field Type Description Requirement Type
accepted boolean Indicates if the agreement is accepted or declined. If true, the Song mintingStatus is set to StreamTokenAgreementApproved. Otherwise, is set to Undistributed. 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 Song owner.

Headers:

Content-Type: application/json

Content example:

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

3. Not Found

Code: 404 NOT FOUND

Condition: If the specified Song is not found.

Headers:

Content-Type: application/json

Content example:

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

4. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If {songId} is malformed.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Invalid UUID string: 123456789"
}

See Also

Post Song (Add New Song)

Patch Song (Update Song)

Get Song

Get Songs

Get Song Count

Delete Song

Get Song Genres

Upload Song Audio

Get Song Genre Count

Clone this wiki locally