diff --git a/duniterpy/api/endpoint.py b/duniterpy/api/endpoint.py
index 72c385cb683f1cd9a1b1625d6b7ec9d44d097428..135172fc1e7e4a9ae0829bcb69234caaa3a84a4f 100644
--- a/duniterpy/api/endpoint.py
+++ b/duniterpy/api/endpoint.py
@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import re
 from typing import Any, Optional, TypeVar, Type, Dict
 
-import duniterpy.constants as constants
+from duniterpy import constants
 from ..documents import MalformedDocumentError
 
 
diff --git a/tests/api/test_endpoints.py b/tests/api/test_endpoints.py
index 86fdad52f90232ab5e373821ebc16211d8b34f67..09680167bc6aded9222b659caed850ed12bac1e4 100644
--- a/tests/api/test_endpoints.py
+++ b/tests/api/test_endpoints.py
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import unittest
 
-import duniterpy.api.endpoint as endpoint
+from duniterpy.api import endpoint
 
 
 class TestEndpoint(unittest.TestCase):