I am building REST endpoint that has invoices. I need to build both list of all invoices in 3 levels of description (detailed which is default, sums only and one with customers information).
I also need to build endpoint for individual invoices that will contain much more information in it.
I was thinking
GET /invoices <-- detailed
GET /invoices?mode=sums <-- sums
GET /invoices?mode=customer <-- sums
GET /invoices/TNTV002793849 <-- individual invoice
But I have seen others implement two different ones maybe
GET /invoices/detailed <-- detailed
GET /invoices/sums <-- sums
GET /invoices/customer <-- sums
GET /invoice/TNTV002793849 <-- individual
I already know from reading that all of these can count REST and if anything I need to make one with links so that it is HATEOAS which there is no real reason why I need it.
My question is more from practical point of view for example which is easier to implement, safer, and more common by convention.
I will probably use python with Flask for server and one client I write will be JQuery if that matters.