code: def getbranchesurl(idbranch, *args, **kwargs):
      
      getparams = []
      if kwargs:
          try:
              if kwargs["fullDetails"] == True:
                  getparams.append("fullDetails=true")
              else:
                  getparams.append("fullDetails=false")
          except Exception as ex:
              pass
          try:
              getparams.append("offset=%s" % kwargs["offset"])
          except Exception as ex:
              pass
          try:
              getparams.append("limit=%s" % kwargs["limit"])
          except Exception as ex:
              pass
  
      branchidparam = "" if idbranch == "" else "/"+idbranch
      url = getmambuurl(*args, **kwargs) + "branches" + branchidparam + ("" if len(getparams) == 0 else "?" + "&".join(getparams) )
      return url
docs: Request Branches URL.
  
      If idbranch is set, you'll get a response adequate for a MambuBranch object.
      If not set, you'll get a response adequate for a MambuBranches object.
      See mambubranch module and pydoc for further information.
  
      Currently implemented filter parameters:
      * fullDetails
      * limit
      * offset
  
      See Mambu official developer documentation for further details, and
      info on parameters that may be implemented here in the future.