OneRail O Auth2 API

The OAuth2 API from OneRail — 1 operation(s) for oauth2.

OpenAPI Specification

onerail-oauth2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 0.0.3
  title: OneRail Delivery Cloud - Delivery O Auth2 API
  description: Allows authorized 3rd parties to request new deliveries through the OneRail network
  license:
    name: UNLICENSED
security:
- ApiKey: []
  AppId: []
tags:
- name: OAuth2
paths:
  /oauth2/token:
    x-exegesis-controller: OAuth
    post:
      tags:
      - OAuth2
      summary: 'An endpoint that processes a clientId and clientSecret, verifies the client''s credentials,
        and issues an access token for authorized API access upon successful validation.

        '
      operationId: issueToken
      security: []
      requestBody:
        description: OAuth client credentials
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthCredentials'
      responses:
        '200':
          description: Success. The delivery has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponse'
        '401':
          description: Unauthorized - invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OAuthCredentials:
      type: object
      required:
      - client_id
      - client_secret
      - grant_type
      properties:
        client_id:
          type: string
        client_secret:
          type: string
        grant_type:
          type: string
    OAuthTokenResponse:
      type: object
      required:
      - access_token
      - token_type
      - expires_in
      properties:
        access_token:
          type: string
        token_type:
          type: string
        expires_in:
          description: Access token TTL in seconds
          type: number
    Error:
      required:
      - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        errors:
          type: object
        errorDetails:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
                description: A human-readable explanation specific to this occurrence of the problem
              pointer:
                type: string
                description: A JSON Pointer [RFC6901] to the associated entity in the request document
            required:
            - detail
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-ONERAIL-API-KEY
    AppId:
      type: apiKey
      in: header
      name: X-ONERAIL-APP-ID
    ApiKeyAndAppId:
      type: apiKey
      in: header
      name: X-ONERAIL-API-KEY-AND-APP-ID