improve the replenishment API