Support for Idempotency Key?

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
johntrickett
Posts: 12
Joined: Sat Sep 28, 2024 11:31 am

Support for Idempotency Key?

Post by johntrickett » Mon Oct 07, 2024 10:18 am

Does the Simpro API currently have Idempotency Key support? For example, Stripe has this: https://docs.stripe.com/api/idempotent_requests
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Support for Idempotency Key?

Post by SimproAPITeam » Fri Oct 11, 2024 1:16 am

Hi johntricket,
If I understand correctly you are asking what happens if there is an error or timeout.

If you are creating or updating anything and something is not successful we will return an error, informing of what went wrong or what might be missing in the request.

If successful we will return the ID of new items created, and a 201 Success response. If you get a success response from us and then run the same operation again you will create another item or update the same data again.

Regards
Simpro API Team | Simpro Software Group
johntrickett
Posts: 12
Joined: Sat Sep 28, 2024 11:31 am

Re: Support for Idempotency Key?

Post by johntrickett » Fri Oct 18, 2024 11:28 am

Hi!

No this is for safely retrying requests without accidentally performing the same operation twice. When creating or updating an object, some APIs use an idempotency key. Then, if a connection error occurs, you can safely repeat the request without risk of creating a second object or performing the update twice.

Obviously this isn't an issue for GET requests, or DELETE requests (as you can only delete something once anyway!). It is useful however for POST requests and can avoid creating duplicate records.
Post Reply