I'm trying to delineate the responsibilities between client & server. I have the server parse a file, and then send back the uncategorized accounting transactions. The URL looks something like:
POST /api/accounts/:account_id/transaction_file // used for the upload GET /api/accounts/:account_id/uncategorized // gets all the uncategorized accounts
Now, where it gets iffy is after I've categorized those accounts on the client-side, does it make more sense to send a POST back to:
Or should the client be responsible for DELETE-ing the uncategorized transactions and then POSTing a new transaction?
DELETE /api/accounts/:account_id/uncategorized/:uncategorized_id POST /api/accounts/:account_id/transactions
This process seems to align much more with the answer found here.
However, it does feel "wrong" that the client should be the one owning this responsibility. Am I wrong to go about it this way?