Search code examples
dwolla

Dwolla Transaction stats: Successful response includes null values


I am making the following URL request to Dwolla API Transaction Stats:

https://www.dwolla.com/oauth/rest/transactions/stats?oauth_token=xxx&startDate=11-08-2012 00:00:00&types=money_received

and receiving this response

{"Success":true,"Message":"Success","Response":{"TransactionsCount":null,"TransactionsTotal":null}} 

I am expecting a count and total, but instead receiving null values. Can you explain what is causing this issue and if my request needs to be changed?


Solution

  • I think that the reason you're getting null responses, is because you're essentially asking the API server to not return values for those... Meaning, the Transactions/Stats() method accepts the "types" parameter, which specifies which of the two responses you wish to receive - valid options are TransactionsCount and TransactionsTotal. The types param defaults to include all stats. The "money_received" type actually belongs to a different request...