Standard analytical construction of the many-body wave function of interacting particles in one dimension, beyond mean-field theory, is based on the Jastrow approach. The many-body interacting ground state is build up from the ground state of the non-interacting system and the product of solutions of the corresponding interacting two-body problem. However, this is possible only if the center-of-mass motion is decoupled from the mutual interactions. In our work, based on the general constraints given by contact nature of the atom-atom interactions, we present an alternative approach to the standard construction of the pair-correlation wave function. Within the proposed ansatz, we study the many-body properties of trapped bosons as well as fermionic mixtures and we compare these predictions with the exact diagonalization approach in a wide range of particle numbers, interaction strengths, and different trapping potentials.