Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My company (among other things) routes print-on-demand orders to various print companies. Some of their APIs have mechanisms to ensure idempotency, some don't. The last time I pressed the issue, I was asked - and I quote - "Can't you just send the order only once?"

The thing is, having a print company that gets the printing part right is more important than having one that gets the API right. I use them anyway, and accept the risk that there will very occasionally be duplicate orders. At least in my business, it's just tshirts.

A few months ago I bought a fairly expensive cordless vacuum from hoover.com. I was charged once, but two of them arrived. I suspect I know why.



I have these sorts of facepalmable discussions from time to time. The last time was with a company that provides an invoicing service through an API. They are (and I am not shitting you) unable to ensure unique invoice numbers and told me to "just don't try to open and issue more than one invoice at any time".


> The last time I pressed the issue, I was asked - and I quote - "Can't you just send the order only once?"

What did they suggest you should do if you sent the order once and it didn't arrive?


Next time you fly, ask the person processing the check in how frequently the following happens: Somebody arrives with a ticket reservation confirmed, money charged to credit card, but no actual Eticket at Sabre can be found that will allow them to fly.

It's something I have been tracking over the years, rare but happens. Again some non transactional, non idempotent integrations setup out there...


I suspect they also don't have an API to check the orders you sent?


That would make it too easy! Most just offer get-by-id (their ID, of course). Some don't even offer that; they just post a webhook on shipment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: