{
  "openapi": "3.1.0",
  "info": {
    "title": "AUX Transaction Preflight",
    "version": "0.1.0-poc"
  },
  "servers": [
    {
      "url": "https://aux.prdictionedge.ai"
    }
  ],
  "paths": {
    "/v1/preflight": {
      "post": {
        "operationId": "preflightTransaction",
        "summary": "Assess a proposed B2B payment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreflightRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preflight decision"
          },
          "400": {
            "description": "Invalid request"
          },
          "410": {
            "description": "Observation window closed"
          },
          "503": {
            "description": "Public preflight disabled"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PreflightRequest": {
        "type": "object",
        "required": [
          "proposal",
          "transaction_history"
        ],
        "properties": {
          "proposal": {
            "type": "object",
            "description": "The proposed B2B payment."
          },
          "transaction_history": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "maxItems": 1000
          }
        }
      }
    }
  }
}