Subscriptions
Register the HTTPS endpoint that receives events, and read, retry and replay the deliveries.
On this page
List subscriptions
GET /efactura/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 company 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/efactura/v1/subscriptions?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/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"]}/efactura/v1/subscriptions?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/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")}/efactura/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": "f5838f87-e4c0-42cb-a6b0-c64c2c2f089b",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"url": "https://erp.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
],
"revision": 1
},
{
"id": "962778da-1b17-4dbf-baf7-230639fb4c70",
"companyId": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
"url": "https://pos.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
],
"revision": 1
}
],
"nextCursor": null
} Create a subscription
POST /efactura/v1/subscriptions
Registers the HTTPS endpoint of a company 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. |
companyId | string (uuid) | Yesrequired | The company 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 and says what is wrong with it. | Error |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The company 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/efactura/v1/subscriptions" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "3c052960-8afe-4235-b3f7-28b48ab04ea4",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"url": "https://erp.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/subscriptions`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "3c052960-8afe-4235-b3f7-28b48ab04ea4",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"url": "https://erp.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/subscriptions',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '3c052960-8afe-4235-b3f7-28b48ab04ea4',
'companyId': 'c6a26b8c-3323-4e7a-8611-f5a92f5e1a42',
'url': 'https://erp.brumar.example/efactura/events',
'eventTypes': [
'com.rdcopilot.efactura.invoice.submitted.v1',
'com.rdcopilot.efactura.invoice.accepted.v1',
'com.rdcopilot.efactura.invoice.rejected.v1',
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "3c052960-8afe-4235-b3f7-28b48ab04ea4",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"url": "https://erp.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/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")}/efactura/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "3c052960-8afe-4235-b3f7-28b48ab04ea4",
"companyId": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"url": "https://erp.brumar.example/efactura/events",
"eventTypes": [
"com.rdcopilot.efactura.invoice.submitted.v1",
"com.rdcopilot.efactura.invoice.accepted.v1",
"com.rdcopilot.efactura.invoice.rejected.v1"
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "3c052960-8afe-4235-b3f7-28b48ab04ea4",
"status": "accepted",
"aggregateId": "f5838f87-e4c0-42cb-a6b0-c64c2c2f089b",
"aggregateRevision": 1,
"secret": "whsec_XzqUQsvy8YdbmCI7sU1wJ518NC+J/8aC"
} Rotate the secret of a subscription
POST /efactura/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 company 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/efactura/v1/subscriptions/f5838f87-e4c0-42cb-a6b0-c64c2c2f089b/secret" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/subscriptions/f5838f87-e4c0-42cb-a6b0-c64c2c2f089b/secret`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/subscriptions/f5838f87-e4c0-42cb-a6b0-c64c2c2f089b/secret',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/subscriptions/f5838f87-e4c0-42cb-a6b0-c64c2c2f089b/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")}/efactura/v1/subscriptions/f5838f87-e4c0-42cb-a6b0-c64c2c2f089b/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "5b4ac4b9-2004-4a4a-b8f0-4ed38c08f2ee",
"status": "accepted",
"aggregateId": "f5838f87-e4c0-42cb-a6b0-c64c2c2f089b",
"aggregateRevision": 2,
"secret": "whsec_k3Tn0Gm2VdWm9bQp1xYhF7sJ4LrZcA6e"
} Check an endpoint
POST /efactura/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 company 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/efactura/v1/subscriptions/962778da-1b17-4dbf-baf7-230639fb4c70/check" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "e718d181-884d-40bb-aac5-1b924557fd57"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/subscriptions/962778da-1b17-4dbf-baf7-230639fb4c70/check`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "e718d181-884d-40bb-aac5-1b924557fd57"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/subscriptions/962778da-1b17-4dbf-baf7-230639fb4c70/check',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'e718d181-884d-40bb-aac5-1b924557fd57',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "e718d181-884d-40bb-aac5-1b924557fd57"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/subscriptions/962778da-1b17-4dbf-baf7-230639fb4c70/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")}/efactura/v1/subscriptions/962778da-1b17-4dbf-baf7-230639fb4c70/check");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "e718d181-884d-40bb-aac5-1b924557fd57"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "e718d181-884d-40bb-aac5-1b924557fd57",
"status": "accepted",
"aggregateId": "962778da-1b17-4dbf-baf7-230639fb4c70",
"aggregateRevision": 2
} List deliveries
GET /efactura/v1/deliveries
Returns the deliveries of a company’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 |
|---|---|---|---|---|
companyId | query | string (uuid) | Yesrequired | The company whose records you want. It is the id of a company of your account. |
state | query | string | Nooptional | Only deliveries in this state. One of delivered, retrying, parked, replayed |
invoiceId | query | string (uuid) | Nooptional | Only the deliveries about this invoice. |
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 company or operation. | Error |
404 | The company 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/efactura/v1/deliveries?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/deliveries?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&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"]}/efactura/v1/deliveries?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/deliveries?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&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")}/efactura/v1/deliveries?companyId=c6a26b8c-3323-4e7a-8611-f5a92f5e1a42&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": "22f9e93c-15cc-4c9d-a648-bdd68f6057ae",
"companyId": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
"invoiceId": "e751e57b-5737-453f-87a3-48b322a92ef7",
"type": "com.rdcopilot.efactura.invoice.submitted.v1",
"state": "retrying",
"attempts": [
{
"n": 1,
"http": 503,
"at": "2026-11-20T16:29:00Z"
},
{
"n": 2,
"http": 503,
"at": "2026-11-20T16:30:00Z"
}
],
"maxAttempts": 6,
"revision": 2
},
{
"id": "31e21401-7262-4047-a7b1-d028f8be15d8",
"companyId": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
"invoiceId": "b6650acf-699e-4a08-be47-974bc55d0813",
"type": "com.rdcopilot.efactura.invoice.accepted.v1",
"state": "parked",
"attempts": [
{
"n": 1,
"http": 503,
"at": "2026-11-19T09:37:00Z"
},
{
"n": 2,
"http": 503,
"at": "2026-11-19T09:38:00Z"
},
{
"n": 3,
"http": 503,
"at": "2026-11-19T09:43:00Z"
},
{
"n": 4,
"http": 503,
"at": "2026-11-19T10:13:00Z"
},
{
"n": 5,
"http": 503,
"at": "2026-11-19T12:13:00Z"
},
{
"n": 6,
"http": 503,
"at": "2026-11-20T00:13:00Z"
}
],
"maxAttempts": 6,
"revision": 6
}
],
"nextCursor": null
} Retry a delivery
POST /efactura/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 company 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/efactura/v1/deliveries/22f9e93c-15cc-4c9d-a648-bdd68f6057ae/retry" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "6c0a40fa-15eb-4e54-9e20-9767de63a7b9"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/deliveries/22f9e93c-15cc-4c9d-a648-bdd68f6057ae/retry`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "6c0a40fa-15eb-4e54-9e20-9767de63a7b9"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/deliveries/22f9e93c-15cc-4c9d-a648-bdd68f6057ae/retry',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '6c0a40fa-15eb-4e54-9e20-9767de63a7b9',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "6c0a40fa-15eb-4e54-9e20-9767de63a7b9"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/deliveries/22f9e93c-15cc-4c9d-a648-bdd68f6057ae/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")}/efactura/v1/deliveries/22f9e93c-15cc-4c9d-a648-bdd68f6057ae/retry");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "6c0a40fa-15eb-4e54-9e20-9767de63a7b9"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "6c0a40fa-15eb-4e54-9e20-9767de63a7b9",
"status": "accepted",
"aggregateId": "22f9e93c-15cc-4c9d-a648-bdd68f6057ae",
"aggregateRevision": 3
} Replay an event
POST /efactura/v1/deliveries/{deliveryId}/replay
Sends a parked event again to the endpoint of the company. 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 company 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/efactura/v1/deliveries/31e21401-7262-4047-a7b1-d028f8be15d8/replay" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a83b7fa0-8cda-49b7-9cff-2fa06550b1ed"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/deliveries/31e21401-7262-4047-a7b1-d028f8be15d8/replay`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a83b7fa0-8cda-49b7-9cff-2fa06550b1ed"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/efactura/v1/deliveries/31e21401-7262-4047-a7b1-d028f8be15d8/replay',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a83b7fa0-8cda-49b7-9cff-2fa06550b1ed',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a83b7fa0-8cda-49b7-9cff-2fa06550b1ed"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/deliveries/31e21401-7262-4047-a7b1-d028f8be15d8/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")}/efactura/v1/deliveries/31e21401-7262-4047-a7b1-d028f8be15d8/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a83b7fa0-8cda-49b7-9cff-2fa06550b1ed"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "a83b7fa0-8cda-49b7-9cff-2fa06550b1ed",
"status": "accepted",
"aggregateId": "31e21401-7262-4047-a7b1-d028f8be15d8",
"aggregateRevision": 7
}