I would like to know if I can use Sourcerer to set up API on my Joomla site.
My client, as a car rental company, wants to implement new functions on his site so that customers can book cars online.
Sourcerer is an extension that allows you to place custom PHP code inside your content. Inside articles, for instance.
What that PHP code and how that works is completely down to you.
Sourcerer is not really meant to create a complete and complex booking extension.
That should be coded as a Joomla component, with its own views and files.