Link Search Menu Expand Document

station.submitDataPoint

Submit a datapoint corresponding to a played track

Example URL

https://api.melodia.io/v1/station.submitDataPoint?userKey=a4b5G982H3r9Vf783EEd&dpTrack_key=MT234jk23f&dpTrack_listenFraction=1.0&timestamp=1625294543&activity=running&location_latitude=37.445099&location_longitude=-122.160362&location_altitude=9.1

Params

paramrequireddescriptiontype
userKeyYA unique ID to be associated with the new userString
dpTrack_keyYTrack key of played track.String
dpTrack_listenFractionYFloating number between 0.0 and 1.0 indicating what fraction of the recently played track was listened before being skipped. (i.e., 0.0 if immediately skipped, 1.0 if listened till end)Float
timestampNCurrent moment’s Unix timestamp (in seconds)Int
activityNCurrent moment’s activity. Can be either of the following: stationary, walking, running, biking, drivingString
location_latitudeNCurrent moment’s location’s latitude (in degrees)Float
location_longitudeNCurrent moment’s location’s longitude (in degrees)Float
location_altitudeNCurrent moment’s location’s altitude (in meters)Float

Auth

This service requires authentication. Refer to Authentication for more details.

Sample Response

{
    'statusCode': 200,
    'body': {
       'message': "Success!"
    }
}

Discussion

Use this method if you just need to submit a datapoint to Melodia without needing buffered tracks in response.

To learn more about Melodia’s smart station, please refer to Smart Station