{
    "$schema": "http://json-schema.org/draft-03/schema",
    "additionalProperties": false,
    "properties": {
        "product_code": {
            "type": "string",
            "required": true,
            "pattern": "^[a-zA-Z\\d]*$",
            "minLength": 1,
            "maxLength": 14,
            "description": "This is mapped to releases.product_code internally"
        },
        "distribution_format_id": {
            "required": true,
            "type": "integer",
            "description": "PK for `distribution_format` table"
        },
        "distribution_format_media_id": {
            "required": true,
            "type": "integer",
            "description": "ID mapping to a distribution format media type"
        },
        "distribution_format_media_format_id": {
            "required": false,
            "type": "integer",
            "format": "distributionFormatMediaFormatId",
            "description": "ID mapping to a distribution format media format"
        },
        "units_per_set": {
            "required": true,
            "type": "integer",
            "minimum": 1,
            "maximum": 255,
            "description": "The number of units in one product, i.e. a dual-disc vinyl would be 2 \"units per set\"."
        },
        "display_configuration": {
            "required": true,
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Display configuration of a physical product e.g.: 2 x CD + Viking Ship."
        },
        "packaging_id": {
            "required": true,
            "type": "integer",
            "description": "The type of packing this product will be distributed in."
        },
        "orchard_pricing_tier": {
            "required": false,
            "type": "integer",
            "minimum": 1,
            "description": "Orchard Pricing Tier"
        },
        "wholesale_price": {
            "required": false,
            "type": "number",
            "maximum": 9999.99,
            "minimum": 0,
            "description": "Wholesale price (e.g.: 5.99)."
        },
        "box_lot": {
            "required": true,
            "type": "integer",
            "minimum": 1,
            "description": "Quantity field in `product_physical` representing number of this product in one box."
        },
        "initial_stock": {
            "required": true,
            "type": "integer",
            "description": "Quantity field in `product_physical` representing initial quantity of this product."
        },
        "japan_distribution": {
            "type": "string",
            "enum": ["no", "yes_only", "yes_other"],
            "description": "Whether this product will be distributed to Japan only, to Japan and some other territories or not distributed to Japan"
        },
        "edition": {
            "type": ["string", "null"],
            "enum": [
                "normal_edition",
                "first_run_limited_edition",
                "initial_limited_edition",
                "limited_edition",
                "period_limited_edition",
                null
            ],
            "description": "The packaging edition for this product."
        }
    },
    "required": true,
    "type": "object"
}
