This can be done with one DPDT impulse (latching) relay. Both limit switches are wired on parallel, in series with the relay coil, battery, and GND. The relay contacts are wired in a standard DC reversing arrangement. When either switch is touched, the relay changes state and the motor reverses.
I don't see a way to attach a PDF datasheet. Here is a link to details at Digi-Key: https://www.digikey.com/product-detail/en/te-connectivity-potter-brumfield-relays/S89R11DAC1-12/PB513-ND/365946
ak