---
title: "Approvals | Docs | Integrations by R&D Copilot"
description: "An approval waits for an authorized decision within its time limit."
canonical: "https://integrations.rdcopilot.com/docs/build/approvals/"
language: en
updated: 2026-11-22
---

# Approvals

An approval waits for an authorized decision within its time limit.

## Check whether approval is needed

The order flow requires approval when the net total exceeds `branchLimit`. At or below the limit, the approval step is `skipped`. The approval step waits for both CRM and WMS dependencies before it can become active.

## Submit the decision

Read the run and approval step before making a decision. Send the latest run revision. The authenticated account must have approval permission; a field sent by the caller cannot provide that permission.

curl

```bash
curl -X POST "$RDC_BASE_URL/integrations/v1/runs/run-b73a02/steps/approval/approval" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1,
  "decision": "approve"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/runs/run-b73a02/steps/approval/approval`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
    "expectedRevision": 1,
    "decision": "approve"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/runs/run-b73a02/steps/approval/approval',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
        'expectedRevision': 1,
        'decision': 'approve',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1,
  "decision": "approve"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/runs/run-b73a02/steps/approval/approval');
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")}/integrations/v1/runs/run-b73a02/steps/approval/approval");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1,
  "decision": "approve"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "status": "accepted",
  "aggregateRevision": 1,
  "aggregateId": "run-b73a02"
}
```

## Read the outcome

Approval completes the step and releases the wait. Rejection fails the run at the approval step. An expired approval cannot be approved by retrying the request; read the current state before deciding the next business action.
