{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/donations","auth":"required","method":"get","params":[{"name":"limit","type":"int","default":"10","desc":"How many results to return (max: 100)","required":false,"in":"query","ref":"","_id":"55bad9c03f0767230008f51b"},{"name":"before","type":"int","default":"","desc":"Only return results that come before this ID","required":false,"in":"query","ref":"","_id":"55bad9c03f0767230008f51a"},{"name":"after","type":"int","default":"","desc":"Only return results that come after this ID","required":false,"in":"query","ref":"","_id":"55bad9c03f0767230008f519"},{"name":"currency","type":"string","default":"","desc":"The desired [currency code](doc:currency-codes). If empty, each record will be in the originating currency","required":false,"in":"query","ref":"","_id":"55ca68dfb205cb0d006db934"},{"name":"verified","type":"boolean","default":"","desc":"If verified is set to 1, response will only include verified donations from paypal, credit card, skrill and unitpay, if it is set to 0 response will only include streamer added donations from My Donations page, do not pass this field if you want to include both","required":false,"in":"query","ref":"","_id":"58cc41db06e0900f004e5468"},{"name":"sort_by","type":"string","default":"created_at","desc":"Key to sort your results by","required":false,"in":"query","ref":"","_id":"5b048dae7270f800033551fd"},{"name":"direction","type":"string","default":"desc","desc":"sort_by direction (asc or desc)","required":false,"in":"query","ref":"","_id":"5b048dae7270f800033551fc"},{"name":"date_from","type":"datetime","default":"","desc":"the starting date in ISO 8601 extended format","required":false,"in":"query","ref":"","_id":"5b048dae7270f800033551fb"},{"name":"date_to","type":"datetime","default":"","desc":"the ending date in ISO 8601 extended format","required":false,"in":"query","ref":"","_id":"5b048dae7270f800033551fa"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\":[\n    {\n\t\t\t\"donation_id\":\"80179029\",\n      \"created_at\":\"1438576556\",\n      \"currency\":\"USD\",\n      \"amount\":\"50\",\n      \"name\":\"Thomas\",\n      \"message\":\"nice!\"\n    },\n    {\n      \"donation_id\":\"80179019\",\n      \"created_at\":\"1438576521\",\n      \"currency\":\"USD\",\n      \"amount\":\"15.50\",\n      \"name\":\"JoeGamer\",\n      \"message\":null\n    }\n  ]\n}","name":""},{"status":400,"language":"json","code":"{\n  \"error\": \"...\",\n  \"message\": \"...\"\n}","name":""}]},"settings":"","examples":{"codes":[{"language":"php","code":"<?php\n\n$client = new GuzzleHttp\\Client();\n\ntry {\n\n  $response = $client->get('https://streamlabs.com/api/v1.0/donations', [\n    'query' => [\n      'access_token' \t=> 'ACCESS_TOKEN_HERE',\n      'limit' \t\t\t\t=> 2,\n      'currency' \t\t\t=> 'USD'\n    ]\n\t]);\n\n  $result = $response->json();\n\n} catch (Exception $e) {\n\n  //failed\n  $result = $e->getResponse()->json();\n\n}\n"}]}},"next":{"description":"","pages":[]},"title":"/donations","type":"endpoint","slug":"donations","excerpt":"Fetch donations for the authenticated user. Results are ordered by creation date, descending.","body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Supports CORS\",\n  \"body\": \"This endpoint allows cross-origin requests!\"\n}\n[/block]","updates":["5849c9af8c6aef0f00617a39","586b0d4c5923d11b00dcd990","586b0d4d9698b91900f8496e","588858bae7c13a2d00751e59","58a849392171a00f00a22fea","58ab184090d1d20f00b77716","58ac775dd5e1570f00d1c315","58b07bb73529383900a75adc","5910c787076ce90f007f83fb"],"order":0,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"55bad9c03f0767230008f518","category":{"sync":{"isSync":false,"url":""},"pages":["55bad9c03f0767230008f518","55baf1d51b0d66370078166c","55baf1f6d0736b3100bf102c","55bef201ad601c2b00762bf0"],"title":"Donations","slug":"donations","order":3,"from_sync":false,"reference":true,"_id":"55bad8f33f0767230008f517","project":"55baca9cd0736b3100bf1008","version":"55baca9cd0736b3100bf100b","__v":4,"createdAt":"2015-07-31T02:09:55.734Z"},"editedParams2":true,"githubsync":"","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["55baca9dd0736b3100bf100c","55bacba0d0736b3100bf1017","55bad8f33f0767230008f517","55baf3f01b0d66370078166e","55baf4151b0d66370078166f","55f1cca35fe76419007dc794","573e2d6e610a090e00ca2b97","58d97ce57718211b0028e6bc","599b510cb683b50031a35299","5a871c493948fd004697e677"],"_id":"55baca9cd0736b3100bf100b","createdAt":"2015-07-31T01:08:44.540Z","project":"55baca9cd0736b3100bf1008","__v":10,"releaseDate":"2015-07-31T01:08:44.540Z"},"createdAt":"2015-07-31T02:13:20.632Z","editedParams":true,"__v":15,"project":"55baca9cd0736b3100bf1008","parentDoc":null,"user":"55baca333f0767230008f4ff"}

get/donations

Fetch donations for the authenticated user. Results are ordered by creation date, descending.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

limit:
integer10
How many results to return (max: 100)
before:
integer
Only return results that come before this ID
after:
integer
Only return results that come after this ID
currency:
string
The desired [currency code](doc:currency-codes). If empty, each record will be in the originating currency
verified:
boolean
If verified is set to 1, response will only include verified donations from paypal, credit card, skrill and unitpay, if it is set to 0 response will only include streamer added donations from My Donations page, do not pass this field if you want to include both
sort_by:
stringcreated_at
Key to sort your results by
direction:
stringdesc
sort_by direction (asc or desc)
date_from:
datetime
the starting date in ISO 8601 extended format
date_to:
datetime
the ending date in ISO 8601 extended format

Examples


Result Format


Documentation

[block:callout] { "type": "success", "title": "Supports CORS", "body": "This endpoint allows cross-origin requests!" } [/block]