---
title: "Subscriptions | Docs | e-Transport Gateway by R&D Copilot"
description: "Register the HTTPS endpoint that receives events, read the deliveries and replay a parked event."
canonical: "https://etransport.rdcopilot.com/docs/api-reference/subscriptions/"
language: en
updated: 2026-11-22
---

# Subscriptions

Register the HTTPS endpoint that receives events, read the deliveries and replay a parked event.

## List subscriptions

GET `/etransport/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

```bash
curl "$RDC_BASE_URL/etransport/v1/subscriptions?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/subscriptions?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/etransport/v1/subscriptions?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/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`

JSON

```json
{
  "items": [
    {
      "id": "966258ea-fb01-4efb-9cbc-c9cfea179a65",
      "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
      "url": "https://erp.brumar.example/etransport/events",
      "eventTypes": [
        "com.rdcopilot.etransport.declaration.submitted.v1",
        "com.rdcopilot.etransport.declaration.accepted.v1",
        "com.rdcopilot.etransport.declaration.rejected.v1",
        "com.rdcopilot.etransport.declaration.corrected.v1",
        "com.rdcopilot.etransport.declaration.vehicle_changed.v1",
        "com.rdcopilot.etransport.declaration.deleted.v1",
        "com.rdcopilot.etransport.declaration.confirmed.v1",
        "com.rdcopilot.etransport.declaration.correction_rejected.v1",
        "com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1",
        "com.rdcopilot.etransport.declaration.deletion_rejected.v1",
        "com.rdcopilot.etransport.declaration.confirmation_rejected.v1"
      ],
      "revision": 1
    }
  ],
  "nextCursor": null
}
```

## Create a subscription

POST `/etransport/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. |
| `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 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

```bash
curl -X POST "$RDC_BASE_URL/etransport/v1/subscriptions" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "e72aca15-7e48-42a5-8ba9-d6778c0b8c2d",
  "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
  "url": "https://erp.brumar.example/etransport/events",
  "eventTypes": [
    "com.rdcopilot.etransport.declaration.submitted.v1",
    "com.rdcopilot.etransport.declaration.accepted.v1",
    "com.rdcopilot.etransport.declaration.rejected.v1",
    "com.rdcopilot.etransport.declaration.corrected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_changed.v1",
    "com.rdcopilot.etransport.declaration.deleted.v1",
    "com.rdcopilot.etransport.declaration.confirmed.v1",
    "com.rdcopilot.etransport.declaration.correction_rejected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1",
    "com.rdcopilot.etransport.declaration.deletion_rejected.v1",
    "com.rdcopilot.etransport.declaration.confirmation_rejected.v1"
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/subscriptions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "e72aca15-7e48-42a5-8ba9-d6778c0b8c2d",
    "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
    "url": "https://erp.brumar.example/etransport/events",
    "eventTypes": [
      "com.rdcopilot.etransport.declaration.submitted.v1",
      "com.rdcopilot.etransport.declaration.accepted.v1",
      "com.rdcopilot.etransport.declaration.rejected.v1",
      "com.rdcopilot.etransport.declaration.corrected.v1",
      "com.rdcopilot.etransport.declaration.vehicle_changed.v1",
      "com.rdcopilot.etransport.declaration.deleted.v1",
      "com.rdcopilot.etransport.declaration.confirmed.v1",
      "com.rdcopilot.etransport.declaration.correction_rejected.v1",
      "com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1",
      "com.rdcopilot.etransport.declaration.deletion_rejected.v1",
      "com.rdcopilot.etransport.declaration.confirmation_rejected.v1"
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etransport/v1/subscriptions',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'e72aca15-7e48-42a5-8ba9-d6778c0b8c2d',
        'companyId': '9a893b65-2286-477f-8eab-61c12f7d6b3e',
        'url': 'https://erp.brumar.example/etransport/events',
        'eventTypes': [
            'com.rdcopilot.etransport.declaration.submitted.v1',
            'com.rdcopilot.etransport.declaration.accepted.v1',
            'com.rdcopilot.etransport.declaration.rejected.v1',
            'com.rdcopilot.etransport.declaration.corrected.v1',
            'com.rdcopilot.etransport.declaration.vehicle_changed.v1',
            'com.rdcopilot.etransport.declaration.deleted.v1',
            'com.rdcopilot.etransport.declaration.confirmed.v1',
            'com.rdcopilot.etransport.declaration.correction_rejected.v1',
            'com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1',
            'com.rdcopilot.etransport.declaration.deletion_rejected.v1',
            'com.rdcopilot.etransport.declaration.confirmation_rejected.v1',
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "e72aca15-7e48-42a5-8ba9-d6778c0b8c2d",
  "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
  "url": "https://erp.brumar.example/etransport/events",
  "eventTypes": [
    "com.rdcopilot.etransport.declaration.submitted.v1",
    "com.rdcopilot.etransport.declaration.accepted.v1",
    "com.rdcopilot.etransport.declaration.rejected.v1",
    "com.rdcopilot.etransport.declaration.corrected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_changed.v1",
    "com.rdcopilot.etransport.declaration.deleted.v1",
    "com.rdcopilot.etransport.declaration.confirmed.v1",
    "com.rdcopilot.etransport.declaration.correction_rejected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1",
    "com.rdcopilot.etransport.declaration.deletion_rejected.v1",
    "com.rdcopilot.etransport.declaration.confirmation_rejected.v1"
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "e72aca15-7e48-42a5-8ba9-d6778c0b8c2d",
  "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
  "url": "https://erp.brumar.example/etransport/events",
  "eventTypes": [
    "com.rdcopilot.etransport.declaration.submitted.v1",
    "com.rdcopilot.etransport.declaration.accepted.v1",
    "com.rdcopilot.etransport.declaration.rejected.v1",
    "com.rdcopilot.etransport.declaration.corrected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_changed.v1",
    "com.rdcopilot.etransport.declaration.deleted.v1",
    "com.rdcopilot.etransport.declaration.confirmed.v1",
    "com.rdcopilot.etransport.declaration.correction_rejected.v1",
    "com.rdcopilot.etransport.declaration.vehicle_change_rejected.v1",
    "com.rdcopilot.etransport.declaration.deletion_rejected.v1",
    "com.rdcopilot.etransport.declaration.confirmation_rejected.v1"
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "e72aca15-7e48-42a5-8ba9-d6778c0b8c2d",
  "status": "accepted",
  "aggregateId": "966258ea-fb01-4efb-9cbc-c9cfea179a65",
  "aggregateRevision": 1,
  "secret": "whsec_Qm3bT7vKd2NfXr9LsYe1WcH5uZo8AjP4"
}
```

## Rotate the secret of a subscription

POST `/etransport/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` |
| `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 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

```bash
curl -X POST "$RDC_BASE_URL/etransport/v1/subscriptions/966258ea-fb01-4efb-9cbc-c9cfea179a65/secret" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "d092f106-a3cc-44e6-8807-333d236585b8"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/subscriptions/966258ea-fb01-4efb-9cbc-c9cfea179a65/secret`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "d092f106-a3cc-44e6-8807-333d236585b8"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etransport/v1/subscriptions/966258ea-fb01-4efb-9cbc-c9cfea179a65/secret',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'd092f106-a3cc-44e6-8807-333d236585b8',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "d092f106-a3cc-44e6-8807-333d236585b8"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/subscriptions/966258ea-fb01-4efb-9cbc-c9cfea179a65/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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/subscriptions/966258ea-fb01-4efb-9cbc-c9cfea179a65/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "d092f106-a3cc-44e6-8807-333d236585b8"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "d092f106-a3cc-44e6-8807-333d236585b8",
  "status": "accepted",
  "aggregateId": "966258ea-fb01-4efb-9cbc-c9cfea179a65",
  "aggregateRevision": 2,
  "secret": "whsec_d8Rw0KbV5yHqLn2TcXe7Fm1GsJz4UaP6"
}
```

## List deliveries

GET `/etransport/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` |
| `declarationId` | query | `string (uuid)` | Nooptional | Only the deliveries about this declaration. |
| `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

```bash
curl "$RDC_BASE_URL/etransport/v1/deliveries?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/deliveries?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/etransport/v1/deliveries?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/deliveries?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/deliveries?companyId=9a893b65-2286-477f-8eab-61c12f7d6b3e&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`

JSON

```json
{
  "items": [
    {
      "id": "fc0555d4-9ff8-47a7-a870-b036574a69cc",
      "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
      "declarationId": "ffe03a6e-e050-4a07-8043-dec108572aa9",
      "type": "com.rdcopilot.etransport.declaration.rejected.v1",
      "state": "parked",
      "attempts": [
        {
          "n": 1,
          "http": 503,
          "at": "2026-11-12T07:04:56Z"
        },
        {
          "n": 2,
          "http": 503,
          "at": "2026-11-12T07:05:56Z"
        },
        {
          "n": 3,
          "http": 503,
          "at": "2026-11-12T07:10:56Z"
        },
        {
          "n": 4,
          "http": 503,
          "at": "2026-11-12T07:40:56Z"
        },
        {
          "n": 5,
          "http": 503,
          "at": "2026-11-12T09:40:56Z"
        },
        {
          "n": 6,
          "http": 503,
          "at": "2026-11-12T21:40:56Z"
        }
      ],
      "maxAttempts": 6,
      "revision": 6
    },
    {
      "id": "228ad7b8-2852-48a4-b99e-b5378b58da4e",
      "companyId": "9a893b65-2286-477f-8eab-61c12f7d6b3e",
      "declarationId": "4533692d-469c-4b70-acdb-d1a9a4a0f54f",
      "type": "com.rdcopilot.etransport.declaration.accepted.v1",
      "state": "delivered",
      "attempts": [
        {
          "n": 1,
          "http": 200,
          "at": "2026-11-23T07:05:47Z"
        }
      ],
      "maxAttempts": 6,
      "revision": 1
    }
  ],
  "nextCursor": null
}
```

## Replay an event

POST `/etransport/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` |
| `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 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

```bash
curl -X POST "$RDC_BASE_URL/etransport/v1/deliveries/fc0555d4-9ff8-47a7-a870-b036574a69cc/replay" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "b92df01a-f560-44db-9744-8312437ae4ba"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/etransport/v1/deliveries/fc0555d4-9ff8-47a7-a870-b036574a69cc/replay`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "b92df01a-f560-44db-9744-8312437ae4ba"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/etransport/v1/deliveries/fc0555d4-9ff8-47a7-a870-b036574a69cc/replay',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'b92df01a-f560-44db-9744-8312437ae4ba',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "b92df01a-f560-44db-9744-8312437ae4ba"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/etransport/v1/deliveries/fc0555d4-9ff8-47a7-a870-b036574a69cc/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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etransport/v1/deliveries/fc0555d4-9ff8-47a7-a870-b036574a69cc/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "b92df01a-f560-44db-9744-8312437ae4ba"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "b92df01a-f560-44db-9744-8312437ae4ba",
  "status": "accepted",
  "aggregateId": "fc0555d4-9ff8-47a7-a870-b036574a69cc",
  "aggregateRevision": 7
}
```
