finish API of order