{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-place-order-request-schema.json",
  "title": "PlaceOrderRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-order-management-api-openapi.yml#/components/schemas/PlaceOrderRequest",
  "type": "object",
  "required": [
    "tenantId",
    "clientOrgId",
    "campaignId",
    "requestingPartyId",
    "rosterFilePath",
    "clientOrderName",
    "serviceStartDate",
    "serviceEndDate",
    "vendors"
  ],
  "properties": {
    "tenantId": {
      "type": "integer",
      "format": "int64"
    },
    "clientOrgId": {
      "type": "integer",
      "format": "int64"
    },
    "campaignId": {
      "type": "integer",
      "format": "int64",
      "description": "Campaign ID to place order. Either one of campaignId or campaignName is required"
    },
    "campaignName": {
      "type": "string",
      "description": "Campaign name to place order. Either one of campaignId or campaignName is required"
    },
    "requestingPartyId": {
      "type": "integer",
      "format": "int64",
      "description": "Requesting party ID to place order. Either one of requestingPartyId or requestingPartyName is required"
    },
    "requestingPartyName": {
      "type": "string",
      "description": "Requesting party name to place order. Either one of requestingPartyId or requestingPartyName is required"
    },
    "rosterFilePath": {
      "type": "string"
    },
    "clientOrderName": {
      "type": "string"
    },
    "serviceStartDate": {
      "type": "string",
      "format": "date-time"
    },
    "serviceEndDate": {
      "type": "string",
      "format": "date-time"
    },
    "vendors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Vendor"
      }
    }
  },
  "$defs": {
    "Vendor": {
      "type": "object",
      "required": [
        "vendorOrgId",
        "interfaces"
      ],
      "properties": {
        "vendorOrgId": {
          "type": "integer",
          "format": "int64",
          "description": "Data vendor org ID."
        },
        "vendorName": {
          "type": "string",
          "description": "Data vendor name."
        },
        "interfaces": {
          "type": "array",
          "description": "List of MODXI interfaces to process order.",
          "items": {
            "type": "string"
          }
        },
        "subVendorNames": {
          "type": "array",
          "description": "List of internal vendor emr names for placing an order for internal vendor. There should not be any sub vendor names specified for external vendor.",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}