OneRail Exception Alert API
The Exception Alert API from OneRail — 4 operation(s) for exception alert.
The Exception Alert API from OneRail — 4 operation(s) for exception alert.
openapi: 3.2.0
info:
version: 1.0.0
title: OneRail Operation Dashboard Exception Alert API
description: Defines Operations Dashboard APIs
license:
name: UNLICENSED
url: ''
servers:
- url: /
description: Default relative server URL
security:
- bearer: []
tags:
- name: Exception Alert
paths:
/v1/exception-alerts/{serviceLevelId}:
parameters:
- name: serviceLevelId
in: path
required: true
schema:
type: string
format: uuid
get:
x-exegesis-controller: ExceptionAlert
summary: View all exception alerts for a given servicelevel
operationId: getByServiceLevel
tags:
- Exception Alert
responses:
'200':
description: Exception alerts
content:
application/json:
schema:
type: object
properties:
serviceLevelId:
type: string
format: uuid
conditions:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
thresholdValue:
type: integer
minimum: 0
default: 0
conditionOperator:
type: string
default: '>'
enum:
- '>'
- <
- '='
notes:
type: string
default: ''
deliveryExceptionReasonDefinitionId:
type: string
format: uuid
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
/v1/exception-alert:
post:
x-exegesis-controller: ExceptionAlert
summary: Create Exception Alert
operationId: createExceptionAlert
tags:
- Exception Alert
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
conditions:
type: array
items:
type: object
properties:
serviceLevelId:
type: string
format: uuid
organizationId:
type: string
format: uuid
conditionId:
type: string
format: uuid
thresholdValue:
type: integer
minimum: 0
conditionOperator:
type: string
enum:
- '>'
- <
- '='
notes:
type: string
deliveryExceptionReasonDefinitionId:
type: string
format: uuid
enabled:
type: boolean
responses:
'200':
description: Exception Alert
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
condition:
description: Drop off location
type: object
properties:
id:
type: string
format: uuid
condition:
type: string
noun:
type: string
createdAt:
type: string
updatedAt:
type: string
thresholdValue:
type: integer
conditionOperator:
type: string
notes:
type: string
deliveryExceptionReasonDefinitionId:
type: string
format: uuid
enabled:
type: boolean
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
/v1/exception-alert/{exceptionAlertId}:
parameters:
- name: exceptionAlertId
in: path
required: true
schema:
type: string
format: uuid
get:
x-exegesis-controller: ExceptionAlert
summary: Get Exception Alert
operationId: getExceptionAlert
tags:
- Exception Alert
responses:
'200':
description: Exception Alert
content:
application/json:
schema:
$ref: '#/paths/~1v1~1exception-alert/post/responses/200/content/application~1json/schema'
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
put:
x-exegesis-controller: ExceptionAlert
summary: Update Exception Alert
operationId: updateExceptionAlert
tags:
- Exception Alert
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
conditionId:
type: string
format: uuid
thresholdValue:
type: integer
minimum: 0
conditionOperator:
type: string
enum:
- '>'
- <
- '='
notes:
type: string
deliveryExceptionReasonDefinitionId:
type: string
format: uuid
enabled:
type: boolean
responses:
'200':
description: Exception Alert
content:
application/json:
schema:
$ref: '#/paths/~1v1~1exception-alert/post/responses/200/content/application~1json/schema'
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
delete:
x-exegesis-controller: ExceptionAlert
summary: Remove Exception Alert
operationId: removeExceptionAlert
tags:
- Exception Alert
responses:
'200':
description: Success.
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
/v1/exception-alert/apply-to-delivery/{deliveryId}:
parameters:
- name: deliveryId
in: path
required: true
schema:
type: string
format: uuid
post:
x-exegesis-controller: ExceptionAlert
summary: Apply exception alert to delivery
operationId: applyServiceLevelExceptionAlertsOnDelivery
tags:
- Exception Alert
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
selectedAlerts:
type: array
items:
type: object
properties:
condition:
type: string
preventExceptionDuplication:
type: boolean
responses:
'200':
description: Exception Alert
content:
application/json:
schema:
$ref: '#/paths/~1v1~1bulk-dispatch/post/responses/200'
default:
$ref: '#/paths/~1v1~1routes/get/responses/404'
components:
securitySchemes:
bearer:
type: http
scheme: bearer
description: 'Standard JWT bearer token used for authenticated OmniPoint users
and internal service-to-service calls. Clients send `Authorization: Bearer <jwt>`
and the token is validated using the shared Core access token secret.
'
ApiKey:
type: apiKey
in: header
name: X-ONERAIL-API-KEY
description: 'Shared secret key used for machine-to-machine integrations. Must be sent
together with `X-ONERAIL-APP-ID` and is validated against the stored ApiAuth
record for that application.
'
AppId:
type: apiKey
in: header
name: X-ONERAIL-APP-ID
description: 'Application identifier (UUID) that pairs with `X-ONERAIL-API-KEY` for
machine-to-machine integrations. Both headers are required for ApiKey-based
authentication.
'
OAuth:
type: oauth2
description: 'OAuth 2.0 access token validated by the Operations service (e.g. Okta-backed
integrations). Clients obtain tokens from their own IdP outside of this API
and call endpoints with `Authorization: OAuth <access_token>`. The
`authorizationUrl` and `tokenUrl` values below are placeholders only to
satisfy the OpenAPI schema; this service does not call them directly and the
real IdP URLs are configured via environment and introspection logic in code.
'
flows:
authorizationCode:
authorizationUrl: https://dummy-unused-url.com
tokenUrl: https://dummy-unused-url.com
scopes: {}