We report on a new X-ray imaging method, which generalizes Bragg ptychography to 3D mapping of embedded crystalline volumes within thick specimens. The sample is probed by a pencil X-ray beam. The diffracted beam is magnified by an objective and passes through a slit in the image plane to be monitored by a 2D detector in the far-field of the image plane. The dimensions of the incoming beam and the slit opening define a confocal Bragg volume. Scanning the sample with respect to this probe volume, an iterative oversampling routine is used to reconstruct the shape and projected displacement field of extended internal volumes. This routine takes into account the pupil function and known aberrations of the lens. We demonstrate the method by a numerical study of a 3.5 µm grain comprising a wall of edge dislocations. With a probe volume of ∼0.12 µm3 and a compound refractive lens with a numerical aperture of 0.49×10−3 as the objective, the dislocations are fully resolved with a displacement sensitivity of ∼10 pm. The spatial resolution is 26×27×123 nm3 (rms), with the poor resolution along the optical axis being limited by the probe size. With a four times larger numerical aperture, the resolution becomes 16×8×123 nm3 (rms). The lens aberrations are found to be not critical.