{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crunchtime-information-systems/json-schema/crunchtime-information-systems-package-type-v2-details-list-schema.json",
  "title": "PackageTypeV2DetailsList",
  "description": "PackageTypeV2DetailsList description",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crunchtime-information-systems-package-type-service-api-openapi.yml#/components/schemas/PackageTypeV2DetailsList",
  "type": "object",
  "required": [
    "locationCode"
  ],
  "properties": {
    "locationCode": {
      "type": "string",
      "description": "\"Code\" from Company setup screen."
    },
    "packageTypeDetails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PackageTypeV2Details"
      }
    }
  },
  "$defs": {
    "PackageTypeDetailDto": {
      "type": "object",
      "required": [
        "packageDescription",
        "packageType"
      ],
      "properties": {
        "ediUnitCode": {
          "type": "string",
          "description": "\"EDI Unit Code\" from Package Types setup screen. This field can be used to link a unit code used in Xchange to an existing Package Type in Enterprise Manager."
        },
        "packageDescription": {
          "type": "string",
          "description": "\"Package Description\" from Package Types setup screen. Must not exceed 25 characters. No Duplicate package type descriptions allowed."
        },
        "packageInventory": {
          "type": "string",
          "description": "\"Inventory\" Package flag from Package Types setup screen. It can be selected as an Inventory Unit, Issue Unit, Alternate Count Unit, Weight Unit, and Volume Unit for a Company Product; as an Alternate Count Unit for a Location Product; and as a Weight Unit and Volume Unit for a Recipe's Company Product record. Must have at least one Package Type in the database with a Package Inventory value of ‘Y’ after all updates, including creates."
        },
        "packageLineCheck": {
          "type": "string",
          "description": "\"Line Check\" Package flag from Package Types setup screen. It can be associated with products being monitored in the Line Check mobile application and/or as the Default Storage Container for a recipe."
        },
        "packagePurchasing": {
          "type": "string",
          "description": "\"Purchasing\" Package flag from Package Types setup screen. It can be selected as Primary or Secondary Vendor Unit for a Vendor Bid, and as a Preferred Vendor Pack Type for a Company Product or a Recipe's Company Product record. Must have at least one Package Type in the database with a Package Purchasing value of ‘Y’ after all updates, including creates."
        },
        "packageRecipe": {
          "type": "string",
          "description": "\"Recipe\" Package flag from Package Types setup screen. It can be selected as a Recipe Unit for a Company Product; a Batch Unit, Portion Unit, Issue Unit and Recipe Unit for a Recipe; and as an Inventory Unit, Issue Unit, and Alternate Count Unit for a Recipe's Company Product record. Must have at least one Package Type in the database with a Package Recipe value of ‘Y’ after all updates, including creates."
        },
        "packageType": {
          "type": "string",
          "description": "\"Package Type\" name from Package Types setup screen. This is the field used to determine if a new package type is added or an existing package type is updated. Must not exceed 20 characters. Must not have duplicate field in other records in the file"
        }
      },
      "title": "PackageTypeDetailDto",
      "description": "PackageTypeDetailDto description"
    },
    "PackageTypeV2Details": {
      "type": "object",
      "properties": {
        "packageTypeDetailDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageTypeDetailDto"
          }
        }
      },
      "title": "PackageTypeV2Details",
      "description": "PackageTypeV2Details description"
    }
  }
}