---
title: "Operations | Docs | Self-Checkout by R&D Copilot"
description: "A request that changes data is accepted once and answered with an operation result you can read again."
canonical: "https://checkout.rdcopilot.com/docs/api-reference/operations/"
language: en
updated: 2026-11-22
---

# Operations

A request that changes data is accepted once and answered with an operation result you can read again.

Every request that changes data carries an `operationId`, a UUID you choose. The API answers 202 with the result of the operation. [Idempotency and concurrency](https://checkout.rdcopilot.com/docs/reference/idempotency/) explains how to repeat a request safely.

1.  Send the change
    
    Put a new `operationId` in the body of the request.
    
2.  Read the result
    
    The answer holds `operationId`, `status` and `aggregateRevision`.
    
3.  Look it up if the answer is lost
    
    Ask for the operation by its `operationId`. You get the outcome each time you ask. After `completed` or `rejected` it no longer changes.
    

## Status of an operation

| Status | Meaning |
| --- | --- |
| accepted | The request was recorded and is being applied. |
| completed | The change was applied. |
| rejected | The request was understood and refused. Nothing was changed. |

`aggregateRevision` is the revision of the record after the operation. Send it as `expectedRevision` in the next change to the same record.

## Get an operation

GET `/selfcheckout/v1/operations/{operationId}`

Returns the first outcome of a change by the `operationId` you sent with it.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `operationId` | path | `string (uuid)` | Yesrequired | The `operationId` of the change. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | The outcome of the change. | `OperationResult` |
| `401` | The token is missing, not valid or has ended. | `Error` |
| `403` | The token does not give access to this data. | `Error` |
| `404` | No change was sent with this `operationId`. | `Error` |
| `429` | Too many requests. The request was not processed. | `Error` |
| `503` | The service cannot answer now. | `Error` |

### Request

curl

```bash
curl "$RDC_BASE_URL/selfcheckout/v1/operations/d1941539-061a-404d-bd69-d2c545eb92f0" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/selfcheckout/v1/operations/d1941539-061a-404d-bd69-d2c545eb92f0`, {
  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"]}/selfcheckout/v1/operations/d1941539-061a-404d-bd69-d2c545eb92f0',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/selfcheckout/v1/operations/d1941539-061a-404d-bd69-d2c545eb92f0');
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")}/selfcheckout/v1/operations/d1941539-061a-404d-bd69-d2c545eb92f0");
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
{
  "operationId": "d1941539-061a-404d-bd69-d2c545eb92f0",
  "status": "completed",
  "aggregateId": "094a0e7f-0541-49b0-b063-3fa75d8468a8",
  "aggregateRevision": 2
}
```

The full rule: [Developer guide](https://rdcopilot.com/docs/requests/)
