POST ​/api​/v3​/guest_account

Creates/updates a guest account. Required if the user has chosen to skip registration or login. Use this endpoint to record a guest account’s location and genre selections.

Request

Example Request

{
  "guest_account": {
    "preferences": {
      "location": {
        "lat": 29.7628,
        "lng": -95.3831
      },
      "genres": {
      },
      "genre_groups": {
      }
    }
  }
}

Example Parameters

  • guest_account:

    • Required: yes
    • preferences:

      • Required: no
      • location:

        • Required: yes
        • lat: The estimated or provided latitude of the user.
          • Required: yes
          • Type: number
          • Example: 29.7628
        • lng: The estimated or provided longitude of the user.
          • Required: yes
          • Type: number
          • Example: -95.3831
      • genres: An array of selected genres. Used when the user has chosen a custom selection of genres (not groups).

        • Required: no
        • Type: Array
        • Example: [ "Rock", "Pop" ]
      • genre_groups: An array of selected genre groups. If provided, genres must not be provided.

        • Required: no
        • Type: Array
        • Example: [ "Rock" ]

Response

Example Response

{
  "guest_account": {
    "id": "31f89817241a02fcd14639d4c574bb1d",
    "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

  • guest_account: The created/updated guest account

    • Required: no
    • id: The guest account visitor id. Use this as a DELI_VID header to future requests to associate the user with this guest account.
      • Required: no
      • Type: string
      • Example: 31f89817241a02fcd14639d4c574bb1d
    • 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__:

          • __preference_id__:

          • __city_station_id__: The official station id for the city corresponding to the location

          • __city__:

          • __province__:

          • __country__:

          • __lat__:

          • __lng__:

Response Codes

Successful Response Codes

  • 200: Guest account has been created/updated.

Failure Response Codes