Subscriptions
Register the HTTPS endpoint that receives events, and read, retry and replay the deliveries.
On this page
List subscriptions
GET /reges/v1/subscriptions
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
limit | query | integer | Nooptional | Records per page, from 1 to 500. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of subscriptions. | SubscriptionPage |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/reges/v1/subscriptions?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/subscriptions?limit=20`, {
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"]}/reges/v1/subscriptions?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/subscriptions?limit=20');
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")}/reges/v1/subscriptions?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"id": "01cb2871-603f-4883-b2bb-66c4f298505f",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"url": "https://hr.brumar.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
],
"revision": 1
},
{
"id": "67cb6515-b044-4c10-ad96-2127561e7ee7",
"employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
"url": "https://hr.brumar-retail.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
],
"revision": 1
}
],
"nextCursor": null
} Create a subscription
POST /reges/v1/subscriptions
Registers the HTTPS endpoint of an employer that receives its events. Every delivery is signed with the secret of the subscription; the answer carries the secret once.
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
employerId | string (uuid) | Yesrequired | The employer whose events you want. |
url | string | Yesrequired | An HTTPS endpoint of yours. It has 10 seconds to answer a delivery with a 2xx status. |
eventTypes | string[] | Yesrequired | The event types you want. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result and secret, the signing secret of the subscription. It is returned in this answer only. | SecretOperationResult |
400 | The request cannot be read or breaks the contract: the JSON is malformed, a field is missing or unknown, or a type is wrong. fields names each one. | Error |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The employer does not exist in your account. | Error |
409 | The operationId was already used with a different request. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/reges/v1/subscriptions" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "82c9c24e-9055-4525-a9c4-b399841c6678",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"url": "https://hr.brumar.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/subscriptions`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "82c9c24e-9055-4525-a9c4-b399841c6678",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"url": "https://hr.brumar.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/subscriptions',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '82c9c24e-9055-4525-a9c4-b399841c6678',
'employerId': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
'url': 'https://hr.brumar.example/reges/events',
'eventTypes': [
'com.rdcopilot.reges.operation.submitted.v1',
'com.rdcopilot.reges.operation.registered.v1',
'com.rdcopilot.reges.operation.rejected.v1',
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "82c9c24e-9055-4525-a9c4-b399841c6678",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"url": "https://hr.brumar.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/subscriptions');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reges/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "82c9c24e-9055-4525-a9c4-b399841c6678",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"url": "https://hr.brumar.example/reges/events",
"eventTypes": [
"com.rdcopilot.reges.operation.submitted.v1",
"com.rdcopilot.reges.operation.registered.v1",
"com.rdcopilot.reges.operation.rejected.v1"
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "82c9c24e-9055-4525-a9c4-b399841c6678",
"status": "accepted",
"aggregateId": "01cb2871-603f-4883-b2bb-66c4f298505f",
"aggregateRevision": 1,
"secret": "whsec_XzqUQsvy8YdbmCI7sU1wJ518NC+J/8aC"
} Rotate the secret of a subscription
POST /reges/v1/subscriptions/{subscriptionId}/secret
Issues a new signing secret and returns it once. For 24 hours every delivery carries two signatures, one for each secret; after that only the new one.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
subscriptionId | path | string (uuid) | Yesrequired | The subscription. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result and secret, the signing secret of the subscription. It is returned in this answer only. | SecretOperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The subscription does not exist in your account. | Error |
409 | The operationId was already used with a different request. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/reges/v1/subscriptions/01cb2871-603f-4883-b2bb-66c4f298505f/secret" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a776dd32-63cf-4a38-8528-24b236cdde6b"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/subscriptions/01cb2871-603f-4883-b2bb-66c4f298505f/secret`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a776dd32-63cf-4a38-8528-24b236cdde6b"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/subscriptions/01cb2871-603f-4883-b2bb-66c4f298505f/secret',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a776dd32-63cf-4a38-8528-24b236cdde6b',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a776dd32-63cf-4a38-8528-24b236cdde6b"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/subscriptions/01cb2871-603f-4883-b2bb-66c4f298505f/secret');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reges/v1/subscriptions/01cb2871-603f-4883-b2bb-66c4f298505f/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a776dd32-63cf-4a38-8528-24b236cdde6b"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "a776dd32-63cf-4a38-8528-24b236cdde6b",
"status": "accepted",
"aggregateId": "01cb2871-603f-4883-b2bb-66c4f298505f",
"aggregateRevision": 2,
"secret": "whsec_k3Tn0Gm2VdWm9bQp1xYhF7sJ4LrZcA6e"
} Check an endpoint
POST /reges/v1/subscriptions/{subscriptionId}/check
Asks the gateway to call the endpoint of the subscription once more and record whether it answers. It is refused when the endpoint already answers.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
subscriptionId | path | string (uuid) | Yesrequired | The subscription. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The subscription does not exist in your account. | Error |
409 | operation_reused: The operationId was already used with a different request. endpoint_answering: The event endpoint already answers. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/reges/v1/subscriptions/67cb6515-b044-4c10-ad96-2127561e7ee7/check" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "8d810666-6653-46e0-82ac-a6d39fe83a6c"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/subscriptions/67cb6515-b044-4c10-ad96-2127561e7ee7/check`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "8d810666-6653-46e0-82ac-a6d39fe83a6c"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/subscriptions/67cb6515-b044-4c10-ad96-2127561e7ee7/check',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '8d810666-6653-46e0-82ac-a6d39fe83a6c',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "8d810666-6653-46e0-82ac-a6d39fe83a6c"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/subscriptions/67cb6515-b044-4c10-ad96-2127561e7ee7/check');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reges/v1/subscriptions/67cb6515-b044-4c10-ad96-2127561e7ee7/check");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "8d810666-6653-46e0-82ac-a6d39fe83a6c"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "8d810666-6653-46e0-82ac-a6d39fe83a6c",
"status": "accepted",
"aggregateId": "67cb6515-b044-4c10-ad96-2127561e7ee7",
"aggregateRevision": 2
} List deliveries
GET /reges/v1/deliveries
Returns the deliveries of an employer’s events with their attempts, newest first. state keeps only the deliveries in one state, for example the parked ones.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
employerId | query | string (uuid) | Yesrequired | The employer whose records you want. It is the id of an employer of your account. |
state | query | string | Nooptional | Only deliveries in this state. One of delivered, retrying, parked, replayed |
registerOperationId | query | string (uuid) | Nooptional | Only the deliveries about this register operation. |
limit | query | integer | Nooptional | Records per page, from 1 to 500. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of deliveries. | DeliveryPage |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The employer does not exist in your account. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/reges/v1/deliveries?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/deliveries?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20`, {
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"]}/reges/v1/deliveries?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deliveries?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20');
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")}/reges/v1/deliveries?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"id": "4ed4e313-635a-424a-aa93-a8aa4503224c",
"employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
"registerOperationId": "33ac882a-d64f-4ac2-9658-37361cf74da1",
"type": "com.rdcopilot.reges.operation.registered.v1",
"state": "retrying",
"attempts": [
{
"n": 1,
"http": 503,
"at": "2026-11-23T07:27:06Z"
}
],
"maxAttempts": 6,
"revision": 1
},
{
"id": "98678ed5-0138-44a9-8187-f6f07776bf8a",
"employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
"registerOperationId": "33ac882a-d64f-4ac2-9658-37361cf74da1",
"type": "com.rdcopilot.reges.operation.submitted.v1",
"state": "parked",
"attempts": [
{
"n": 1,
"http": 503,
"at": "2026-11-23T07:23:06Z"
},
{
"n": 2,
"http": 503,
"at": "2026-11-23T07:24:06Z"
},
{
"n": 3,
"http": 503,
"at": "2026-11-23T07:29:06Z"
},
{
"n": 4,
"http": 503,
"at": "2026-11-23T07:59:06Z"
},
{
"n": 5,
"http": 503,
"at": "2026-11-23T09:59:06Z"
},
{
"n": 6,
"http": 503,
"at": "2026-11-23T21:59:06Z"
}
],
"maxAttempts": 6,
"revision": 6
}
],
"nextCursor": null
} Retry a delivery
POST /reges/v1/deliveries/{deliveryId}/retry
Makes the next attempt of a delivery whose state is retrying now. After the last attempt fails the delivery is parked.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
deliveryId | path | string (uuid) | Yesrequired | The delivery. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The delivery does not exist in your account. | Error |
409 | operation_reused: The operationId was already used with a different request. nothing_to_retry: The delivery is not waiting for a retry. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/reges/v1/deliveries/4ed4e313-635a-424a-aa93-a8aa4503224c/retry" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "78bc44ec-815d-4dba-9543-853a8a9b0be4"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/deliveries/4ed4e313-635a-424a-aa93-a8aa4503224c/retry`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "78bc44ec-815d-4dba-9543-853a8a9b0be4"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/deliveries/4ed4e313-635a-424a-aa93-a8aa4503224c/retry',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '78bc44ec-815d-4dba-9543-853a8a9b0be4',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "78bc44ec-815d-4dba-9543-853a8a9b0be4"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deliveries/4ed4e313-635a-424a-aa93-a8aa4503224c/retry');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reges/v1/deliveries/4ed4e313-635a-424a-aa93-a8aa4503224c/retry");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "78bc44ec-815d-4dba-9543-853a8a9b0be4"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "78bc44ec-815d-4dba-9543-853a8a9b0be4",
"status": "accepted",
"aggregateId": "4ed4e313-635a-424a-aa93-a8aa4503224c",
"aggregateRevision": 2
} Replay an event
POST /reges/v1/deliveries/{deliveryId}/replay
Sends a parked event again to the endpoint of the employer. It is refused while the endpoint does not answer and when the delivery is not parked.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
deliveryId | path | string (uuid) | Yesrequired | The delivery of the parked event. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this employer or operation. | Error |
404 | The delivery does not exist in your account. | Error |
409 | operation_reused: The operationId was already used with a different request. nothing_parked: The delivery is not parked. endpoint_not_answering: The event endpoint still does not answer. The event stays parked. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | The gateway cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/reges/v1/deliveries/98678ed5-0138-44a9-8187-f6f07776bf8a/replay" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "4afe7c2e-511e-4b07-8efd-587bc3fa68b1"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/deliveries/98678ed5-0138-44a9-8187-f6f07776bf8a/replay`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "4afe7c2e-511e-4b07-8efd-587bc3fa68b1"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/deliveries/98678ed5-0138-44a9-8187-f6f07776bf8a/replay',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '4afe7c2e-511e-4b07-8efd-587bc3fa68b1',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "4afe7c2e-511e-4b07-8efd-587bc3fa68b1"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deliveries/98678ed5-0138-44a9-8187-f6f07776bf8a/replay');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reges/v1/deliveries/98678ed5-0138-44a9-8187-f6f07776bf8a/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "4afe7c2e-511e-4b07-8efd-587bc3fa68b1"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "4afe7c2e-511e-4b07-8efd-587bc3fa68b1",
"status": "accepted",
"aggregateId": "98678ed5-0138-44a9-8187-f6f07776bf8a",
"aggregateRevision": 7
}