we're using draft orders to calculate order cost, amongst other things. The docs mention that some draft orders may need polling to get the correct price:
When you create and update draft orders some calculations are done asynchronously, such as calculating shipping and taxes. There might be times when a draft order is created but these calculations haven't completed. In these cases, you need to poll the draft order until the calculations are finished.
We have never come across any draft orders that actually require polling. Can someone provide more information on the circumstances under which polling is necessary? Have others implemented polling or are you just using the draft order that comes back from the API?
Thanks in advance,
As mentioned already, a 202 is only returned if shipping+tax calculations need extra time. This usually happens if a shop uses an external service for tax or shipping, or in rare cases when the Shopify platform is under heavy load. In most cases however, you can expect a 200 response.
If you want to test this, try loading up a draft order with multiple unique SKUs to increase the number of calculations that need to happen.