Either tag on filters as a querystring, or consider if there is enough business logic behind the state to create different resource types, eg /draftinvoices
Jan 1, 2019
2
Level 1
Api resource listing with status
Hi everybody!
I will have one api endpoint /invoices, which list invoices 50/request. What is your suggestion, that I can get invoices with different statuses using this endpoint? Example invoices with status draft or sent.
Do I use get parameters, example /invoices?status=draft&status=sent or /invoices?status=draft,sent? Or what is best solution when I want follow rest standards?
I tried google, but maybe I had wrong key words, because not found good answer yet.
Please or to participate in this conversation.