{
  "id": "cta.json",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Call to action",
  "description": "An HTML representing a call to action with the verb which defines the action, a tagged price and some measurement data",
  "type": [
    "object"
  ],
  "properties": {
    "type": {
      "description": "Block type",
      "example": "text",
      "type": "string",
      "enum": [
        "cta"
      ]
    },
    "html": {
      "description": "HTML content of the block",
      "example": "<a href=\"https://link.com/\" data-role=\"cta\">Call to action!</a>",
      "type": "string",
      "minLength": 7
    },
    "verb": {
      "description": "A verb that defines the action",
      "example": "purchase",
      "type": "string"
    },
    "url": {
      "description": "URL for external CTAs",
      "$ref": "base.json#/definitions/url"
    },
    "cta": {
      "description": "The Grid Reserve CTA associated with the entry",
      "$ref": "base.json#/definitions/uuid"
    },
    "price": {
      "description": "A tagged price, in USD cents",
      "example": "9600",
      "type": "string"
    },
    "label": {
      "description": "Extracted text from the HTML",
      "example": "Buy now",
      "type": "string"
    },
    "length": {
      "description": "Lenght of the extracted text",
      "example": 7,
      "type": "integer"
    }
  },
  "required": [
    "type",
    "html"
  ]
}