Ih is not eating food properly since quite sometime now,there can be any underlying pathological cause ,so it's advisable you get your pet checked by a doctor for better diagnosis. And also you can start Pawgest/ Gutwell probiotic powder 1 scoop twice daily mixed with food ,this will maintain his gut health and poop consistency. If deworming is pending, Deworm your dog and include curd and vegetables in his diet.
Along with that you can also start a liver supplement for improving the appetite. Liv 52/ HEPAMUST/ Livoferol 5ml twice daily before food. Observe him for few more days and if he doesn't show any improvement,you can consult a vet directly for better diagnosis.
Yes you can also give PETSAPP syrup 5ml orally twice daily half an hour before food for 1 week, it will help increase his appetite. But if he still doesn't eat I would advise you to see a doctor physically or take online consultation and get CBC,LFT AND KFT tests done.