Skip to content
HooprB2B

API reference

Get tracks in a playlist

Returns a paginated track list for a playlist your client may access.

GET/v1/playlists/:playlistId/tracks
scopecatalog:read
Path parameters
  • playlistIdstring (UUID)required
    The playlist's unique id.
Query parameters
  • pageintegeroptionaldefault 1
    Page number.
  • pageSizeintegeroptionaldefault 20
    Items per page (max 100).

Request

GET /v1/playlists/:playlistId/tracks
curl "https://<your-b2b-host>/v1/playlists/p1a2b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b/tracks?page=1&pageSize=20" \
  -H "Authorization: Bearer $TOKEN"

Response

{
  "data": {
    "totalRecords": 1280,
    "totalPages": 64,
    "currentPage": 1,
    "pageSize": 20,
    "items": [
      {
        "id": "9b1c0f2e-3a4b-4c5d-8e6f-7a8b9c0d1e2f",
        "name": "Midnight Drive",
        "slug": "midnight-drive",
        "type": "music",
        "bpm": "120",
        "songKey": ["A min"],
        "timeSignature": "4/4",
        "durationSeconds": 184,
        "region": "IN",
        "releaseDate": "2024-03-01T00:00:00.000Z",
        "hasVocals": false,
        "isPRO": false,
        "tags": ["energetic", "drive"],
        "artists": [
          { "id": "a1b2c3d4", "name": "Nova", "role": "COMPOSER", "isPrimary": true }
        ],
        "filters": [
          { "id": "f1a2b3c4", "name": "Electronic", "slug": "electronic", "type": "genre" },
          { "id": "f2b3c4d5", "name": "Energetic",  "slug": "energetic",  "type": "mood" }
        ],
        "artworkUrl": "https://cdn.hoopr.example/musics/9b1c.../image.jpg",
        "streamUrl": "https://cdn.hoopr.example/musics/9b1c.../audio.mp3?X-Goog-Expires=1800&X-Goog-Signature=..."
      }
    ]
  },
  "error": { "code": 0, "message": "OK" }
}

Errors

HTTPerror.typeMeaning
401invalid_tokenToken missing, malformed or expired.
403playlist_restrictedYour client isn't granted that playlist.
404playlist_not_foundNo playlist matches that id.