Store API Follow

Store API

The Store API returns a JSON-formatted description of public offers. 
URL: http://app.topspin.net/api/v1/offers

Authentication

You will need to use HTTP authentication to access the API. To get an API key please make a request here:https://app.topspin.net/account/artisthelp

Use your Topspin email login as your username and the API key as your password. You can find both of those in your Artist Profile here: http://app.topspin.net/account/profile/

Requests

A request to http://app.topspin.net/offer will return all public offers for artists that the authenticated user has access to. The offers can be filtered by supplying one of more of following parameters:

  • 'artist_id' Return offers for the artist having the given Topspin ID.
  • 'offer_type' Return offers of the given type. Valid types are: buy_button, email_for_media, bundle_widget (multi-track streaming player in the app) or single_track_player_widget
  • 'product_type' Return offers for the given product type. Valid types: image, video, track, album, package, other_media, merchandise
  • 'name' Partial match of campaign name.
  • 'status' Include 'all', 'inactive' or 'active' offers. Default: active
  • 'tags' Select spins by tag. Include multiple tags by separating them with a comma.
  • 'updated_after' Select only spins that have been created, modified, or made inactive since the given timestamp.

Pagination and Sorting:

Offers are returned 25 at a time, sorted by their created date. This can be changed by using the following parameters:

  • 'page' requested page number
  • 'sortcol' Column to sort on. Valid Options: created_at, name, offer_type, artist_id,

product_type, plays, views, plays

  • 'sortdir' Direction to sort the column. Valid Options: asc (ascending), desc (descending)

Response

Responses contain paging information and a list containing offer descriptions.

Each offer description has the following keys:

  • 'artist_id' Topspin ID for the artist
  • 'artist_name' Artist name
  • 'offer_type' Type of widget. Possible values - buy_button, email_for_media, bundle_widget, single_track_player_widget.
  • 'product_type' Type of product offered. Possible values - image, video, track, album,

account_product_bundle, other_media, merchandise

  • 'embed_code' html snippet to display the widget
  • image_small' small widget cover image
  • 'image_medium' medium widget cover image
  • 'image_large' large widget cover image
  • 'price' Offer price
  • 'currency' Currency of offer price
  • 'plays' Number of plays
  • 'views' Number of views
  • 'offer_url' Landing page url for the offer (Buy Button offers only)
  • 'mobile_url' Mobile device landing page url for the offer (Buy Button offers only)

Example Request 

https://app.topspin.net/api/v1/offers?artist_id=170


Response 

{
     "current_page"  : 1  ,
     "per_page"      : 25 ,
     "total_entries" : 1  ,
     "total_pages"   : 1  ,
     "offers": [
       {"artist_id":170,
       "offer_type":"bundle_widget",
       "offer_url":"http://app.topspin.net/store/mudhorn/170/myoffer?aId=1&cId=1&wId=1",
       "mobile_url":"https://store.topspin.net/purchase_flow/configure?campaign_id=1",
       "embed_code":"<div><object
type=\"application/x-shockwave-flash\" height=\"250\" width=\"300\"
id=\"TSWidget12743\"
data=\"http://cdn.topspin.net/widgets/bundle/swf/TSBundleWidget.swf?timestamp=1263940379\"
bgColor=\"#000000\">  <param value=\"always\"
name=\"allowScriptAccess\" />  <param name=\"allowfullscreen\"
value=\"true\" />  <param name=\"quality\" value=\"high\" />  <param
name=\"movie\" value=\"http://cdn.topspin.net/widgets/bundle/swf/TSBundleWidget.swf?timestamp=1263940379\"
/>  <param name=\"flashvars\"
value=\"widget_id=http://cdn.topspin.net/api/v1/artist/170/bundle_widget/12743?timestamp=1263940379&amp;theme=black&amp;highlightColor=0x00A1FF\"
/>  <param name=\"wmode\" value=\"transparent\" /></object></div> ",
       "product_type":"track",
       "artist_name":"Mudhorn"
     }]
   }
Have more questions? Submit a request and our team will be able to help get you sorted.
Powered by Zendesk