Duplicate POST
I'm updating the sharpy client to include promotions (coupon
codes).
https://github.com/SeanOC/sharpy
(original)
https://github.com/SmartFile/sharpy
(updates)
Occasionally, I get a 400 error about duplicate posts:
<?xml version="1.0" encoding="UTF-8"?>
<error id="24999971" code="400" auxCode="duplicate">Duplicate POST detected (1 seconds)</error>
These are definitely duplicate posts. The tests are posting the
same data when creating customers.
What are the rules around duplicate posts?
What is the time limit between posts that is acceptable?
One knowledge base article mentioned 20 minutes (http://support.cheddargetter.com/discussions/problems/183-duplicate...).
Another said the limit was 10 seconds (http://support.cheddargetter.com/discussions/questions/4948-duplica...).
Is changing one field all that is necessary to work around this?
There is no information about the duplicate limit in the API
documentation.
http://support.cheddargetter.com/kb/api-8/error-handling
https://cheddargetter.com/developers
Ryan Johnston
SmartFile
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 25 Aug, 2015 07:16 PM
Hi Ryan --
These endpoints are checked for duplicates:
customers/new
customers/edit
customers/edit-subscription
customers/add-charge
invoices/new
The duplicate window is 10 seconds.
Yes. If any request param is different, it is not considered a duplicate. You could even send in an otherwise superfluous param with a random value if you want to workaround the duplicate check.
Thanks for pointing this out. I went ahead and added a section here: http://support.cheddargetter.com/kb/api-8/error-handling#duplicate
2 Posted by Ryan Johnston on 25 Aug, 2015 07:25 PM
Thanks.
I like the random superfluous parameter for the unit tests.
Ryan Johnston closed this discussion on 25 Aug, 2015 07:25 PM.