{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loppee-com/json-schema/loppee-com-business-index-schema.json",
  "title": "BusinessIndex",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loppee-com-openapi.json#/components/schemas/BusinessIndex",
  "type": "object",
  "additionalProperties": false,
  "dependentRequired": {
    "page_limit": [
      "next_cursor"
    ],
    "next_cursor": [
      "page_limit"
    ]
  },
  "required": [
    "schema_version",
    "trust_model_version",
    "registry_name",
    "generated_at",
    "public_base_url",
    "search_url",
    "recommend_url",
    "trust_card_pattern",
    "domain_lookup_pattern",
    "publishing_rule",
    "businesses"
  ],
  "properties": {
    "schema_version": {
      "const": "3.0"
    },
    "trust_model_version": {
      "const": "v3"
    },
    "registry_name": {
      "const": "Loppee"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "page_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "next_cursor": {
      "type": "string",
      "minLength": 1
    },
    "public_base_url": {
      "type": "string"
    },
    "search_url": {
      "type": "string"
    },
    "recommend_url": {
      "type": "string"
    },
    "trust_card_pattern": {
      "type": "string"
    },
    "domain_lookup_pattern": {
      "type": "string"
    },
    "publishing_rule": {
      "type": "string"
    },
    "businesses": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "business_id",
          "display_name",
          "domain",
          "category",
          "city",
          "state",
          "website",
          "phone",
          "trust_model_version",
          "verification_class",
          "verification_disclosure",
          "review_reputation",
          "trust_card_url",
          "public_profile_url"
        ],
        "properties": {
          "business_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owner-published street address where authorized. Registry candidates return an empty string; withheld data must not be inferred as a missing source address."
          },
          "zip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owner-published postal code where authorized. Registry candidates return an empty string; city/state remain public."
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "trust_model_version": {
            "const": "v3"
          },
          "verification_class": {
            "type": "string",
            "enum": [
              "verified",
              "listed"
            ]
          },
          "verification_disclosure": {
            "type": "string",
            "enum": [
              "Loppee completed this business's registration and professional license checks.",
              "Loppee completed this business's registration checks.",
              "Owner confirmed by Loppee.",
              "Recommended by customers. NOT verified by Loppee.",
              "Listed on Loppee. NOT verified by Loppee."
            ]
          },
          "review_reputation": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "display_rating",
              "display_review_count",
              "verified_review_count",
              "ranking",
              "identity_verified_review_count",
              "quality_rating"
            ],
            "properties": {
              "display_rating": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 1,
                "maximum": 5
              },
              "display_review_count": {
                "type": "integer",
                "minimum": 0
              },
              "verified_review_count": {
                "type": "integer",
                "minimum": 0
              },
              "ranking": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "status",
                      "basis",
                      "half_star_band",
                      "explanation"
                    ],
                    "properties": {
                      "status": {
                        "const": "quality_ranked"
                      },
                      "basis": {
                        "const": "identity_verified_reviewer_reviews"
                      },
                      "half_star_band": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 5,
                        "multipleOf": 0.5
                      },
                      "explanation": {
                        "const": "Ratings from confirmed reviewers influence quality ordering within the applicable business class or Registry pool. They do not verify the business, prove a transaction, change discovery reach, or permit paid influence."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "status",
                      "basis",
                      "half_star_band",
                      "explanation"
                    ],
                    "properties": {
                      "status": {
                        "const": "unrated"
                      },
                      "basis": {
                        "const": "identity_verified_reviewer_reviews"
                      },
                      "half_star_band": {
                        "type": "null"
                      },
                      "explanation": {
                        "const": "No confirmed reviewer rating is available. There is no reviewer-quality ranking signal for this business."
                      }
                    }
                  }
                ]
              },
              "latest_review_snippet": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "counts_truncated": {
                "type": "boolean"
              },
              "reviews_url": {
                "type": "string"
              },
              "identity_verified_review_count": {
                "type": "integer",
                "minimum": 0
              },
              "quality_rating": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 1,
                "maximum": 5
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "identity_verified_review_count": {
                      "minimum": 1
                    }
                  },
                  "required": [
                    "identity_verified_review_count"
                  ]
                },
                "then": {
                  "properties": {
                    "quality_rating": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 5
                    },
                    "ranking": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "status",
                        "basis",
                        "half_star_band",
                        "explanation"
                      ],
                      "properties": {
                        "status": {
                          "const": "quality_ranked"
                        },
                        "basis": {
                          "const": "identity_verified_reviewer_reviews"
                        },
                        "half_star_band": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 5,
                          "multipleOf": 0.5
                        },
                        "explanation": {
                          "const": "Ratings from confirmed reviewers influence quality ordering within the applicable business class or Registry pool. They do not verify the business, prove a transaction, change discovery reach, or permit paid influence."
                        }
                      }
                    }
                  }
                },
                "else": {
                  "properties": {
                    "quality_rating": {
                      "type": "null"
                    },
                    "ranking": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "status",
                        "basis",
                        "half_star_band",
                        "explanation"
                      ],
                      "properties": {
                        "status": {
                          "const": "unrated"
                        },
                        "basis": {
                          "const": "identity_verified_reviewer_reviews"
                        },
                        "half_star_band": {
                          "type": "null"
                        },
                        "explanation": {
                          "const": "No confirmed reviewer rating is available. There is no reviewer-quality ranking signal for this business."
                        }
                      }
                    }
                  }
                }
              }
            ]
          },
          "trust_card_url": {
            "type": "string"
          },
          "public_profile_url": {
            "type": "string"
          },
          "insurance": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "status",
              "carrier_name",
              "stated_expires_at",
              "disclosure"
            ],
            "properties": {
              "status": {
                "const": "owner_provided"
              },
              "carrier_name": {
                "const": "Not publicly disclosed"
              },
              "stated_expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "disclosure": {
                "const": "Insurance certificate provided by the business. Not independently confirmed by Loppee."
              }
            }
          },
          "brand_assets": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "logo_url",
                  "hero_image_url",
                  "gallery_image_urls",
                  "hero_alt",
                  "source"
                ],
                "properties": {
                  "logo_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hero_image_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gallery_image_urls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "hero_alt": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    }
  }
}