OneRail LP Contract SLA API

The LP Contract SLA API from OneRail — 12 operation(s) for lp contract sla.

OpenAPI Specification

onerail-lp-contract-sla-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: OneRail Operation Dashboard LP Contract SLA API
  description: Defines Operations Dashboard APIs
  license:
    name: UNLICENSED
    url: ''
servers:
- url: /
  description: Default relative server URL
security:
- bearer: []
tags:
- name: LP Contract SLA
paths:
  /v1/lp-contract-sla/{lpContractSlaId}:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    get:
      x-exegesis-controller: LPContractSla
      summary: Get LP Contract SLA
      operationId: getLpContractSla
      tags:
      - LP Contract SLA
      responses:
        '200':
          description: LP Contract SLA
          content:
            application/json:
              schema:
                type: object
                description: LP Contract SLA
                properties:
                  id:
                    type: string
                    format: uuid
                  approvedBy:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      firstName:
                        type: string
                      lastName:
                        type: string
                  approvedOn:
                    type: string
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  organization:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                    description: Reference to Organization
                  shipperContractSlaId:
                    type: string
                    format: uuid
                    description: Reference to Shipper Contract SLA
                  marketModifiers:
                    type: array
                    description: List of market modifiers
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/put/requestBody/content/application~1json/schema/properties/marketModifiers/items'
                  deliveryPremium:
                    $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/put/requestBody/content/application~1json/schema/properties/deliveryPremium'
                  milageTiers:
                    type: array
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/put/requestBody/content/application~1json/schema/properties/milageTiers/items'
                  deliveryCorrectionCharges:
                    type: array
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/put/requestBody/content/application~1json/schema/properties/deliveryCorrectionCharges/items'
                  fleetVehicleModifiers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        basePriceMultiplier:
                          type: number
                          format: float
                        fleetVehicleId:
                          type: string
                          format: uuid
                        fleetVehicle:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            maxWeightLbs:
                              type: integer
                  lpSignature:
                    $ref: '#/paths/~1v1~1shipper-contract-sla~1%7BshipperContractSlaId%7D~1shipper-sign/post/responses/200/content/application~1json/schema'
                  oneRailSignature:
                    $ref: '#/paths/~1v1~1shipper-contract-sla~1%7BshipperContractSlaId%7D~1shipper-sign/post/responses/200/content/application~1json/schema'
                  shipperContract:
                    type: array
                    items:
                      $ref: '#/paths/~1v1~1shipper-contract/post/responses/200/content/application~1json/schema'
                  active:
                    type: boolean
                  routeCostConfigurations:
                    type:
                    - array
                    - 'null'
                    items:
                      type: object
                      properties:
                        shipperContractSlaId:
                          type:
                          - string
                          - 'null'
                          format: uuid
                        lpContractSlaId:
                          type:
                          - string
                          - 'null'
                          format: uuid
                        fleetVehicleId:
                          type: string
                          format: uuid
                        type:
                          type: string
                          enum:
                          - PER_STOP
                          - PER_MILE
                          - FLAT
                        priceCent:
                          type: number
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
    put:
      x-exegesis-controller: LPContractSla
      summary: Update LP Contract SLA
      operationId: updateLpContractSla
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: LP Contract SLA
              properties:
                marketModifiers:
                  type: array
                  description: List of market modifiers
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      basePriceMultiplier:
                        type: number
                        format: float
                      onerailBias:
                        type: number
                        format: float
                      fairnessWeight:
                        type: number
                        format: float
                      market:
                        $ref: '#/paths/~1v1~1market~1%7BmarketId%7D~1update-radius/put/responses/200/content/application~1json/schema'
                deliveryPremium:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    holidayDeliveryAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                    holidayReturnAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                    fuelDeliveryAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                    fuelReturnAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                    weekendDeliveryAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                    weekendReturnAddnlPercentage:
                      type:
                      - number
                      - 'null'
                      format: float
                milageTiers:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      maxMilage:
                        type: integer
                      baseDeliveryPriceCent:
                        type: integer
                      baseReturnPriceCent:
                        type: integer
                      priceIsPerMile:
                        type: boolean
                deliveryCorrectionCharges:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      timeBeforePickupMin:
                        type: integer
                      correctionAddnlPercentage:
                        type: number
                        format: float
                fleetVehicleModifiers:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      basePriceMultiplier:
                        type: number
                        format: float
                      fleetVehicleId:
                        type: string
                        format: uuid
                routeCostConfigurations:
                  type:
                  - array
                  - 'null'
                  items:
                    type: object
                    properties:
                      id:
                        type:
                        - string
                        - 'null'
                        format: uuid
                      shipperContractSlaId:
                        type:
                        - string
                        - 'null'
                        format: uuid
                      lpContractSlaId:
                        type:
                        - string
                        - 'null'
                        format: uuid
                      fleetVehicleId:
                        type: string
                        format: uuid
                      type:
                        type: string
                        enum:
                        - PER_STOP
                        - PER_MILE
                        - FLAT
                      priceCent:
                        type: number
      responses:
        '200':
          description: LP Contract SLA
          content:
            application/json:
              schema:
                $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/submit-approval:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    post:
      x-exegesis-controller: LPContractSla
      summary: Notify OneRail Approver to approve LP Contract SLAs
      operationId: approveNotifyLpContractSla
      tags:
      - LP Contract SLA
      requestBody:
        description: None
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: True or false
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/approve:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    post:
      x-exegesis-controller: LPContractSla
      summary: Approves LP Contract SLA
      operationId: approveLpContractSla
      tags:
      - LP Contract SLA
      requestBody:
        description: None
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: LP Contract SLA
          content:
            application/json:
              schema:
                $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/lp-sign:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    post:
      x-exegesis-controller: LPContractSla
      summary: LP Signature for LP Contract SLA
      operationId: createLpSignature
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Contract Signature
              required:
              - typedName
              properties:
                typedName:
                  type: string
      responses:
        '200':
          description: LP Contract SLA
          content:
            application/json:
              schema:
                $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/onerail-sign:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    post:
      x-exegesis-controller: LPContractSla
      summary: One Rail Signature for LP Contract SLA
      operationId: signLpContractSla
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D~1lp-sign/post/requestBody/content/application~1json/schema'
      responses:
        '200':
          description: LP Contract SLA
          content:
            application/json:
              schema:
                $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/set-active-state:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    post:
      x-exegesis-controller: LPContractSla
      summary: Set LP Contract SLA active state
      operationId: setLpContractSlaActiveState
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                active:
                  type: boolean
                forceState:
                  type: boolean
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: string
                enum:
                - SUCCESS
                - FORCE_STATE_REQUIRED
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/{marketModifierId}/lsp-bias:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    - name: marketModifierId
      in: path
      required: true
      schema:
        type: string
    put:
      x-exegesis-controller: LPContractSla
      summary: Set LSP bias for marketModifier
      operationId: setLSPBias
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                lspBias:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: A metric used in the lp-ranking. Higher is better
      responses:
        '200':
          $ref: '#/paths/~1v1~1bulk-dispatch/post/responses/200'
        '400':
          $ref: '#/paths/~1v1~1routes/get/responses/404'
        '404':
          $ref: '#/paths/~1v1~1routes/get/responses/404'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/{lpContractSlaId}/{marketModifierId}/active:
    parameters:
    - name: lpContractSlaId
      in: path
      required: true
      schema:
        type: string
    - name: marketModifierId
      in: path
      required: true
      schema:
        type: string
    put:
      x-exegesis-controller: LPContractSla
      summary: Enable / Disable marketModifier
      operationId: setMarketModifierActive
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - active
              properties:
                active:
                  type: boolean
                  description: Indicates the status for marketModifier
      responses:
        '200':
          $ref: '#/paths/~1v1~1bulk-dispatch/post/responses/200'
        '400':
          $ref: '#/paths/~1v1~1routes/get/responses/404'
        '404':
          $ref: '#/paths/~1v1~1routes/get/responses/404'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/approve-and-sign:
    post:
      x-exegesis-controller: LPContractSla
      operationId: bulkApproveAndSignLpContractSlas
      summary: Create Bulk LP approval and signature for an SLA
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Bulk Approve and Sign request body
              type: object
              properties:
                typedName:
                  type: string
                lpContractSlaTemplateIds:
                  type: array
                  items:
                    type: string
                    format: uuid
      responses:
        '200':
          description: Bulk Approve and Sign response
          content:
            application/json:
              schema:
                description: Bulk Approve and Sign response
                type: object
                properties:
                  signatures:
                    type: array
                    items:
                      $ref: '#/paths/~1v1~1shipper-contract-sla~1%7BshipperContractSlaId%7D~1shipper-sign/post/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/bulk-approve:
    post:
      x-exegesis-controller: LPContractSla
      summary: Bulk approve an array of LP Contract SLA ids
      operationId: bulkApproveLpContractSlas
      tags:
      - LP Contract SLA
      requestBody:
        description: Shipper Contract SLA ids
        required: true
        content:
          application/json:
            schema:
              type: object
              description: LP Contract SLA ids
              properties:
                lpContractSlaIds:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Approve Contract SLA ids
          content:
            application/json:
              schema:
                type: object
                description: List of bulk SLA approval info
                properties:
                  approvals:
                    type: array
                    description: SLA approval info
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/bulk-lp-sign:
    post:
      x-exegesis-controller: LPContractSla
      summary: Bulk LP Signature for LP Contract SLA
      operationId: createBulkLpSignature
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D~1lp-sign/post/requestBody/content/application~1json/schema'
              - $ref: '#/paths/~1v1~1lp-contract-sla~1bulk-approve/post/requestBody/content/application~1json/schema'
      responses:
        '200':
          description: List of signatures for LP Contract SLA
          content:
            application/json:
              schema:
                type: object
                description: List of bulk SLA signatures info
                properties:
                  signatures:
                    type: array
                    description: SLA signatures info
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        default:
          $ref: '#/paths/~1v1~1routes/get/responses/404'
  /v1/lp-contract-sla/bulk-onerail-sign:
    post:
      x-exegesis-controller: LPContractSla
      summary: Bulk One Rail Signature for LP Contract SLA
      operationId: bulkSignLpContractSlas
      tags:
      - LP Contract SLA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D~1lp-sign/post/requestBody/content/application~1json/schema'
              - $ref: '#/paths/~1v1~1lp-contract-sla~1bulk-approve/post/requestBody/content/application~1json/schema'
      responses:
        '200':
          description: List of signatures for LP OneRail Contract SLA
          content:
            application/json:
              schema:
                type: object
                description: List of bulk SLA signatures info
                properties:
                  signatures:
                    type: array
                    description: SLA signatures info
                    items:
                      $ref: '#/paths/~1v1~1lp-contract-sla~1%7BlpContractSlaId%7D/get/responses/200/content/application~1json/schema'
        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: {}