The three second delay did not work either, alas. However, we found a solution.
We’ve had to resort to using a polling/queueing system. We have a scheduled task that picks up deals to process every 5 minutes, and we keep track of the deal, contact, product and line_item that pass/fail. If one or more fails we flag it and then the item stays in the queue until it is processed again. Once all 4 object payloads are accepted, the record (an order in our database in this case) gets removed from the queue. We use the sync test endpoint to check each JSON payload after it it PUT to the server.
One potential bug in the API to be aware about. The sync test endpoint returns a “200 OK” when the payload has been accepted, but sometimes the hubspotId for the object is set to “null”. If it’s null then the item will still not be sync’d to Hubspot and the data will be missing. In my mind the API should return a 400 (error) status in both cases. That one tripped me up for a good few hours, but once I looked for both conditions (400 status OR null hubspotId) to detect a payload sync error, the process became reliable. We now have sequential orders back again in Hubspot. Sometimes the API will reject a payload 3 or 4 times, but most of the time it works with two attempts. Single success attempts for four object payloads are a rarity for us. Sometimes the null objectId will fix itself within a few minutes, but sometimes they never get fixed and the objectId remains unallocated.
Still no idea why this has all happened now, but my guess is that the API has either become very slow, or is now rate limiting more agressively (or both).
Hope this helps someone. It worked for us. Hubspot - make your API faster!