OneRail Route Stop Note API

The RouteStopNote API from OneRail — 1 operation(s) for routestopnote.

OpenAPI Specification

onerail-routestopnote-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: OneRail Operation Dashboard Route Stop Note API
  description: Defines Operations Dashboard APIs
  license:
    name: UNLICENSED
    url: ''
servers:
- url: /
  description: Default relative server URL
security:
- bearer: []
tags:
- name: RouteStopNote
paths:
  /v1/route/{routeId}/route-stop-notes:
    parameters:
    - name: routeId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      x-exegesis-controller: RouteStopNote
      summary: Get paginated route stop notes
      operationId: getAllRouteStopNotes
      tags:
      - RouteStopNote
      parameters:
      - name: offset
        in: query
        description: Number of items to skip before returning the results.
        required: true
        schema:
          type: integer
          minimum: 0
          default: 0
      - name: limit
        in: query
        description: Maximum number of items to return.
        schema:
          type: integer
          minimum: 1
          default: 20
      responses:
        '200':
          description: Route Stop Notes Records
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/paths/~1v1~1api-auths/get/responses/200/content/application~1json/schema/allOf/0'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/paths/~1v1~1route~1%7BrouteId%7D~1route-stop-notes/post/responses/201/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
    post:
      x-exegesis-controller: RouteStopNote
      summary: Creates a route stop note
      operationId: createRouteStopNote
      tags:
      - RouteStopNote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: RouteStopNote
              properties:
                routeStopId:
                  type: string
                content:
                  type: string
                  maxLength: 1000
                  minLength: 1
                visibility:
                  type: string
                  description: Sets note's visibility. Only OR Users can set this value. NORMAL is defaulted if user doesn't have enough permissions
                  enum:
                  - NORMAL
                  - OR_ONLY
      responses:
        '201':
          description: Route Stop Note
          content:
            application/json:
              schema:
                type: object
                description: RouteStopNote
                properties:
                  id:
                    type: string
                    format: uuid
                  routeStopId:
                    type: string
                  content:
                    type: string
                  visibility:
                    type: string
                    enum:
                    - NORMAL
                    - OR_ONLY
                  routeStop:
                    type: object
                    description: Route stop
                    properties:
                      id:
                        type: string
                      deliveryId:
                        type: string
                      stopType:
                        type: string
                  user:
                    type: object
                    description: User
                    properties:
                      firstName:
                        type: string
                      lastName:
                        type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
        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: {}