-
Notifications
You must be signed in to change notification settings - Fork 7
Transactions
Harmun edited this page May 17, 2019
·
2 revisions
Endpoints for transaction data
Method | Path | Token Type | Description | Expected Body Input | Expected Output |
---|---|---|---|---|---|
post | /transactions | Admin/User | Add transaction | { debitAccountId, creditAccountId, amount } | { id, debitAccountId, creditAccountId, amount, date } |
get | /transactions | Admin | Return all transactions as an array of objects | None | [ { id, debitAccountId, creditAccountId, amount, date }, ... ] |
get | /transactions/?account=[account] | Admin/User | Return all transactions associated with specified account as an array of objects | None | [ { id, debitAccountId, creditAccountId, amount, date }, ... ] |
get | /transactions/:id | Admin/User | Return transaction specified by id as an object | None | { id, debitAccountId, creditAccountId, amount, date } |
To create a new transaction resource, the user to whom the User token was issued must be the owner of the account which will be debited.
To read a transaction resource, the user to whom the User token was issued must be the owner of the account being referenced by the transaction.