Idempotency
Keep one operation identifier for one intended change.
On this page
Request identity
Generate a UUID before sending a state-changing request and retain it with the exact payload. If the transport times out, resend that request with the same operationId. A new identifier represents a new intention, not a delivery retry.
curl
curl "$RDC_BASE_URL/integrations/v1/operations/33a22ec0-f0af-4498-a388-123456789abc" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/operations/33a22ec0-f0af-4498-a388-123456789abc`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/integrations/v1/operations/33a22ec0-f0af-4498-a388-123456789abc',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/operations/33a22ec0-f0af-4498-a388-123456789abc');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/operations/33a22ec0-f0af-4498-a388-123456789abc");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "33a22ec0-f0af-4498-a388-123456789abc",
"status": "completed",
"aggregateRevision": 1,
"aggregateId": "run-b73a02"
} Destination identity
A retry of a call may reach a destination that processed the earlier attempt before its response was lost. Map the stable order number into the destination request and use the destination’s duplicate protection. A timeout alone does not prove the order was not created.
For revision conflicts and repeated operation receipts, read Idempotency and concurrency.