GET ​/api​/v3​/guest_account​/:vid​/preferences

Returns a guest account’s preferences including location, notification preferences, and genres.

Response

Example Response

{
  "preferences": {
    "id": {
    },
    "genres": [
      null
    ],
    "genre_groups": [
      null
    ],
    "genres_excluded": [
      null
    ],
    "promo_push_notification": false,
    "feature_permissions": {
    },
    "friend_also_favorited_push_notification": false,
    "friend_request_push_notification": false,
    "share_push_notification": false,
    "favorite_on_upvote": {
    },
    "location": {
      "id": {
      },
      "preference_id": {
      },
      "city_station_id": {
      },
      "city": {
      },
      "province": {
      },
      "country": {
      },
      "lat": {
      },
      "lng": {
      }
    },
    "saved_locations": null
  }
}

Response Parameters

  • preferences:

    • Required: no
    • id:

      • Required: yes
      • Type: Integer
      • Example: 1
    • genres: The user's selected genres. This is the custom genre list or the computed genre list based on the selected genre_groups.

      • Required: no
      • Type: array
      • Example: [ "Rock", "Jazz", "Indie", "Blues" ]
    • genre_groups: The user's selected genre groups. If the user has selected their own genres, this will be set to "Custom".

      • Required: no
      • Type: array
      • Example: [ "Rock" ]
    • genres_excluded: The user's excluded genres. This is the custom exclusion list or a computed exclusion list based on the provided genre_groups.

      • Required: no
      • Type: array
      • Example: [ "Metal" ]
    • promopushnotification:

      • Required: no
      • Type: boolean
    • feature_permissions: The feature permission map (json string). Used to define/keep consistent feature availability, feature experiment buckets etc across devices.

      • Required: no
      • Type: text
      • Example: { "voting": true, "allGenres": "hide" }
    • friendalsofavoritedpushnotification:

      • Required: no
      • Type: boolean
    • friendrequestpush_notification:

      • Required: no
      • Type: boolean
    • sharepushnotification:

      • Required: no
      • Type: boolean
    • favoriteonupvote: Indicates if the user has opted to automatically favorite a track when he upvotes a track. A value of "always" indicates that he always wants to favorite the track he upvoted, a value of "never" indicates he doesnt want to automatically favorite the up voted track. A value of null indicates that he wants the system to prompt him for every up vote

      • Required: no
      • Type: String
      • Example: always
    • location: The user's preferred location.

      • Required: no
      • id:

        • Required: yes
        • Type: Integer
        • Example: 1
      • preference_id:

        • Required: no
        • Type: Integer
        • Example: 2
      • citystationid: The official station id for the city corresponding to the location

        • Required: yes
        • Type: Integer
        • Example: 23
      • city:

        • Required: yes
        • Type: String
        • Example: Houston
      • province:

        • Required: yes
        • Type: String
        • Example: TX
      • country:

        • Required: yes
        • Type: String
        • Example: US
      • lat:

        • Required: yes
        • Type: Number
        • Example: 29.7628
      • lng:

        • Required: yes
        • Type: Number
        • Example: -95.3831
    • saved_locations: The user's saved locations.

      • Required: no
      • Type:
        • null
        • array
      • Items

        • Required: no
        • id:

          • Required: yes
          • Type: Integer
          • Example: 1
        • preference_id:

          • Required: yes
          • Type: Integer
          • Example: 2
        • citystationid: The official station id for the city corresponding to the location

          • Required: yes
          • Type: Integer
          • Example: 23
        • city:

          • Required: yes
          • Type: String
          • Example: Houston
        • province:

          • Required: yes
          • Type: String
          • Example: TX
        • country:

          • Required: yes
          • Type: String
          • Example: US
        • lat:

          • Required: yes
          • Type: Number
          • Example: 29.7628
        • lng:

          • Required: yes
          • Type: Number
          • Example: -95.3831

Response Codes

Successful Response Codes

  • 200: Preferences were retrieved successfully

Failure Response Codes

  • 422: A bad request