Idempotency – Correlation ID Header
You are supposed to use X-Correlation-Id
in all API requests. Where X-Request-Id
should be unique per request, X-Correlation-Id
should be unique per intent. Intent, in this case, means the data in the request and the attempted action.
The following list provides certain important aspects of the Correlation ID header:
- Upon receiving some response from Adobe, whether it is successful or not, the intent has been satisfied and the Correlation ID must not be used again.
- However, if no response is received from Adobe in the case of a timeout, the same Correlation ID could be used again for the retry call with the same intent.
- If a response was generated by Adobe for a given correlation ID, any subsequent requests to the same API with the same Correlation ID will receive the same response received earlier.
- If a call fails with a 400 Bad Request error and you try again after fixing the data, the new call must have a new Correlation ID because it uses a different intent.
- If the Correlation ID header is not included, a 400 error with status code 4119 – Correlation ID is Invalid or Missing will be returned. Read more about Status Codes.
Duplicate Request IDs
- If the Correlation ID is duplicate, the Request ID is not evaluated and the original response for that intent will be returned.
- If the Correlation ID is different and Request ID is a duplicate, then a 400 error with status code 4120 – Duplicate request id, same requestId has already been processed, will be returned.