{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repuso-com/json-schema/repuso-com-review-schema.json",
  "title": "Review",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repuso-com-openapi.json#/components/schemas/Review",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "type": {
      "type": "string",
      "description": "Platform type slug."
    },
    "label": {
      "type": "string",
      "description": "Platform display name."
    },
    "text": {
      "type": "string",
      "description": "Review text as plain text - HTML markup is stripped and line breaks are real newlines. Translated when the `translate` query parameter is used."
    },
    "text_original": {
      "type": "string",
      "description": "Present only when `translate` is used - the untranslated review text."
    },
    "text_language": {
      "type": "string",
      "description": "Present only when `translate` is used - the ISO language code `text` was translated to."
    },
    "sentiment": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "positive",
        "neutral",
        "negative"
      ],
      "description": "Sentiment derived from the review's star rating. Null when the review has no rating."
    },
    "from_name": {
      "type": "string"
    },
    "from_image": {
      "type": "string",
      "format": "uri",
      "description": "Author photo."
    },
    "from_url": {
      "type": "string",
      "format": "uri",
      "description": "Author profile on the platform."
    },
    "post_url": {
      "type": "string",
      "format": "uri",
      "description": "The review on the platform."
    },
    "rating_value": {
      "type": "number"
    },
    "rating_scale": {
      "type": "integer"
    },
    "posted_on": {
      "type": "string"
    },
    "reply": {
      "type": [
        "string",
        "null"
      ],
      "description": "The business owner's public reply, as plain text. Null when there is no reply, or when the platform's replies are not reported."
    },
    "reply_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the owner reply was posted or last edited. Null when there is no reply."
    },
    "has_reply": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the review has an owner reply. Reported for Google reviews (`true` / `false`); `null` for other platforms."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "additional": {
      "type": [
        "object",
        "null"
      ],
      "description": "Additional review inputs collected with the review (custom fields)."
    },
    "media": {
      "type": "array",
      "description": "All attached media.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "src": {
            "type": "string",
            "format": "uri",
            "description": "Playable file for videos, when available."
          }
        }
      }
    }
  }
}