Document merge API