Automatic Combined Sales
Important: Failing to account for automatic combined sales in your application can cause serious issues.
On Hip eCommerce, a Sale (Order) is created when an auction is won or an offer is accepted. If the buyer wins additional auctions or offers before paying, these will automatically combine with the original unpaid Sale (Order), creating a new one. The old Sale (Order) is essentially deleted, and its SaleListings are moved to the new combined Sale (Order). The combined_sales_ids field tracks the original Sale (Order) ids, which should be deleted in your system when you encounter a new combined Sale (Order).
Option 1: Delete the old Sale (Orders) in your system if they are listed in the combined_sales_ids of a new Sale (Order).
Option 2: Only import paid Sale (Orders) using the findAllStoresSalesPaid method. Since paid Sale (Orders) can't be combined with unpaid ones, you won't need to handle combined sales. However, the caveat is that listings may not be immediately removed from your application when sold on Hip eCommerce. You can mitigate this by using the findAllStoresListingsClosed method with the "sold" parameter to remove sold listings from your internal systems pending the Sale (Order) payment.