Genesis 37:28-36

28 So when the Midyanim, merchants, passed by, they drew and lifted Yosef up out of the cistern and sold him for half a pound of silver shekels to the Yishma'elim, who took Yosef on to Egypt.
29 Re'uven returned to the cistern, and, upon seeing that Yosef wasn't in it, tore his clothes in mourning.
30 He returned to his brothers and said, "The boy isn't there! Where can I go now?"
31 They took Yosef's robe, killed a male goat and dipped the robe in the blood.
32 Then they sent the long-sleeved robe and brought it to their father, saying, "We found this. Do you know if it's your son's robe or not?"
33 He recognized it and cried, "It's my son's robe! Some wild animal has torn Yosef in pieces and eaten him!"
34 Ya'akov tore his clothes and, putting sackcloth around his waist, mourned his son for many days.
35 Though all his sons and daughters tried to comfort him, he refused all consolation, saying, "No, I will go down to the grave, to my son, mourning." And his father wept for him.
36 In Egypt the Midyanim sold Yosef to Potifar, one of Pharaoh's officials, a captain of the guard.