I have 2 question :
1.what is best practice for REST API method GET if there are many condition with the parameters.
example :
i have customers API and the user wants the api with request parameter like these :
idnumber and mobilephone
name (can use contains if user input %) or mobilephone
idnumber and idtype or date of birth
should i make 3 custom api with the same route for each commbination of parameters?
i ve searched everywhere but i cant find the answer, most article only share common best practice like these :
api/customer -- get all customer
api/customer/{id} -- get customer by id
2.Regarding the response api
example :
I have customers API and the response is like this : - CustomerID - CustomerName - IDNumber - MobilePhone - Address
lets say i have 2 user that consume this API but i only want 1 user can see response with "mobilephone" and "address" but another user only customrid,customername and idnumber , the question is how can i make the api?should i create 2 api?
sorry for my bad english
i googled everywhere but i cant find the right answwer please help