{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaxcare/json-schema/vaxcare-vax-api-api-view-models-returns-create-return-view-model-v2-schema.json",
  "title": "VaxApi.Api.ViewModels.Returns.CreateReturnViewModelV2",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaxcare-openapi.json#/components/schemas/VaxApi.Api.ViewModels.Returns.CreateReturnViewModelV2",
  "required": [
    "returnReason"
  ],
  "type": "object",
  "properties": {
    "boxes": {
      "type": "integer",
      "description": "Number of boxes being requested for the return",
      "format": "int32"
    },
    "pickupTimeStart": {
      "type": [
        "string",
        "null"
      ],
      "description": "Requested pickup time for return",
      "format": "date-time"
    },
    "pickupTimeEnd": {
      "type": [
        "string",
        "null"
      ],
      "description": "Requested Pickup End Time for return",
      "format": "time"
    },
    "groupGuid": {
      "type": "string",
      "description": "Client-generated unique identifier for this group of adjustments",
      "format": "uuid"
    },
    "returnReason": {
      "$ref": "#/$defs/VaxApi.Models.ReturnReason"
    },
    "stock": {
      "$ref": "#/$defs/VaxApi.Models.FundingSource"
    },
    "userName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user initiating the return"
    },
    "userId": {
      "type": "integer",
      "description": "The user initiating the return",
      "format": "int32"
    },
    "returnEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Alternative email for the return"
    },
    "lots": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/VaxApi.Api.ViewModels.Returns.ReturnLotAdjustmentV2"
      },
      "description": "Lots being returned"
    },
    "isDropOffRequested": {
      "type": "boolean",
      "description": "Did the user request package drop-off instead of pick-up"
    },
    "clinicId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The clinicId associated to this return request",
      "format": "int32"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "VaxApi.Api.ViewModels.Returns.ReturnLotAdjustmentV2": {
      "type": "object",
      "properties": {
        "productId": {
          "type": "integer",
          "description": "Healthsystems product catalog id.",
          "format": "int64"
        },
        "lotNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Lot number of product being returned"
        },
        "lotExpirationDate": {
          "type": "string",
          "description": "Expiration date for the supplied lot number",
          "format": "date-time"
        },
        "count": {
          "type": "integer",
          "description": "Specific number of this lot being returned",
          "format": "int32"
        },
        "receiptKey": {
          "type": "string",
          "description": "Client-generated unique identifier for this specific inventory adjustments",
          "format": "uuid"
        }
      },
      "additionalProperties": false
    },
    "VaxApi.Models.FundingSource": {
      "enum": [
        1,
        2,
        3,
        4
      ],
      "type": "integer",
      "format": "int32"
    },
    "VaxApi.Models.ReturnReason": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12
      ],
      "type": "integer",
      "format": "int32"
    }
  }
}