code: def add_route(route, endpoint=None, **kw):
      
  
      # ensure correct amout of slashes
      def apiurl(route):
          return '/'.join(s.strip('/') for s in ["", BASE_URL, route])
  
      return add_senaite_route(apiurl(route), endpoint, **kw)
docs: Add a new JSON API route