POST ​/api​/v3​/track​/:id​/play

Records a track play event for a given track. Clients are required to send a track play event when playback reaches 10 seconds.

Request

Example Request

{
  "auth_token": "ef43987dc3dfca56255915d3b109714ecd4516ac54f527",
  "station_id": 145,
  "station_type": "Local Shows"
}

Example Parameters

  • auth_token: The auth_token of the previously authenticated user. Retrieve this from the auth api.

    • Required: no
    • Type: string
    • Example: ef43987dc3dfca56255915d3b109714ecd4516ac54f527
  • station_id: The station id that this track came from. This is returned to you in the station response.

    • Required: no
    • Type:
      • number
      • null
    • Example: 145
  • station_type: The type of station this track was played in, such as "Local shows", "venue", or "event". This is also returned in the station response.

    • Required: no
    • Type: string
    • Example: Local Shows

Response

Example Response

{
  "track_id": 12424,
  "status": "played",
  "recent_station": {
    "id": 123,
    "account_id": 123,
    "station_id": 123,
    "updated_at": {
    },
    "created_at": {
    },
    "last_listened_at": {
    },
    "station": {
      "title": "Starry Plough Radio",
      "id": 1,
      "station_type": "Local Shows"
    }
  }
}

Response Parameters

  • track_id: The track id you sent

    • Required: no
    • Type: number
    • Example: 12424
  • status: Indicates the track play event was recorded

    • Required: no
    • Type: string
    • Example: played
  • recent_station:

    • Required: no
    • id: The id of the recent station record
      • Required: yes
      • Type: number
      • Example: 123
    • account_id: The recent station's associated account record id
      • Required: yes
      • Type: number
      • Example: 123
    • station_id: The recent station's associated station record id
      • Required: yes
      • Type: number
      • Example: 123
    • updated_at: the last time the recent station was updated
      • Required: yes
      • Type: date-time
      • Example: 2013-12-10 11:30:00 -0800
    • created_at: when the recent station was first listened to
      • Required: yes
      • Type: date-time
      • Example: 2013-12-10 11:30:00 -0800
    • lastlistenedat: the last time the recent station was listened to
      • Required: yes
      • Type: date-time
      • Example: 2013-12-10 11:30:00 -0800
    • station:

      • Required: no
      • title: The title of the station. Should be displayed when playing the station.
        • Required: yes
        • Type: string
        • Example: Starry Plough Radio
      • id: The unique identifier for the station.
        • Required: yes
        • Type: number
        • Example: 1
      • station_type: The type of station returned. Also used to record statistics.
        • Required: yes
        • Type: string
        • Example: Local Shows

Response Codes

Successful Response Codes

  • 200: The track play was recorded successfully.

Failure Response Codes

  • 404: The track could not be found.