document cancel api