This article investigates the factors affecting the energy consumption of battery electric vehicles and proposes models to estimate and predict this consumption on last-mile delivery routes. First, a physical model based on GPS observations is developed to estimate energy expenditure, considering driving data (speed, acceleration, and braking), topography (road grade), transported weight, vehicle component efficiency, regenerative braking systems and use of auxiliary systems. Then, various independent variables are collected, and together with the physical model used, a hybrid approach with machine learning (ML) models is proposed to predict the energy consumption of BEVs on urban routes. A comparative analysis of the performance of different ML models is conducted. In the end, the chosen model allows for predicting energy consumption on the route based on a point-to-point energy estimation and other independent variables, providing a more reliable and accurate reference for consumption than linear parameters (kWh/km) commonly used by logistics operators.