Place the chicken breast-side up in a 9-by-13-inch pan. Season inside and out with 2 1/2 teaspoons salt and the Baharat. Refrigerate, uncovered, for at least 1 hour and up to overnight; this will help the skin get crispy!
Preheat the oven to 450 degrees F.
Stuff the cavity of the chicken with the onion, 4 sprigs of thyme and 2 sprigs of rosemary. Scatter the apples and remaining sprigs of thyme and rosemary around the chicken, sprinkle with the sugar and a pinch of salt and drizzle with the olive oil. Roast the chicken until the juices run clear and the internal temperature reaches 160 degrees F, about 1 hour. Let the chicken sit for 10 minutes.
Discard the herb sprigs. Add a splash of vinegar to the apples and toss to coat. Carve the chicken and serve with the apples on the side.
In a dry skillet over medium heat, toast the coriander seeds, black pepper seeds, cumin seeds, cloves and cardamom seeds, stirring often, until fragrant, 3 to 5 minutes. Transfer to a spice grinder and blend. Stir in the paprika, cinnamon and nutmeg.