Idempotency
The Solid Platform supports idempotency.
The Solid Platform supports idempotency to help prevent you from accidentally calling the same API call twice.
An idempotency key uniquely identifies each API request. You need to pass the idempotency key in the header (sd-idempotency-key) so that the Solid platform can identify the API request. This key should be unique, preferably an internal UUID that you store on your database.
Idempotent requests are optional, as in, you can make API calls without an idempotency key. All Solid API POST (Create calls) and PATCH (Update calls) support idempotency. An idempotency key sent for any other types of requests (GET, DELETE, etc.) will be ignored and not be saved.
Idempotency can be helpful if you are instructing us to move money, create a person or a business, or create a card.
Please note:
- All API responses are cached with the idempotency key (if sent in header) irrespective of status code, and reuse of the same key will return the cached response (only exception here is rate limit error)
- When the program gets 409 status code: EC_QLDB_OCC_ERROR_RETRY” and sysMessage”: “qldb occ error please retry”, try with a new idempotency key
- Solid platform will respond with the original response object if you issue a new request with the same idempotency key
- In case of 429 ratelimit error, you can reuse the idempotency key. For other error codes, reusing the idempotency key will get the response of previous request
- Idempotency keys expire after 24 hours