{
    "$schema": "http://json-schema.org/draft-03/schema",
    "additionalProperties": false,
    "properties": {
        "artist_is_individual": {
            "required": true,
            "type": "string",
            "enum": [
                "Y",
                "N"
            ],
            "description": "Is the primary artist an individual or a band/group."
        },
        "cline": {
            "required": true,
            "pattern": "^[0-9]{4}(\\s\\w+)+",
            "type": "string",
            "description": "The copyright line e.g.: 1986 Record Label."
        },
        "pline": {
            "required": true,
            "pattern": "^[0-9]{4}(\\s\\w+)+",
            "type": "string",
            "minLength": 1,
            "description": "Stands for 'Publishing line' and is a metadata field associated with all products."
        },
        "project_id": {
            "required": true,
            "type": "integer",
            "minimum": 1,
            "description": "PK from the `project` table used to group this product."
        },
        "product_name": {
            "required": true,
            "type": "string",
            "maxLength": 255,
            "description": "This is mapped to releases.release_name internally."
        },
        "product_code": {
            "type": "string",
            "required": true,
            "minLength": 1,
            "maxLength": 14,
            "description": "This is mapped to releases.product_code internally"
        },
        "display_upc": {
            "type": "string",
            "format": "upc",
            "pattern": "^\\d*$",
            "maxLength": 13,
            "minLength": 12,
            "description": "UPC associated with this product."
        },
        "assign_display_upc": {
            "type": "boolean",
            "description": "Used to set display_upc to an orchard assigned value."
        },
        "label": {
            "required": true,
            "type": "string",
            "maxLength": 70,
            "description": "The imprint / label"
        },
        "primary_artist": {
            "required": true,
            "type": "string",
            "description": "This is mapped to release_artist.artist_name, entered as input text"
        },
        "version": {
            "required": false,
            "type": "string",
            "maxLength": 255,
            "description": "Optional version name for this release."
        },
        "genre_id": {
            "required": true,
            "type": "integer",
            "description": "Maps to `genre_id` from the `genre` table."
        },
        "subgenre_id": {
            "required": true,
            "type": "integer",
            "description": "Maps to `orchard_id` from the `subgenre` table."
        },
        "release_date": {
            "required": true,
            "type": "string",
            "description": "String representation of date. YYYY-MM-DD",
            "pattern": "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\\d|3[0-1])$"
        },
        "sale_start_date": {
            "required": true,
            "type": "string",
            "description": "String representation of date. YYYY-MM-DD",
            "pattern": "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\\d|3[0-1])$"
        },
        "product_type": {
            "required": true,
            "type": "string",
            "pattern": "^(New|Catalog)$",
            "description": "This is `new_release` in the `release` table. E.g.: 'New', 'Catalog'"
        },
        "distribution_format_id": {
            "required": true,
            "type": "integer",
            "description": "PK for `distribution_format` table"
        },
        "packaging_id": {
            "required": true,
            "type": "integer",
            "description": "PK for `product_physical_packaging`, stored in `product_physical`, describing the type of packing this product will be distributed in."
        },
        "exclusive_for": {
            "required": false,
            "type": "string",
            "maxLength": 128,
            "description": "Varchar field in `product_physical`, describing any exclusivity information for this product."
        },
        "initial_stock": {
            "required": true,
            "type": "integer",
            "description": "Quantity field in `product_physical` representing initial quantity of this product."
        },
        "box_lot": {
            "required": true,
            "type": "integer",
            "description": "Quantity field in `product_physical` representing number of this product in one box."
        },
        "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\"."
        },
        "pricing": {
            "required": false,
            "type": "number",
            "maximum": 9999.99,
            "minimum": 0,
            "description": "Suggested retail price (e.g.: 9.99)."
        },
        "end_date": {
            "required": false,
            "type": "string",
            "description": "String representation of date. YYYY-MM-DD this is a discount end date"
        },
        "discount": {
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "String field in `product_physical` describing a percentage and details of a discount between 0 and 100"
        },
        "special_instructions": {
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "Open text field which contains operational information for Digital and Physical products."
        },
        "production_notes": {
            "required": false,
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "Save notes around the manufacturing and production of your product."
        },
        "explicit": {
            "required": true,
            "type": "string",
            "enum": [
                "Y",
                "N"
            ],
            "description": "Sets if a product is explicit."
        },
        "manufacturing_obligation": {
            "type": "string",
            "enum": [
                "Y",
                "N"
            ],
            "description": "Indicates if the product is has a manufacturing obligation."
        },
        "description": {
            "minLength": 1,
            "maxLength": 1400,
            "type": "string",
            "description": "Short summary of the release."
        },
        "product_highlights": {
           "minLength": 1,
           "type": "string",
           "description": "Any product highlights and sales notes, including relevant information for sales reps. Things like: co-op spend, extra content, extra content description, similar artists, etc."
        },
        "display_configuration": {
            "required": true,
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Display configuration of a physical product e.g.: 2 x CD + Viking Ship."
        },
        "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."
        },
        "country_of_origin": {
            "required": true,
            "type": "integer",
            "description": "Indicate where product is manufactured."
        }
    },
    "required": true,
    "type": "object"
}
