> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cail.health/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cail.health/_mcp/server.

# Update operational policy overrides

PATCH https://staging.cail.health/v1/organizations/{id}/operational-policy
Content-Type: application/json

Merges the supplied override fields into the operator’s existing override document. Only the keys present in the request body change; everything else is preserved. After per-field validation runs, the merged document is re-validated against the canonical policy schema; refinements that span multiple fields (such as priorHours strictly greater than recentHours) are enforced in that second pass.

Reference: https://docs.cail.health/api-references/api-reference/configure-access-policy/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: cail-api
  version: 1.0.0
paths:
  /v1/organizations/{id}/operational-policy:
    patch:
      operationId: update
      summary: Update operational policy overrides
      description: >-
        Merges the supplied override fields into the operator’s existing
        override document. Only the keys present in the request body change;
        everything else is preserved. After per-field validation runs, the
        merged document is re-validated against the canonical policy schema;
        refinements that span multiple fields (such as priorHours strictly
        greater than recentHours) are enforced in that second pass.
      tags:
        - subpackage_configureAccessPolicy
      parameters:
        - name: id
          in: path
          description: Stable identifier of the operator’s organisation.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The updated operational policy overrides.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationalPolicyResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOperationalPolicyRequest'
servers:
  - url: https://staging.cail.health
    description: https://staging.cail.health
components:
  schemas:
    WaitTimeTrendWindowOverride:
      type: object
      properties:
        recentHours:
          type: number
          format: double
          description: Window for recent reports in hours.
        priorHours:
          type: number
          format: double
          description: Window for prior reports in hours.
        minDeltaMinutes:
          type: number
          format: double
          description: >-
            Minimum delta in minutes between recent and prior medians before a
            trend is flagged.
      title: WaitTimeTrendWindowOverride
    WaitTimePressureBandsOverride:
      type: object
      properties:
        lowMaxMinutes:
          type: number
          format: double
          description: Upper bound (exclusive) of the low-pressure band in minutes.
        highMinMinutes:
          type: number
          format: double
          description: Lower bound (inclusive) of the high-pressure band in minutes.
      title: WaitTimePressureBandsOverride
    WaitTimeOverrides:
      type: object
      properties:
        staleWindowHours:
          type: number
          format: double
          description: How many hours before a wait-time report is considered stale.
        trendWindow:
          $ref: '#/components/schemas/WaitTimeTrendWindowOverride'
        pressureBands:
          $ref: '#/components/schemas/WaitTimePressureBandsOverride'
      title: WaitTimeOverrides
    TargetsOverrides:
      type: object
      properties:
        diversionRatePct:
          type: number
          format: double
          description: Target A&E diversion rate as a percentage (0-100).
      title: TargetsOverrides
    ReportingOverrides:
      type: object
      properties:
        premFollowUpWindowHours:
          type: number
          format: double
          description: Window for collecting PREM follow-ups, in hours.
        utilisationWindowDays:
          type: number
          format: double
          description: Window for utilisation analytics, in days.
      title: ReportingOverrides
    SessionsOverrides:
      type: object
      properties:
        maxAgeHours:
          type: number
          format: double
          description: >-
            Maximum age of an in-progress navigation session in hours before it
            is auto-abandoned.
      title: SessionsOverrides
    ExplorePrimaryCtaOverride:
      type: object
      properties:
        title:
          type: object
          additionalProperties:
            type: string
          description: Localised title map keyed by BCP-47 tag.
        subtitle:
          type: object
          additionalProperties:
            type: string
          description: Localised subtitle map keyed by BCP-47 tag.
        actionType:
          type: string
          description: CTA action discriminator.
        planDefinitionId:
          type: string
          description: Pathway definition the CTA launches.
      title: ExplorePrimaryCtaOverride
    ExploreAwarenessCardOverride:
      type: object
      properties:
        id:
          type: string
          description: Stable card identifier.
        title:
          type: object
          additionalProperties:
            type: string
          description: Localised title map keyed by BCP-47 tag.
        subtitle:
          type: object
          additionalProperties:
            type: string
          description: Localised subtitle map keyed by BCP-47 tag.
        icon:
          type: string
          description: Icon code for the card.
        color:
          type: string
          description: Theme color for the card.
        actionType:
          type: string
          description: Action discriminator.
        actionValue:
          type: string
          description: Optional action payload.
      title: ExploreAwarenessCardOverride
    ExploreOverrides:
      type: object
      properties:
        primaryCta:
          $ref: '#/components/schemas/ExplorePrimaryCtaOverride'
        awarenessCards:
          type: array
          items:
            $ref: '#/components/schemas/ExploreAwarenessCardOverride'
          description: Up to 20 awareness cards.
      title: ExploreOverrides
    UpdateOperationalPolicyRequest:
      type: object
      properties:
        waitTime:
          $ref: '#/components/schemas/WaitTimeOverrides'
        targets:
          $ref: '#/components/schemas/TargetsOverrides'
        reporting:
          $ref: '#/components/schemas/ReportingOverrides'
        sessions:
          $ref: '#/components/schemas/SessionsOverrides'
        explore:
          $ref: '#/components/schemas/ExploreOverrides'
      title: UpdateOperationalPolicyRequest
    OperationalPolicyOverrides:
      type: object
      properties:
        waitTime:
          $ref: '#/components/schemas/WaitTimeOverrides'
        targets:
          $ref: '#/components/schemas/TargetsOverrides'
        reporting:
          $ref: '#/components/schemas/ReportingOverrides'
        sessions:
          $ref: '#/components/schemas/SessionsOverrides'
        explore:
          $ref: '#/components/schemas/ExploreOverrides'
      title: OperationalPolicyOverrides
    OperationalPolicyResponseUpdatedBy:
      type: object
      properties: {}
      description: >-
        Identifier of the operator who applied the most recent change. Null when
        the row is the synthetic "no overrides yet" placeholder.
      title: OperationalPolicyResponseUpdatedBy
    OperationalPolicyResponse:
      type: object
      properties:
        organizationId:
          type: string
          description: Stable identifier of the operator’s organisation.
        overrides:
          $ref: '#/components/schemas/OperationalPolicyOverrides'
          description: >-
            Per-organisation overrides on top of the jurisdiction defaults. Only
            the values explicitly overridden by the operator are present; the
            resolved (merged) policy is what the rest of the platform applies at
            runtime.
        versionId:
          type: number
          format: double
          description: >-
            Monotonically-increasing version number used for optimistic
            concurrency on updates.
        lastUpdated:
          type: string
          description: ISO 8601 timestamp of the last update.
        updatedBy:
          oneOf:
            - $ref: '#/components/schemas/OperationalPolicyResponseUpdatedBy'
            - type: 'null'
          description: >-
            Identifier of the operator who applied the most recent change. Null
            when the row is the synthetic "no overrides yet" placeholder.
      required:
        - organizationId
        - overrides
        - versionId
        - lastUpdated
        - updatedBy
      title: OperationalPolicyResponse
  securitySchemes:
    auth0Bearer:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "organizationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "overrides": {
    "waitTime": {
      "staleWindowHours": 3
    }
  },
  "versionId": 1,
  "lastUpdated": "2026-05-13T14:21:00.000Z",
  "updatedBy": "0c1d2e3f-4a5b-4677-8899-aabbccddeeff"
}
```

**SDK Code**

```python After applying a wait-time stale-window override
import requests

url = "https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript After applying a wait-time stale-window override
const url = 'https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go After applying a wait-time stale-window override
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby After applying a wait-time stale-window override
require 'uri'
require 'net/http'

url = URI("https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java After applying a wait-time stale-window override
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php After applying a wait-time stale-window override
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp After applying a wait-time stale-window override
using RestSharp;

var client = new RestClient("https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift After applying a wait-time stale-window override
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://staging.cail.health/v1/organizations/f47ac10b-58cc-4372-a567-0e02b2c3d479/operational-policy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```