The Bandcamp Sales Report API gives you access to your sales report delivered in either a CSV or JSON format via standard web development techniques. This report is also available through the Tools page on your band or label account.
All API calls should be POSTs with the Authorization header set to:
Authorization: Bearer {your access token}
The unique ids for all your affiliated artists and labels can be found using the my_bands call to the Account API.
https://bandcamp.com/api/sales/2/sales_report
{
"band_id": 1633770804,
"member_band_id": 1925197437,
"start_time": "2021-01-01 00:00:00",
"end_time": "2021-02-01 00:00:00",
"format": "json"
}
{
"142901548": {
"date": "04 Jan 2021 23:22:11 GMT",
"paid_to": "Bandcamp",
"item_type": "album",
"item_name": "Very Cool Band Greatest Hits",
"artist": "Very Cool Band",
"currency": "USD",
"item_price": 9.99,
"quantity": 1,
"discount_code": null,
"sub_total": 9.99,
"seller_tax": null,
"marketplace_tax": null,
"shipping": null,
"ship_from_country_name": null,
"transaction_fee": 0.49,
"fee_type": "paypal",
"item_total": 9.99,
"amount_you_received": 9.5,
"bandcamp_transaction_id": 2095918850,
"paypal_transaction_id": null,
"net_amount": 8.5,
"package": "digital download",
"option": null,
"item_url": "https://verycoolband.bandcamp.com/album/very-cool-band-greatest-hits",
"catalog_number": null,
"upc": "",
"isrc": "",
"buyer_name": "Chris Jones",
"buyer_email": "cjones@email.com",
"buyer_phone": null,
"buyer_note": null,
"ship_to_name": "",
"ship_to_street": "",
"ship_to_street_2": "",
"ship_to_city": null,
"ship_to_state": null,
"ship_to_zip": null,
"ship_to_country": null,
"ship_to_country_code": null,
"ship_date": null,
"ship_notes": null,
"country": "United States",
"country_code": "US",
"region_or_state": "IL",
"city": "Townsville",
"referer": "Bandcamp search",
"referer_url": "bandcamp.com/app/android/search",
"sku": null
},
...
}
{
"band_id": 1633770804,
"member_band_id": 1925197437,
"start_time": "2021-01-01 00:00:00",
"end_time": "2021-02-01 00:00:00",
"format": "csv"
}
{
"csv": "Mon Jan 04 23:22:11 UTC 2021,Bandcamp,album,Very Cool Band Greatest Hits,Very Cool Band,USD,9.99,1,,9.99,,,,,0.49,paypal,9.99,9.5,2095918850,,8.5,digital download,,https://verycoolband.bandcamp.com/album/very-cool-band-greatest-hits,,,,Chris Jones,cjones@email.com,,,,,,,,,,,,United States,US,IL,Townsville,Bandcamp search,bandcamp.com/app/android/search,|
..."
}
https://bandcamp.com/api/sales/1/sales_report
Parameters
{
"band_id": 1633770804,
"member_band_id": 1925197437,
"start_time": "2016-01-01 00:00:00",
"end_time": "2016-02-01 00:00:00",
"format": "json"
}
{
"142901548": {
"date": "04 Jan 2016 23:22:11 GMT",
"paid_to": "Bandcamp",
"item_type": "album",
"item_name": "Very Cool Band Greatest Hits",
"artist": "Very Cool Band",
"currency": "USD",
"item_price": 9.99,
"quantity": 1,
"discount_code": null,
"sub_total": 9.99,
"tax": null,
"shipping": null,
"ship_from_country_name": null,
"transaction_fee": 0.49,
"fee_type": "paypal",
"item_total": 9.99,
"amount_you_received": 9.5,
"bandcamp_transaction_id": 2095918850,
"paypal_transaction_id": null,
"net_amount": 8.5,
"package": "digital download",
"option": null,
"item_url": "https://verycoolband.bandcamp.com/album/very-cool-band-greatest-hits",
"catalog_number": null,
"upc": "",
"isrc": "",
"buyer_name": "Chris Jones",
"buyer_email": "cjones@email.com",
"buyer_phone": null,
"buyer_note": null,
"ship_to_name": "",
"ship_to_street": "",
"ship_to_street_2": "",
"ship_to_city": null,
"ship_to_state": null,
"ship_to_zip": null,
"ship_to_country": null,
"ship_to_country_code": null,
"ship_date": null,
"ship_notes": null,
"country": "United States",
"country_code": "US",
"region_or_state": "IL",
"city": "Townsville",
"referer": "Bandcamp search",
"referer_url": "bandcamp.com/app/android/search",
"sku": null
},
...
}
{
"band_id": 1633770804,
"member_band_id": 1925197437,
"start_time": "2016-01-01 00:00:00",
"end_time": "2016-02-01 00:00:00",
"format": "csv"
}
{
"csv": "Mon Jan 04 23:22:11 UTC 2016,Bandcamp,album,Very Cool Band Greatest Hits,Very Cool Band,USD,9.99,1,,9.99,,,,0.49,paypal,9.99,9.5,2095918850,,8.5,digital download,,https://verycoolband.bandcamp.com/album/very-cool-band-greatest-hits,,,,Chris Jones,cjones@email.com,,,,,,,,,,,,United States,US,IL,Townsville,Bandcamp search,bandcamp.com/app/android/search,|
..."
}
Triggers generation of a sales report. Returns a token used to retrieve the generated report later.
https://bandcamp.com/api/sales/2/generate_sales_report
Parameters
{
"band_id": 1633770804,
"member_band_id": 1925197437,
"start_time": "2021-01-01 00:00:00",
"end_time": "2021-02-01 00:00:00",
"format": "json"
}
{
"token": "1633770804-c3e3910398c0009a2e43a01b286c9a60"
}
Returns a URL to download the sales report for a given token.
https://bandcamp.com/api/sales/2/fetch_sales_report
Parameters
{
"token": "1633770804-c3e3910398c0009a2e43a01b286c9a60"
}
{
"url": "https://bandcamp.com/file?id=93001130&name=1633770804-c3e3910398c0009a2e43a01b286c9a60&sig=yLkNPB4CEYOUKNuI5BttJ00KQo8%3D"
}