Idempotent requests
The NuflowAPI supports idempotent requests to help prevent you from accidentally issuing the same API call twice. This feature can be helpful if you are instructing us to move money, create an account or entity, or make changes to an existing resource. For example, if you are creating a Payment Order and the request fails due to a network issue, you can retry the request with the same idempotency key to guarantee the payment order was only created once.
- All POST requests accept idempotency keys.
- GET, PATCH, and DELETE are idempotent by definition. Any idempotency key sent for these types of requests will be ignored and not be saved.
Idempotency-Key: <your-unique-key>
To use this, you will include a header as a part of your request. The key should be something unique, preferably something like an internal database UUID.
When a successful request is made with an idempotency key, we will save the result of that request for 24 hours. If you issue a new request within 24 hours using the same credentials and idempotency key, we will echo the original response (status code and body) back to you.
- Results are only saved if the request successfully executed.
- If there was a connection interruption or another error that prevented us from completing the original request, we will execute the following request and cache its results.