{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/Feed",
  "definitions": {
    "StreamingService": {
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "My Example Streaming Service"
          ],
          "description": "The name of the streaming service that will show up on JustWatch. This should be the name you use in your marketing materials."
        },
        "url": {
          "type": "string",
          "examples": [
            "https://www.example.com"
          ],
          "description": "The website of the streaming service."
        },
        "application_stores": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/ApplicationStore"
          },
          "type": "array"
        },
        "application_packages": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/ApplicationPackage"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Feed": {
      "required": [
        "streaming_service",
        "contents"
      ],
      "properties": {
        "streaming_service": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "$ref": "#/definitions/StreamingService"
        },
        "contents": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/Movie"
              },
              {
                "$ref": "#/definitions/Show"
              },
              {
                "$ref": "#/definitions/Season"
              },
              {
                "$ref": "#/definitions/Episode"
              },
              {
                "$ref": "#/definitions/SportEvent"
              }
            ]
          }
        },
        "last_modified": {
          "type": "string",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ],
          "description": "The date and time of when the feed was last generated."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "AlternateID": {
      "required": [
        "key",
        "id"
      ],
      "properties": {
        "key": {
          "type": "string",
          "minLength": 1,
          "pattern": "(imdb|tmdb|eidr)",
          "examples": [
            "imdb",
            "tmdb"
          ],
          "description": "This is the type of alternate ID you are providing. This is used to help us with matching your content more accurately. At the moment we support tmdb, imdb and eidr IDs. We can expand this if you have specifc need. Contact us"
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "tt123456"
          ],
          "description": "This contains the third party ID you want to submit."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CrewMember": {
      "required": [
        "role",
        "full_name"
      ],
      "properties": {
        "role": {
          "type": "string",
          "minLength": 1,
          "pattern": "(director|actor|writer|producer)",
          "examples": [
            "director",
            "actor"
          ],
          "description": "The role of crew member"
        },
        "full_name": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "John Doe"
          ],
          "description": "The full name of the actor or director."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Deeplink": {
      "required": [
        "platform",
        "value"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "pattern": "(android_mobile|android_tv|fire_tv|ios_mobile|tv_os|web_os|tizen_os)",
          "examples": [
            "android_tv",
            "web_os"
          ],
          "description": "The platform the deeplink will be used on."
        },
        "value": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "{\"id\": \"com.example.tv\", \"params\": {\"contentTarget\": \"https://example.com/details/some-movie&id=123\"}}"
          ],
          "description": "The deeplink value used to select a specific piece of content in your app. See deeplink section in the documentation: https://apis.justwatch.com/docs/streaming_service for more information."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Image": {
      "required": [
        "url",
        "image_type",
        "language"
      ],
      "properties": {
        "url": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "https://www.example.com/images/123/poster.jpg"
          ],
          "description": "The URL to the image file."
        },
        "image_type": {
          "type": "string",
          "pattern": "(poster|banner|backdrop)",
          "description": "Type of the image, a poster and banner usually has the title of the movie or show displayed. Poster has height > width and a banner has width > height. A backdrop usually doesn't contain text and is language independent."
        },
        "width": {
          "type": "integer",
          "examples": [
            "500"
          ],
          "description": "The width of the image in px."
        },
        "height": {
          "type": "integer",
          "examples": [
            "500"
          ],
          "description": "The height of the image in px."
        },
        "language": {
          "type": "string",
          "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
          "examples": [
            "de",
            "en",
            "es-419",
            "fr-CA"
          ],
          "description": "Language code for a poster or banner or backdrop. If an image doesn't have a language (backdrop with no text) use xx."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "LocalizedEntry": {
      "required": [
        "language",
        "value"
      ],
      "properties": {
        "language": {
          "type": "string",
          "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
          "examples": [
            "de",
            "en",
            "es-419",
            "fr-CA"
          ],
          "description": "Language code for a localized entry."
        },
        "value": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Movie": {
      "required": [
        "id",
        "object_type",
        "localized_titles",
        "localized_descriptions",
        "offers"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "The ID that uniquely identifies a content on the streaming service."
        },
        "object_type": {
          "type": "string",
          "pattern": "(movie)"
        },
        "original_title": {
          "type": "string"
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "original_description": {
          "type": "string"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "release_year": {
          "type": "integer"
        },
        "release_date": {
          "type": "string",
          "format": "date",
          "examples": [
            "2019-09-18"
          ]
        },
        "alternate_ids": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/AlternateID"
          },
          "type": "array"
        },
        "crew_members": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/CrewMember"
          },
          "type": "array"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "offers": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Offer"
          },
          "type": "array"
        },
        "runtime": {
          "type": "integer",
          "minimum": 1,
          "description": "Runtime of a title in minutes."
        },
        "is_original": {
          "type": "boolean",
          "description": "Indicates if the title is streaming service's original content."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Offer": {
      "required": [
        "quality",
        "monetization_type"
      ],
      "oneOf": [
        {
          "required": ["countries_configuration"]
        },
        {
          "required": ["country_iso"]
        }
      ],
      "properties": {
        "web_url": {
          "type": "string"
        },
        "deeplinks": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Deeplink"
          },
          "type": "array"
        },
        "quality": {
          "type": "string",
          "pattern": "(sd|hd|4k)",
          "description": "Video quality or resolution. sd is anything less than 720p. hd is any resolution equal to or greater than 720p and less than 4k. 4k if it is 2160p",
          "examples": [
            "sd",
            "hd",
            "4k"
          ]
        },
        "monetization_type": {
          "type": "string",
          "pattern": "(buy|rent|free|ads|flatrate|fast|cinema)",
          "examples": [
            "buy",
            "rent"
          ],
          "description": "Monetization type of the availability information. We support buy, rent, free, ads(free with ads), flatrate(subscription), fast(free ad-supported tv) and cinema (theatrical releases)."
        },
        "currency": {
          "type": [
            "string"
          ],
          "pattern": "[A-Z]{3}",
          "examples": [
            "USD",
            "EUR"
          ],
          "description": "Three letter ISO code for currency. This is required for all offers."
        },
        "countries_configuration": {
          "$ref": "#/definitions/CountryConfiguration",
          "description": "Defines the geo availability of the offer"
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        },
        "price": {
          "type": "number",
          "description": "Price is mandatory for rent and buy offers"
        },
        "available_from": {
          "type": "string",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "available_to": {
          "type": "string",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "package": {
          "type": "string",
          "description": "If a streaming service has multiple packages (free, premium, ad free) add information about where this piece of content is available here. If the service only has one package, leave this empty."
        },
        "audio_languages": {
          "items": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
            "examples": [
              "de",
              "en",
              "es-419",
              "fr-CA"
            ],
            "description": "Audio language for a title. An ISO 639-1/639-3 language code, optionally followed by a BCP 47 subtag for region or script, e.g. es-419, fr-CA."
          },
          "type": "array"
        },
        "subtitle_languages": {
          "items": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
            "examples": [
              "de",
              "en",
              "es-419",
              "fr-CA"
            ],
            "description": "Subtitle language for a title. An ISO 639-1/639-3 language code, optionally followed by a BCP 47 subtag for region or script, e.g. es-419, fr-CA."
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CountryConfiguration": {
      "type": "object",
      "properties": {
        "is_global": {
          "type": "boolean",
          "description": "If true, include all except exclude_isos"
        },
        "include_isos": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2 country code"
          },
          "description": "List of countries where the offer is available in. If 'is_global' is true, this field is ignored.",
          "minItems": 1
        },
        "exclude_isos": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2 country code"
          },
          "description": "List of countries where the offer is not available in, used in combination with 'is_global' field.",
          "minItems": 1
        }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "properties": {
            "is_global": {
              "const": true
            },
            "exclude_isos": {},
            "include_isos": false
          },
          "required": ["is_global"],
          "description": "Global offer with optional exclusions"
        },
        {
          "properties": {
            "include_isos": {},
            "is_global": false,
            "exclude_isos": false
          },
          "required": ["include_isos"],
          "description": "Country-specific offer without exclusions"
        }
      ],
      "description": "Defines the geo availability configuration of the offer"
    },
    "Episode": {
      "required": [
        "id",
        "object_type",
        "offers",
        "show_id",
        "season_number",
        "episode_number"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "object_type": {
          "type": "string",
          "pattern": "(episode)"
        },
        "original_title": {
          "type": "string"
        },
        "localized_titles": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "original_description": {
          "type": "string"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "release_year": {
          "type": "integer"
        },
        "release_date": {
          "type": "string",
          "format": "date",
          "examples": [
            "2019-09-18"
          ]
        },
        "alternate_ids": {
          "items": {
            "$ref": "#/definitions/AlternateID"
          },
          "type": "array"
        },
        "crew_members": {
          "items": {
            "$ref": "#/definitions/CrewMember"
          },
          "type": "array"
        },
        "images": {
          "items": {
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "offers": {
          "items": {
            "$ref": "#/definitions/Offer"
          },
          "type": "array"
        },
        "show_id": {
          "type": "string",
          "minLength": 1
        },
        "season_number": {
          "type": "integer",
          "minimum": 1
        },
        "episode_number": {
          "type": "integer",
          "minimum": 1
        },
        "runtime": {
          "type": "integer",
          "minimum": 1,
          "description": "Runtime of a title in minutes."
        },
        "is_original": {
          "type": "boolean",
          "description": "Indicates if the title is streaming service's original content."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Season": {
      "required": [
        "id",
        "object_type",
        "show_id",
        "season_number"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "object_type": {
          "type": "string",
          "pattern": "(season)"
        },
        "original_title": {
          "type": "string"
        },
        "localized_titles": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "original_description": {
          "type": "string"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "release_year": {
          "type": "integer"
        },
        "release_date": {
          "type": "string",
          "format": "date",
          "examples": [
            "2019-09-18"
          ]
        },
        "alternate_ids": {
          "items": {
            "$ref": "#/definitions/AlternateID"
          },
          "type": "array"
        },
        "crew_members": {
          "items": {
            "$ref": "#/definitions/CrewMember"
          },
          "type": "array"
        },
        "images": {
          "items": {
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "offers": {
          "items": {
            "$ref": "#/definitions/Offer"
          },
          "type": "array"
        },
        "show_id": {
          "type": "string",
          "minLength": 1
        },
        "season_number": {
          "type": "integer",
          "minimum": 1
        },
        "episodes": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Episode"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Show": {
      "required": [
        "id",
        "object_type",
        "localized_titles"
      ],
      "properties": {
        "id": {
          "type": "string",
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "The ID that uniquely identifies a content on the streaming service."
        },
        "object_type": {
          "type": "string",
          "pattern": "(show)"
        },
        "original_title": {
          "type": "string",
          "examples": [
            "F1: Drive to Survive"
          ],
          "description": "The original title of the show. This is the title that the show was originally released under."
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "original_description": {
          "type": "string",
          "examples": [
            "This is a show about Formula 1"
          ],
          "description": "The original title of the show. This is the title that the show was originally released under."
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "release_year": {
          "type": "integer",
          "examples": [
            2019
          ],
          "description": "The release year when the first season of this show aired or got released."
        },
        "release_date": {
          "type": "string",
          "format": "date",
          "examples": [
            "2019-09-18"
          ],
          "description": "The release date when the first season of this show aired or got released."
        },
        "alternate_ids": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/AlternateID"
          },
          "type": "array"
        },
        "crew_members": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/CrewMember"
          },
          "type": "array"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "offers": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Offer"
          },
          "type": "array"
        },
        "seasons": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Season"
          },
          "type": "array",
          "description": "If you are using the nested way of submitting seasons this should contain your seasons."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportEvent": {
      "required": [
        "id",
        "object_type",
        "localized_titles",
        "sport",
        "competition",
        "competitors",
        "start_at",
        "status",
        "offers"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "The ID that uniquely identifies a content on the streaming service."
        },
        "object_type": {
          "type": "string",
          "pattern": "(sport_event)"
        },
        "original_title": {
          "type": "string",
          "description": "Title or name of the sport event."
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "original_description": {
          "type": "string"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "sport": {
          "type": "string",
          "description": "name of the sport",
          "pattern": "(Football|Tennis|American Football|Baseball|Basketball|Formula Racing|NASCAR|Hockey|Ice Hockey|Eports|Cricket)"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "start_at": {
          "type": "string",
          "description": "The schduled start time of the sport event",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "end_at": {
          "type": "string",
          "description": "The schduled end time of the sport event",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "status": {
          "type": "string",
          "description": "Status of the sport event",
          "pattern": "(upcoming|in_progress|finished)"
        },
        "competition": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportCompetition"
          },
          "type": "object"
        },
        "competitors": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportCompetitor"
          },
          "type": "array"
        },
        "venue": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportVenue"
          },
          "type": "object"
        },
        "offers": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportOffer"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportCompetition": {
      "required": [
        "localized_titles",
        "season"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "Optional ID of the sport competition"
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "gender": {
          "type": "string",
          "description": "The gender of the competition if relevant: men, women, mixed",
          "pattern": "(men|women|mixed)"
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        },
        "season": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportSeason"
          },
          "description": "Details about the season of a competition",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportSeason": {
      "required": [
        "localized_titles"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "2020",
            "21/22",
            "2022"
          ],
          "description": "Optional ID of the sport season"
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "start_at": {
          "type": "string",
          "description": "The schduled start time of the sport season",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "end_at": {
          "type": "string",
          "description": "The schduled end time of the sport season",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportVenue": {
      "required": [
        "id",
        "localized_titles",
        "country_iso"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "Option ID of the Sport Venue"
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "Berlin",
            "Paris",
            "London"
          ],
          "description": "Name of the city where the Venue is located"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportCompetitor": {
      "required": [
        "id",
        "localized_titles"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "123",
            "id567",
            "unique-slug-2020"
          ],
          "description": "Option ID of the Sport Competitor"
        },
        "localized_titles": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "localized_descriptions": {
          "items": {
            "$ref": "#/definitions/LocalizedEntry"
          },
          "type": "array"
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        },
        "results": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportResult"
          },
          "type": "array"
        },
        "winner": {
          "type": "boolean",
          "description": "Indicates if the competitor is a winner"
        },
        "competitors": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/SportCompetitor",
            "description": "Competitors (Optional): None or multiple sport competitors that have one parent competitor. In case of football that would be many players, in case of a tennis double that would be two players."
          },
          "type": "array"
        },
        "gender": {
          "type": "string",
          "description": "The gender of the competitor if relevant: men, women, mixed",
          "pattern": "(men|women|mixed)"
        },
        "images": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Image"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportOffer": {
      "required": [
        "quality",
        "monetization_type"
      ],
      "oneOf": [
        {
          "required": ["countries_configuration"]
        },
        {
          "required": ["country_iso"]
        }
      ],
      "properties": {
        "web_url": {
          "type": "string"
        },
        "deeplinks": {
          "items": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "$ref": "#/definitions/Deeplink"
          },
          "type": "array"
        },
        "quality": {
          "type": "string",
          "pattern": "(sd|hd|4k)",
          "description": "Video quality or resolution. sd is anything less than 720p. hd is any resolution equal to or greater than 720p and less than 4k. 4k if it is 2160p",
          "examples": [
            "sd",
            "hd",
            "4k"
          ]
        },
        "monetization_type": {
          "type": "string",
          "pattern": "(buy|rent|free|ads|flatrate|fast|cinema)",
          "examples": [
            "buy",
            "rent"
          ],
          "description": "Monetization type of the availability information. We support buy, rent, free, ads(free with ads), flatrate(subscription), fast(free ad-supported tv) and cinema (theatrical releases)."
        },
        "currency": {
          "type": [
            "string"
          ],
          "pattern": "[A-Z]{3}",
          "examples": [
            "USD",
            "EUR"
          ],
          "description": "Three letter ISO code for currency. This is required for all offers."
        },
        "countries_configuration": {
          "$ref": "#/definitions/CountryConfiguration",
          "description": "Defines the geo availability of the offer"
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        },
        "price": {
          "type": "number",
          "description": "Price is mandatory for rent and buy offers"
        },
        "available_from": {
          "type": "string",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "available_to": {
          "type": "string",
          "format": "date-time",
          "examples": [
            "2018-11-13T20:20:39+00:00"
          ]
        },
        "package": {
          "type": "string",
          "description": "If a streaming service has multiple packages (free, premium, ad free) add information about where this piece of content is available here. If the service only has one package, leave this empty."
        },
        "audio_languages": {
          "items": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
            "examples": [
              "de",
              "en",
              "es-419",
              "fr-CA"
            ],
            "description": "Audio language for a title. An ISO 639-1/639-3 language code, optionally followed by a BCP 47 subtag for region or script, e.g. es-419, fr-CA."
          },
          "type": "array"
        },
        "subtitle_languages": {
          "items": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
            "examples": [
              "de",
              "en",
              "es-419",
              "fr-CA"
            ],
            "description": "Subtitle language for a title. An ISO 639-1/639-3 language code, optionally followed by a BCP 47 subtag for region or script, e.g. es-419, fr-CA."
          },
          "type": "array"
        },
        "sport_object_type": {
          "type": "string",
          "pattern": "(main_event|highlight|interview)",
          "examples": [
            "main_event",
            "highlight"
          ],
          "description": "The type of object the offer is for. This can be main_event for full live event, highlight for short highlight, interview for interview/talk show about the event"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SportResult": {
      "required": [],
      "properties": {
        "quantifier": {
          "type": "string",
          "pattern": "(home|away)",
          "description": "This could be home / away."
        },
        "score": {
          "type": "integer",
          "description": "This is a generic result field, could be a goal, or the final result of a tennis match."
        },
        "position": {
          "type": "integer",
          "description": "This is a generic result field for e.g. a motorsport event."
        },
        "time": {
          "type": "integer",
          "description": "This is a generic result field for a sport where the time is the end result."
        },
        "type": {
          "type": "string",
          "description": "This is the type of the result, this can be used to differentiate if there's multiple results for an event like a sets in a Tennis match or round names of F1"
        },
        "number": {
          "type": "integer",
          "description": "This can be used to differentiate different results for the same event. Example: Set 1, Set 2 in a Tennis match."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ApplicationPackage": {
      "required": [
        "platform",
        "name",
        "country_iso"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "pattern": "(android_mobile|android_tv|fire_tv|ios_mobile|tv_os|web_os|tizen_os)"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "https://apps.apple.com/us/app/justwatch-movies-tv-shows/id979227482"
          ],
          "description": "The package name of your application on a specific platform. This will be used for deeplinking on some platforms."
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ApplicationStore": {
      "required": [
        "platform",
        "url",
        "country_iso"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "pattern": "(google|apple|amazon|lg|samsung)",
          "examples": [
            "apple",
            "google",
            "lg"
          ],
          "description": "The platform of the app store where the application is available."
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "https://apps.apple.com/us/app/justwatch-movies-tv-shows/id979227482"
          ],
          "description": "A URL pointing to the mobile or tv app in the app store of a specific platform."
        },
        "country_iso": {
          "type": "string",
          "pattern": "[A-Z]{2}"
        }
      },
      "additionalProperties": false,
      "type": "object"
    }
  }
}