fix update api url, add doc and upsert params and update test