{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaxcare/json-schema/vaxcare-vax-api-models-order-and-shipment-history-grouping-schema.json",
  "title": "VaxApi.Models.OrderAndShipmentHistoryGrouping",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaxcare-openapi.json#/components/schemas/VaxApi.Models.OrderAndShipmentHistoryGrouping",
  "type": "object",
  "properties": {
    "partnerName": {
      "type": [
        "string",
        "null"
      ]
    },
    "partnerState": {
      "type": [
        "string",
        "null"
      ]
    },
    "partnerId": {
      "type": "integer",
      "format": "int32"
    },
    "locationName": {
      "type": [
        "string",
        "null"
      ]
    },
    "clinicId": {
      "type": "integer",
      "format": "int32"
    },
    "orderId": {
      "type": "integer",
      "format": "int64"
    },
    "coreOrderId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "firstPlaced": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstApprovedDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstBatchTime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstReceived856Date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstShipmentCreatedTracking": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstCanceledOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstDeliveredDateUtc": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "userName": {
      "type": [
        "string",
        "null"
      ]
    },
    "orderAndShipmentLineItems": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/VaxApi.Models.OrderAndShipmentHistoryLineItems"
      }
    },
    "countOfProducts": {
      "type": "integer",
      "format": "int32"
    },
    "countOfShipments": {
      "type": "integer",
      "format": "int32"
    },
    "countOfDistributors": {
      "type": "integer",
      "format": "int32"
    },
    "countOfExpected997Ack": {
      "type": "integer",
      "format": "int32"
    },
    "countOfOrderAccepted": {
      "type": "integer",
      "format": "int32"
    },
    "countOfOrderRejected": {
      "type": "integer",
      "format": "int32"
    },
    "countOfPo850FileName": {
      "type": "integer",
      "format": "int32"
    },
    "countOfMdnReceivedStatus": {
      "type": "integer",
      "format": "int32"
    },
    "fileSentOnUtc": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "mdnReceivedOnUtc": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "po997ReceivedOnUtc": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdUtc": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "cancelationReason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "VaxApi.Models.OrderAndShipmentHistoryLineItems": {
      "type": "object",
      "properties": {
        "orderLineItemId": {
          "type": "integer",
          "format": "int64"
        },
        "productId": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "shipmentId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "trackingNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "shipmentLineItemId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "lotNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "doseCount": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "dosesShipped": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "placed": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "approvedDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "batchTime": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "received856Date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "shipmentCreatedTracking": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "canceledOn": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "deliveredDateUtc": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "issue": {
          "type": [
            "string",
            "null"
          ]
        },
        "deliveryStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "packageCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "deliveryNum": {
          "type": [
            "string",
            "null"
          ]
        },
        "distributor": {
          "type": [
            "string",
            "null"
          ]
        },
        "trackingUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "cancelationReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "exceptionMessage": {
          "type": [
            "string",
            "null"
          ]
        },
        "exceptionDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "receivedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "packageLocation": {
          "type": [
            "string",
            "null"
          ]
        },
        "estimatedDeliveryDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  }
}