This will retrieve the rate card available for the track supplied. Essentially you’ll get back some metadata about the rate card itself (take note of the profile_id, that will matter later), and then the data property will contain the rate choices. The root item will have some children, and each of those might have children etc. representing different choices in the licensing modal. Eventually you’ll terminate into an object with a price property, and you know you have a final option. Prices are in whatever currency you use.
/api/licensing/getRates
Param | Required | Description |
---|---|---|
track_id | yes | The track whose rate card you want |
Try It Out: https://brentracks.sourceaudio.com/api/licensing/getRates?token=436-5ebad39a44727a0&track_id=7640946
Example Response
{ |
Shopping Cart Links
The primary reason you’d want the rate card information is so you can send users to your SourceAudio site with an already filled-out license in their cart.
You can add tracks to your cart with specific rate card choices by using a simple code system that relates back to the values you got from /api/licensing/getRates
. Short version, it looks like this:
https://brentracks.sourceaudio.com/#!shopping_cart?cart=4660675-242-1-0-0|12074528-242-3-2
That link should take you to my test site with two tracks in it with rate card choices.
Cart Codes
So the important part of that url is cart=4660675-242-1-0-0|12074528-242-3-2
. This is two items, delimited by |
, so we see our two codes:
4660675-242-1-0-0
12074528-242-3-2
These are stored in the format track_id-profile_id-choice-choice-choice-etc
. The choice values are zero-indexed to match the children arrays sent to you in the getRates
call. So for instance, the first code is referencing track id 4660675
, and if I call getRates
on that, I see that it’s using rate card id 242
(it’s likely your whole site is using the same rate card, but not all sites work like that). So my choices are 1-0-0
which basically means I chose the second item, then the first, and the first again.
None of the rate card system is simple, because it has to accommodate so many different licensing schemes, so if you need help, let us know!