Replies: 2 comments
-
I think it makes complete sense, @wwahammy! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've created a github issue for this at #730 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking into developing the REST API around subtransactions and payments. As implemented in #684, you can list the transactions for a nonprofit by calling:
GET /api/nonprofits/:nonprofit_id/transactions
Or you can get the information about a specific transaction by calling
GET /api/nonprofits/:nonprofit_id/transactions/:id
How should we get subtransactions though? Or payments?
Proposal
To get all subtransactions for a transaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/subtransactions
To get a specific subtransaction for a transaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/subtransactions/:id
To get all payments for a subtransaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/subtransactions/:subtransaction_id/payments
To get a payment on a subtransaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/subtransactions/:subtransaction_id/payments/:id
**NOTE: this is the canonical URL for a payment.To get all payments on a transaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/payments
NOTE: (this is exactly the same if you did a UNION on the result of getting all of the payments for all subtransactionsTo get a payment on a transaction:
GET /api/nonprofits/:nonprofit_id/transactions/:transaction_id/payments/:id
NOTE: the url in the JSON will display the canonical URL for the payment, NOT this URLWhat do folks think? Does this make sense? @clarissalimab?
Beta Was this translation helpful? Give feedback.
All reactions