Using a food processor, finely grind almonds with the flour.
Combine almond mixture with spices, baking powder, and salt in a bowl and set aside.
Combine butter and sugar in bowl of stand mixer and beat on medium speed for several minutes until light and fluffy.
Add egg and beat until combined.
Add almond mixture and beat on low speed until the dough just comes together into a ball.Turn out dough onto a clean surface and form into a flat rectangle about 1 inch thick. Wrap in plastic and refrigerate at least 2 hours until firm.Preheat oven to 350 degrees F. Line several cookie sheets with parchment paper or silicone baking mats.
Roll dough to about 1/16 inch on lightly floured surface.
Cut out shapes with a 2-inch wide cookie cutter. Use a small cookie cutter to make cutouts in half of the cookies, so when you make sandwiches the filling will show through. Arrange cookies on cookie sheets about 1 inch apart.Chill cookies on the sheets for about 15 minutes before baking (This will prevent them from spreading).
Bake for 12 to 14 minutes, until cookies turn golden brown and smell like toasting nuts, rotating sheets halfway through. Cool sheets on wire racks.Wait until cookies are completely cool before assembling them. Stir the jam to soften it, and spread over half the cookies. Sift the confectioners' sugar over the rest of the cookies and place them on top of the jam covered halves.