{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-client-order-request-schema.json",
  "title": "clientOrderRequest",
  "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/clientOrderRequest",
  "type": "object",
  "required": [
    "vendorType",
    "tenantId",
    "clientOrgId",
    "campaignId",
    "requestingPartyId",
    "rosterFilePath",
    "clientOrderName",
    "serviceStartDate",
    "serviceEndDate",
    "vendors"
  ],
  "properties": {
    "vendorType": {
      "type": "string",
      "description": "Type of the vendor for which the order is placed. It can be either external or internal and should not have any other value."
    },
    "tenantId": {
      "type": "integer",
      "format": "int64",
      "description": "NCC tenant ID for which the order is to be placed."
    },
    "clientOrgId": {
      "type": "integer",
      "format": "int64",
      "description": "NCC Client org ID for which the order is to be placed."
    },
    "campaignId": {
      "type": "integer",
      "format": "int64",
      "description": "Campaign ID to place order. Either one of campaignId or campaignName is required. If both are present, then preference will be given to campaign ID."
    },
    "campaignName": {
      "type": "string",
      "description": "Campaign name to place order. Either one of campaignId or campaignName is required. If both are present, then preference will be given to campaign ID."
    },
    "requestingPartyId": {
      "type": "integer",
      "format": "int64",
      "description": "Requesting party ID to place order. Either one of requestingPartyId or requestingPartyName is required. If both are present, then preference will be given to requestingPartyId."
    },
    "requestingPartyName": {
      "type": "string",
      "description": "Requesting party name to place order. Either one of requestingPartyId or requestingPartyName is required. If both are present, then preference will be given to requestingPartyId."
    },
    "rosterFilePath": {
      "type": "string",
      "description": "The file path of ABS where the roster file is present. Roster file should be available at this location before placing the request."
    },
    "clientOrderName": {
      "type": "string",
      "description": "Unique name of the client order to be created."
    },
    "serviceStartDate": {
      "type": "string",
      "format": "date",
      "description": "Service start date."
    },
    "serviceEndDate": {
      "type": "string",
      "format": "date",
      "description": "Service end date."
    },
    "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"
          }
        }
      }
    }
  }
}