Problem and data domain
We’ve already mentioned a few different logical domains around products, orders, invoices, and so on. The problems you’ll have in this domain are generally:
- Reading and writing: What data do you wish to read or write (or maybe both)?
- How will users access your data (all of it or maybe there will be filters applied to limit the output)?
- Access and roles: You can expect that different roles will need to have access to your system. An administrator role should probably have access to most of the data, whereas a logged-in user should only be able to see the part of the data that belongs to them. This is not something we will address in this chapter, but it’s something you should consider when you build out this API.