List Subscriptions

Endpoint

GET /subscriptions - get list of podcast user subscriptions

Parameters

Parameter Parameter Type Data Type
api-key header string Required
Authorization header string Required
include query string available includes: podcast, podcast.lastepisode

Error messages

  • invalid HTTP_API_KEY
  • Not authenticated

HTTP response codes:

  • 200 - Success
  • 401 - Unauthorized action

Example request

curl --request GET \
  --url 'https://api-dev.radiozu.ro/v1/subscriptions?include=podcast' \
  --header 'Authorization: Bearer AUTH_TOKEN' \
  --header 'api-key: API_KEY' 

Response fields

Array of subscription objects containing a link between an user and a podcast. Optionally a podcast object is included.

  • id - id of subscription, to be used for deletion of subscription
  • user_id - user_id of subscription
  • podcast_id - id of the subscribed podcast

Example response

Simple example response

{
    "data": [
        {
            "id": 4,
            "podcast_id": 1,
            "user_id": 1
        }
    ]
}

Example response including podcast

{
    "data": [
        {
            "id": 4,
            "podcast_id": 1,
            "user_id": 1,
            "podcast": {
                "id": 1,
                "name": "Fain & Simplu Podcast",
                "active": 1,
                "description": "Mihai Morar prezintă Fain & Simplu. Podcast pentru minte, trup și suflet.",
                "feed_url": "https:\/\/feeds.buzzsprout.com\/659008.rss",
                "image": "https:\/\/cms-podcasts.radiozu.ro\/storage\/7ApDED6PXbj0Gy2NLscTeWZHSmFyuM.jpg"
            }
        }
    ]
}