Change Visitor Id

So Piwik is smart enough as when UserId is set, it will automatically change all of the actions and visitorId of the visit in the given window to have the new UserId hashed visitorId.

Is there anyway to do this manuall via the http tracking api?

please help.