decomposers and detritivores. In one of the figures in my textbook the decomposers were put on the same level as the primary consumer. Detritivores are a type of decomposer.
I assume as the decomposers consume the dead organic matter of all organisms on any energy level in the ecosystem, they would not have a specific place in the energy pyramid. They could essentially appear on any level except the first as they are heterotrophs, unless the specific decomposer also happens to be photosynthetic or thermosynthetic.
Decomposers are organisms that obtain their organic nutrients from the dead organic matter in the ecosystem. Detritivores are heterotrophs that obtain their nutrients from detritus by internal digestion. While another type of decomposers are saprotrophs which digest the dead organic matter externally through excretion of enzymes which breaks down the matter.
Reference Allott, Andrew, and David Mindorff. Biology: Oxford IB Diploma Programme. Oxford: Oxford UP, 2014. Print.