Genesis 37:23-36 ESV
So when Joseph came to his brothers, they stripped him of his robe, the robe of many colors that he wore. And they took him and threw him into a pit. The pit was empty; there was no water in it.
Then they sat down to eat. And looking up they saw a caravan of Ishmaelites coming from Gilead, with their camels bearing gum, balm, and myrrh, on their way to carry it down to Egypt. Then Judah said to his brothers, “What profit is it if we kill our brother and conceal his blood? Come, let us sell him to the Ishmaelites, and let not our hand be upon him, for he is our brother, our own flesh.” And his brothers listened to him. Then Midianite traders passed by. And they drew Joseph up and lifted him out of the pit, and sold him to the Ishmaelites for twenty shekels of silver. They took Joseph to Egypt.
When Reuben returned to the pit and saw that Joseph was not in the pit, he tore his clothes and returned to his brothers and said, “The boy is gone, and I, where shall I go?” Then they took Joseph’s robe and slaughtered a goat and dipped the robe in the blood. And they sent the robe of many colors and brought it to their father and said, “This we have found; please identify whether it is your son’s robe or not.” And he identified it and said, “It is my son’s robe. A fierce animal has devoured him. Joseph is without doubt torn to pieces.” Then Jacob tore his garments and put sackcloth on his loins and mourned for his son many days. All his sons and all his daughters rose up to comfort him, but he refused to be comforted and said, “No, I shall go down to Sheol to my son, mourning.” Thus his father wept for him. Meanwhile the Midianites had sold him in Egypt to Potiphar, an officer of Pharaoh, the captain of the guard.
ESV: English Standard Version 2016