The parents of a four-year-old Adelaide boy have been jailed for eight years after locking him in his bedroom for 12 days and feeding him only yoghurt and jelly which they slid under the door.

The District Court heard the boy was just days away from death when he was discovered by chance in October last year, after his mother called police about domestic violence.

The boy's 24-year-old mother and 28-year-old father, who cannot be identified due to a suppression order, were on an alcohol and cannabis "bender" at the time and pleaded guilty to an aggravated charge of endangering the boy's life.

They used a series of cords and straps to tie the door to an adjoining door and occasionally slid yoghurt, custard or jelly under the door, but no water.

During sentencing submissions the court heard a police officer found the boy locked in his bedroom, naked, shivering and surrounded by rubbish and faeces.

In sentencing today Judge Paul Cuthbertson said it was likely the child would bear the emotional scars of their parenting for the rest of his life.

"Most of the animal kingdom do a better job of looking after their offspring than you two did for your child," he said.

"It is against the order of nature to treat any human being or any animal, let alone your own flesh and blood, in the manner that you treated [the boy].

"I do not know what damage of an emotional nature or indeed of a physical nature that [the boy] will carry with him for the rest of his life.

"It is highly likely that he will bear the emotional scars of your parenting."

Judge Cuthberston said even though the parents received money from the community, they did not spend it on looking after their little boy.

"Even though you received money from the community to look after yourselves and your child you thought more of your own individual pleasures and preoccupations and you abandoned your most sacred duties as mother and father," Judge Cuthbertson said.

"Your conduct to your child was a disgrace as you cheated on the public purse by pretending to live at different locations to get more money.

"You lead a life of debauchery."

Judge Cuthbertson set a non-parole period of six years.