{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "openrtb-v1_0-schema-bid_response",
    "description": "json schema for an openrtb v1.0 bid response (http://openrtb.googlecode.com/files/OpenRTB%20Mobile%20RTB%20API%20-%201.0.pdf)",
    "type": "object",
    "required": [
        "id"
    ],
    "additionalProperties": false,
    "properties": {
        "id": {
            "$ref": "#/definitions/string_40"
        },
        "bidid": {
            "$ref": "#/definitions/string_40"
        },
        "nbr": {
            "$ref": "#/definitions/no_bid_reason"
        },
        "cur": {
            "$ref": "#/definitions/currency"
        },
        "units": {
            "$ref": "#/definitions/price_units"
        },
        "seatbid": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/seatbid"
            }
        }
    },
    "definitions": {
        "seatbid": {
            "type": "object",
            "required": [
                "bid"
            ],
            "additionalProperties": false,
            "properties": {
                "seat": {
                    "$ref": "#/definitions/string_40"
                },
                "group": {
                    "$ref": "#/definitions/boolean_int"
                },
                "bid": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/bid"
                    }
                }
            }
        },
        "bid": {
            "type": "object",
            "required": [
                "impid",
                "price"
            ],
            "additionalProperties": false,
            "properties": {
                "impid": {
                    "$ref": "#/definitions/string_40"
                },
                "price": {
                    "type": "number",
                    "minimum": 0
                },
                "adid": {
                    "$ref": "#/definitions/string_40"
                },
                "nurl": {
                    "type": "string",
                    "maxLength": 256
                },
                "adm": {
                    "type": "string",
                    "maxLength": 1024
                },
                "adomain": {
                    "type": "string"
                },
                "iurl": {
                    "type": "string"
                },
                "cid": {
                    "type": "string"
                },
                "crid": {
                    "type": "string"
                },
                "attr": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/creative_attribute"
                    }
                }
            }
        },
        "creative_attribute": {
            "type": "integer",
            "minimum": 1,
            "maximum": 14
        },
        "price_units": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2
        },
        "no_bid_reason": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3
        },
        "boolean_int": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1
        },
        "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 4
        },
        "string_40": {
            "type": "string",
            "maxLength": 40
        }
    }
}