DEV Community

loading...

Discussion on: Building Consistent RESTful APIs

Collapse
richardigbiriki profile image
Richard Igbiriki Author

This is entirely optional and depends solely on your implementation choice. You could have a Transactions table with minute information about each transaction and a Details table with more detailed information about each transaction. I am using this approach of two related tables.

Yes, you can also get all the details in /transaction/:id but it depends on the use case.