Regrouping API calls for a same customer file

Learn how to group your calls according to a same Correlation-ID

Let's say you have a subscription process with a certain amount of documents to analyze for each subscriber.

In order to regroup the API calls in our logs for invoicing or for reviewing in the back office you will need to set a Correlation-ID in your request's headers.

The Correlation-ID is a unique identifier that will allow you to track an execution flow across different endpoints and components of our service.

Here's how to implement it in two steps:

  1. Generate the Correlation-ID
  • Option 1: For each new file, generate a UUID v4 (Example: 550e8400-e29b-41d4-a716-44665544000)
  • Option 2: You can also use an anonymous unique identifier linked to the file or client (Example: client ID or database file).
  1. Propagation to requests sent to Datakeen
  • Add the Correlation-ID to the HTTP headers: X-Correlation-ID: {correlationId}
  • Use this same Correlation-ID across all HTTP requests linked to the same file