Hi,
I’m new to API development and I’m having some doubts about the standards that sould be maintained.
In my case, I’m defining an API that should have the following resource:
…/accounts/{accountid}/vouchers
by invoking this resource with a GET should return the list of vouchers for that specific account.
But I also need to invoke the API to checkout some of the previously returned vouchers.
My question is, should I have a GET operation with a resource …/accounts/{accountid}/vouchers/{voucherID} and have a query parameter like checkout=true which means it will only checkout one voucher at a time?
Is there a better way of doing this maintaining the recommended API standards if, for example, I need to checkout multiple vouchers?
Best regards,
Ernesto Costa.