Is it permissible to offer a sacrifice in gratitude to Allah for a specific blessing?
Question

Is it permissible for a person who has bought a car or a house to offer a sacrifice in gratitude to Allah?.
Praise be to Allah.Firstly: 
The blessings that Allah bestows upon people are many, and His bounty and generosity towards them are vast. A blessing can only be responded to by giving thanks and appreciating it. Allah, may He be glorified and exalted, has enjoined giving thanks to Him, for He is Appreciative and loves those who give thanks. 
Allah says (interpretation of the meaning):
“So eat of the lawful and good food which Allah has provided for you. And be grateful for the Graces of Allah, if it is He Whom you worship” [al-Nahl 16:144]
“seek your provision from Allah (Alone), and worship Him (Alone), and be grateful to Him. To Him (Alone) you will be brought back” [al-‘Ankaboot 29:17]
Part of being grateful to Allah is seeking to draw closer to Him by means of different kinds of acts of worship and to endear oneself to Him by means of good deeds such as prayer, zakaah, fasting and so on. 
Another part of being grateful to Allah is giving thanks to Him by means of sacrifice rituals, which means offering a sacrifice for the sake of Allah. 
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said in his commentary on the verse “Therefore turn in prayer to your Lord and sacrifice (to Him only)” [al-Kawthar 108:2]: 
What is meant is that prayer and sacrifice are the best of the things by means of which one may draw closer to Allah, and the usage of the word fa (translated here as “therefore”) points to the reason, i.e., doing that – prayer and sacrifice – in gratitude for that which Allah has given him of al-Kawthar (a river in Paradise) and much goodness. So he should give thanks to the One Who has blessed him and worship Him, and the two greatest types of worship are these two acts of worship; indeed, prayer is the ultimate act of worship. It is as if He is saying to him: We have given you al-Kawthar and a great deal of goodness, and We have blessed you with that because you have been doing these two acts of worship in gratitude for Our blessing to you; these are the reasons why We have bestowed these blessings upon you, so do these two things for Us, for prayer and sacrifice are surrounded by blessings that come before them and after them. The best financial act of worship is sacrifice and the best physical act of worship is prayer, and the benefits that a slave of Allah may gain from prayer cannot be compared to any other type of worship, as is  known by those whose hearts are alive and those of high aspirations. Adding to it the benefits of offering sacrifice, which is a sign of devotion to Allah and thinking positively of Him, and having strong  certainty and faith about that which is in the hand of Allah is something wonderful, if that is accompanied by faith and sincerity. The Prophet (peace and blessings of Allah be upon him) obeyed the command of his Lord and prayed and sacrificed a great deal to Him; he even sacrificed sixty-three camels with his own hand during the Farewell Pilgrimage, and he used to offer sacrifices on the Eids and at other times. End quote. 
Majmoo’ al-Fatawa 916/532). 
If Allah bestows a great blessing upon a person – and all His blessing are great – then it is mustahabb for him to give thanks to Allah for it by showing kindness to people, so he should offer a sacrifice and make food and invite his brothers and friends, and give charity to those who are in need. 
It says in al-Mawsoo’ah al-Fiqhiyyah (26/180-181): 
It is mustahabb to give thanks anew when new blessings come, by speaking words of praise. Gratitude for that may also be expressed by doing acts of worship, which includes offering a sacrifice or inviting people to a meal. The fuqaha’ have mentioned the kinds of meals that may be offered when blessing are renewed, such as the wakeerah which is made for a new home, or naqee’ah which is made on the return of an absent loved one, and hidhaaq which is done when a child completes a reading of the Qur’aan. 
The view of the Hanbalis, the more correct view among the Shaafa’is, is that these meals are mustahabb. 
Ibn Qudaamah said: These invitations – other than the wedding feast (waleemah) and ‘aqeeqah – are something good, but they are like invitations that are given for no reason; if the person who does them intends thereby to give thanks to Allah for His blessing and to feed his brothers and offer food, then he will have the reward for that in sha Allah. End quote. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked: 
If one of my children does well in school, is it permissible for me to offer a sacrifice to celebrate his success, and to give thanks to Allah? 
He replied: 
There is nothing wrong with making food (waleemah) if the children or one of them succeeds, and inviting one’s loved ones and his child’s friends, to celebrate Allah’s blessing and to encourage the child. End quote. 
Liqaa’aat al-Baab il-Maftooh (no. 161, question no. 1). 
Secondly: 
It is essential to beware of some beliefs which many people hold, and say that in order to protect the new house or car it is essential to offer a sacrifice and sprinkle it with the blood of the slaughtered animal, or that evil spirits will not keep away from you unless you do that, otherwise the blessing will soon dissipate.  hese are jaahili beliefs which do not come from someone who believes in Allah as his Lord Who possesses all powers to bring benefit or cause harm, in Whose hand is the creation and the commandment, and knows that it is not permissible to do acts of worship unless they are done for the sake of Allah. 
The scholars of the Standing Committee were asked about the belief held by many people, that offering a sacrifice on the threshold of the new house before entering it is one of the most important means of warding off the evil eye, and making the house blessed, and avoiding calamities and undesirable events. 
They replied: 
If this custom – i.e., offering a sacrifice on the threshold of the new house – is done in order to placate the jinn and ward off calamities and undesirable events, then it is a haraam custom, and is in fact shirk. This is what seems to be the case with offering the sacrifice before entering the house, and doing it on the threshold in particular. 
But if the intention is to honour one's new neighbours and get to know them, and to give thanks to Allah for the blessing of a new home, and to honour one's relatives and friends on this occasion, and to show them the house, then this is good and the one who does it is to be praised for his action. But that is only usually done after the people have moved into the house, and not before, and the animal or animals should not be slaughtered on the threshold of the house or in the entryway to the house. End quote. 
Fatawa al-Lajnah al-Daa’imah (1/214) 
See also the answer to question no. 26952, which quotes two fatwas from Shaykh ‘Abd al-‘Azeez ibn Baaz and Shaykh al-‘Uthaymeen concerning the same topic. 
And Allah knows best.