BonAmi Software interview question

Optimization of api for Backend