balanced / balanced-api

Balanced API specification.
220 stars 72 forks source link

Return total unlinked transactions count #713

Open kyungmin opened 9 years ago

kyungmin commented 9 years ago

We want to display total number of unlinked transactions to encourage marketplaces to link their transactions.

Mockup: https://github.com/balanced/balanced-dashboard/issues/1481#issuecomment-58597481

mjallday commented 9 years ago

should be provided by stats, not the main api.

e..g GET https://stats.balancedpayments.com/MP123123/unlinked_transactions

@mahmoudimus could be good kafka/eb proof of concept

kyungmin commented 9 years ago

Is stats.balancedpayments.com replacing analytics.balancedpayments.com?

Perhaps GET https://stats.balancedpayments.com/MP123123/count could return them at once like:

{
    "transactions": {
        "total": 123,
        "debit": 123,
        "credit": 123,
        "refund": 123,
        "reversal": 123,
        "unlinked": 123
    },
    "orders": {
        "total": 123,
        "overdue": 123
    },
    "disputes": {
        "total": 123,
        "won": 123,
        "lost": 123,
        "pending": 123
    },
    ...
}

We could do similar for GET https://stats.balancedpayments.com/MP123123/amount.

What do you think? When could this be done?

msherry commented 9 years ago

I believe stats is already in use.