{
    "$schema" : "http://json-schema.org/draft-04/schema#",
    "title" : "CouponDetails",
    "type" : "object",
    "additionalProperties" : false,
    "description" : "TAnalytics-v2 .. Log when user clicks on a specific coupon to get the details page",
    "properties" : {
        "log_context" : {
            "$ref" : "/resources/schema/analytics/client/v2/LogContext.json",
            "description" : "Required Log Context Reference"
        },
	"event_name":{
	    "type": "string",
	    "enum": ["COUPON_DETAILS"]		
	},
	"schema_definition":{
	    "type": "string",
	    "enum": ["CouponDetails"]
	},
        "coupon_list" : {
            "type" : "array",
            "items" : {
                "$ref" : "/resources/schema/analytics/client/v2/CouponListItem.json"
            },
            "minItems" : 1,
            "uniqueItems" : true,
            "description" : "Required List of Coupon IDs, Positions on Screen"
        },
        "distance" : {
            "type" : "number",
            "description" : "Required .. Calculated distance displayed for the selected destination on the details page, in miles."
        },
        "merchant_id" : {
            "type" : "string",
            "description" : "Merchant ID that references the business"
        },
        "entity_id" : {
            "type" : "string",
            "description" : "Entity ID of the POI for which the coupon is displayed."
        },
        "business_name" : {
            "type" : "string",
            "description" : "Required .. Name of the business offering the coupons"
        },
	"dest_lat":{
	    "type":"number",
            "description":"Required .. Latitude of destination."
	},
	"dest_lon":{
            "type":"number",
            "description":"Required .. Longitude of destination."
	},
        "category" : {
            "type" : "string",
            "description" : "Category of the POI offering coupon"
        },
        "total_saving" : {
            "type" : "number",
            "description" : "EstimatedSavings"
        },
        "search_id" : {
            "type" : "string",
            "description" : "The LogID of the Search from which this result was selected to view details"
        },
        "iid" : {
            "type" : "string",
            "description" : "The impression ID of the search result that was selected"
        }
    },
    "required" : [
        "log_context",
        "event_name",
        "schema_definition",
        "coupon_list",
        "distance",
        "business_name",
        "dest_lat",
        "dest_lon"
    ]
}