{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openaxia-com/json-schema/openaxia-com-product-detail-schema.json",
  "title": "ProductDetail",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openaxia-com-openapi.json#/components/schemas/ProductDetail",
  "allOf": [
    {
      "$ref": "#/$defs/ProductSummary"
    },
    {
      "type": "object",
      "properties": {
        "categorySource": {
          "type": "string"
        },
        "applications": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "technologies": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "identifiers": {
          "type": "object",
          "properties": {
            "productLabel": {
              "type": [
                "string",
                "null"
              ]
            },
            "partNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "vidPid": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "externalLinks": {
          "type": "object",
          "properties": {
            "productUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "supportUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "userManualUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "image": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "url": {
              "type": "string"
            },
            "alt": {
              "type": "string"
            }
          }
        },
        "specs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Spec"
          }
        },
        "certifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Certification"
          }
        },
        "competitors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntityRef"
          }
        },
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DossierAsset"
          }
        },
        "summary": {
          "$ref": "#/$defs/DossierSummary"
        },
        "specTable": {
          "$ref": "#/$defs/SpecTable"
        },
        "completeness": {
          "oneOf": [
            {
              "$ref": "#/$defs/Completeness"
            },
            {
              "type": "null"
            }
          ]
        },
        "brand": {
          "oneOf": [
            {
              "$ref": "#/$defs/BrandRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "standalone": {
          "type": "boolean"
        },
        "lifecycle": {
          "oneOf": [
            {
              "$ref": "#/$defs/Lifecycle"
            },
            {
              "type": "null"
            }
          ]
        },
        "relations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Relation"
          }
        },
        "partNumberAliases": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartNumberAlias"
          }
        },
        "certificationLevels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CertificationLevel"
          }
        }
      },
      "required": [
        "specs",
        "certifications",
        "specTable",
        "completeness",
        "brand",
        "standalone",
        "lifecycle",
        "relations",
        "partNumberAliases",
        "certificationLevels"
      ]
    }
  ],
  "$defs": {
    "BrandRef": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ]
    },
    "Certification": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "integer"
          ]
        },
        "product": {
          "oneOf": [
            {
              "$ref": "#/$defs/EntityRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "certBody": {
          "type": "string"
        },
        "certNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "expired",
            "revoked"
          ]
        },
        "issuedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "standardCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "certificationType": {
          "type": [
            "string",
            "null"
          ]
        },
        "softwareVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "transport": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "specificationVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "holderName": {
          "type": [
            "string",
            "null"
          ]
        },
        "targetMarket": {
          "type": [
            "string",
            "null"
          ]
        },
        "registry": {
          "type": "string"
        },
        "verifyUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "evidence": {
          "$ref": "#/$defs/Evidence"
        }
      },
      "required": [
        "id",
        "product",
        "certBody",
        "certNumber",
        "status",
        "issuedAt",
        "standardCode",
        "transport",
        "holderName",
        "registry",
        "verifyUrl",
        "evidence"
      ]
    },
    "CertificationLevel": {
      "type": "object",
      "description": "One certification program on a product with its verification level. registry_verified: an active record from the program's official registry; self_declared: the program has no official lookup (e.g. CE), counted as the vendor declares; vendor_claimed_unverified: vendor claim only, while the program has a registry we have not matched (or cannot read), or the program is not yet published. Vendor-stated UL marks are always vendor_claimed_unverified.",
      "properties": {
        "program": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "slug": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "hasOfficialLookup": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "yes",
                "no",
                "blocked",
                null
              ]
            }
          },
          "required": [
            "code",
            "slug",
            "name",
            "hasOfficialLookup"
          ]
        },
        "level": {
          "type": "string",
          "enum": [
            "registry_verified",
            "self_declared",
            "vendor_claimed_unverified"
          ]
        },
        "evidence": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CertificationLevelEvidence"
          }
        }
      },
      "required": [
        "program",
        "level",
        "evidence"
      ]
    },
    "CertificationLevelEvidence": {
      "description": "Evidence behind a certification verification level: an active, publicly visible registry record, or a vendor-stated mark (certification_marks claim).",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "registry_record"
            },
            "certificationId": {
              "type": [
                "string",
                "integer"
              ]
            },
            "certBody": {
              "type": "string"
            },
            "certNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "issuedAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "verifyUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "registry": {
              "type": "string"
            },
            "provenance": {
              "$ref": "#/$defs/Evidence"
            }
          },
          "required": [
            "kind",
            "certificationId",
            "certBody",
            "certNumber",
            "issuedAt",
            "verifyUrl",
            "registry",
            "provenance"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "vendor_claim"
            },
            "mark": {
              "type": "string"
            },
            "provenance": {
              "$ref": "#/$defs/Evidence"
            }
          },
          "required": [
            "kind",
            "mark",
            "provenance"
          ]
        }
      ]
    },
    "CompanyRef": {
      "description": "A company reference: EntityRef plus the public key and canonical page URL. `slug` follows CompanySummary.slug (company slug with the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` on, else the numeric id).",
      "allOf": [
        {
          "$ref": "#/$defs/EntityRef"
        },
        {
          "type": "object",
          "properties": {
            "publicId": {
              "type": [
                "string",
                "null"
              ],
              "description": "Company slug (public key); `null` until backfilled."
            },
            "url": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri",
              "description": "Absolute canonical `/companies/<slug>` URL; `null` until backfilled and while the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` is off."
            }
          },
          "required": [
            "publicId",
            "url"
          ]
        }
      ]
    },
    "Completeness": {
      "type": "object",
      "description": "Live completeness of the product's spec template (motobase-category-spec-templates D6).",
      "properties": {
        "specCompleteness": {
          "type": [
            "number",
            "null"
          ]
        },
        "auditCoverage": {
          "type": [
            "number",
            "null"
          ]
        },
        "assetCompleteness": {
          "type": [
            "number",
            "null"
          ],
          "description": "Share of the four raw-archive classes (photo, drawing, datasheet, manual); null when the raw archive is not connected."
        },
        "templateVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "missingRequired": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "specCompleteness",
        "auditCoverage",
        "assetCompleteness",
        "templateVersion",
        "missingRequired"
      ]
    },
    "DossierAsset": {
      "type": "object",
      "description": "A document, image or page in the product dossier. Only metadata and URLs are returned; content is never proxied. `hostedUrl` is non-null only for assets this service is licensed to host (licenseClass hostable_*); reference_only assets link to their source.",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "image",
            "datasheet_pdf",
            "manual_pdf",
            "brochure",
            "drawing",
            "video",
            "press_release",
            "product_page",
            "support_page",
            "registry_record"
          ]
        },
        "title": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string"
        },
        "foundOnUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "hostedUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceChannel": {
          "type": "string",
          "enum": [
            "manufacturer_site",
            "fcc_exhibit",
            "dcl",
            "distributor",
            "press_kit",
            "vendor_portal",
            "association",
            "patent"
          ]
        },
        "sourceName": {
          "type": "string"
        },
        "licenseClass": {
          "type": "string",
          "enum": [
            "hostable_public_record",
            "hostable_licensed",
            "reference_only"
          ]
        },
        "fetchedAt": {
          "type": "string"
        },
        "linkStatus": {
          "type": "string",
          "enum": [
            "ok",
            "unverified"
          ]
        }
      },
      "required": [
        "kind",
        "title",
        "sourceUrl",
        "hostedUrl",
        "sourceChannel",
        "sourceName",
        "licenseClass",
        "fetchedAt",
        "linkStatus"
      ]
    },
    "DossierSummary": {
      "type": [
        "object",
        "null"
      ],
      "description": "This service's own English summary of the product, composed only from the listed sourced facts.",
      "properties": {
        "text": {
          "type": "string"
        },
        "composer": {
          "type": "string",
          "enum": [
            "template",
            "ai"
          ]
        },
        "composerVersion": {
          "type": "string"
        },
        "generatedAt": {
          "type": "string"
        },
        "facts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "sourceLabel": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "EntityRef": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string",
          "description": "Identifier of the referenced product or company, in the same form as ProductSummary.slug / CompanySummary.slug (canonical identifier with the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` on; numeric only while that record is not backfilled)."
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ]
    },
    "Evidence": {
      "type": "object",
      "description": "Provenance of a claim-backed value.",
      "properties": {
        "claimId": {
          "type": [
            "string",
            "integer",
            "null"
          ]
        },
        "source": {
          "$ref": "#/$defs/Source"
        },
        "observedAt": {
          "type": "string"
        },
        "assertionType": {
          "type": [
            "string",
            "null"
          ]
        },
        "evidenceStrength": {
          "type": "string"
        },
        "confidence": {
          "type": "string"
        },
        "sourceExcerpt": {
          "type": "string",
          "description": "Present only when the excerpt passed this service's public review gate."
        }
      },
      "required": [
        "claimId",
        "source",
        "observedAt",
        "assertionType",
        "evidenceStrength",
        "confidence"
      ]
    },
    "Lifecycle": {
      "type": "object",
      "description": "Materialized lifecycle. `active` only means listed in the vendor's current catalog; a vanished vendor page is `unknown`, never `discontinued`.",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "discontinued",
            "replaced",
            "unknown"
          ]
        },
        "since": {
          "type": [
            "string",
            "null"
          ]
        },
        "sinceBasis": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "stated",
            "first_observed",
            null
          ]
        },
        "basis": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "status",
        "since",
        "sinceBasis",
        "basis"
      ]
    },
    "Links": {
      "type": "object",
      "properties": {
        "page": {
          "type": "string",
          "format": "uri"
        },
        "api": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "page",
        "api"
      ],
      "description": "`page`: the record's public page; `api`: its API v1 detail URL. With the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` on both use the canonical identifier."
    },
    "PartNumberAlias": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "normalized": {
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "as_published",
            "superseded",
            "successor",
            "regional",
            "base_code",
            "vendor_alt"
          ]
        }
      },
      "required": [
        "value",
        "normalized",
        "kind"
      ]
    },
    "ProductSummary": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string",
          "description": "With the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` on: the canonical identifier — the last segment of the canonical page URL, `<readable>-<publicId>` (e.g. `somfy-sonesse-30-rts-k7q2m9x`); pass it to GET /api/v1/products/{slug}. A record whose publicId is not backfilled yet keeps its numeric id (its page URL is still numeric). Switch off: the legacy numeric record id (deprecated as an input)."
        },
        "name": {
          "type": "string"
        },
        "series": {
          "oneOf": [
            {
              "$ref": "#/$defs/SeriesRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The published series entity, or null when the product is not in a published series."
        },
        "manufacturer": {
          "oneOf": [
            {
              "$ref": "#/$defs/CompanyRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "category": {
          "type": [
            "string",
            "null"
          ]
        },
        "categoryDisplayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "activeCertificationCount": {
          "type": "integer"
        },
        "links": {
          "$ref": "#/$defs/Links"
        },
        "publicId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The product's random public key (7 characters, unambiguous alphabet; stored uppercase, accepted in any case), e.g. `K7Q2M9X`. Accepted by GET /api/v1/products/{slug}. `null` until the record is backfilled."
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Absolute canonical page URL `/products/<readable>-<publicId>` (only the trailing publicId is authoritative). `null` until `publicId` is backfilled, and always null while the server switch `MOTOBASE_PUBLIC_URLS_ENABLED` is off. With the switch on `links.page` is the same canonical URL."
        },
        "displayName": {
          "type": "string",
          "description": "Canonical display name (the public page H1). Presentation only — never use it as an id, slug or filter value; `name` keeps the original value."
        }
      },
      "required": [
        "slug",
        "name",
        "series",
        "manufacturer",
        "category",
        "categoryDisplayName",
        "activeCertificationCount",
        "links",
        "publicId",
        "url",
        "displayName"
      ]
    },
    "Relation": {
      "type": "object",
      "description": "A relation whose evidence was re-checked on this request (fail closed).",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "successor_of",
            "replaced_by",
            "variant_of",
            "requires_accessory",
            "compatible_with",
            "white_label_of",
            "regional_edition_of"
          ]
        },
        "direction": {
          "type": "string",
          "enum": [
            "outgoing",
            "incoming"
          ]
        },
        "label": {
          "type": "string"
        },
        "other": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "product",
                "series",
                "part"
              ]
            },
            "slug": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": "string"
            },
            "partNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "brand": {
              "oneOf": [
                {
                  "$ref": "#/$defs/BrandRef"
                },
                {
                  "type": "null"
                }
              ]
            },
            "url": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "kind",
            "slug",
            "name",
            "partNumber",
            "brand",
            "url"
          ]
        },
        "requiredChanges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "crown",
                  "drive",
                  "bracket",
                  "adapter",
                  "controller",
                  "wiring",
                  "other"
                ]
              },
              "text": {
                "type": "string"
              },
              "partNumber": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "evidence": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "claim",
                "certification_match",
                "human_review"
              ]
            },
            "claimId": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "oneOf": [
                {
                  "$ref": "#/$defs/Evidence"
                },
                {
                  "type": "null"
                }
              ]
            },
            "certificationIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "matchedIdentifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "identifierValue": {
              "type": [
                "string",
                "null"
              ]
            },
            "verifiedAt": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "kind",
            "claimId",
            "source",
            "certificationIds",
            "matchedIdentifier",
            "identifierValue",
            "verifiedAt"
          ]
        }
      },
      "required": [
        "type",
        "direction",
        "label",
        "other",
        "requiredChanges",
        "regions",
        "evidence"
      ]
    },
    "SeriesRef": {
      "type": "object",
      "description": "A published product series (motobase-product-hierarchy-and-relations).",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "brand": {
          "$ref": "#/$defs/BrandRef"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "api": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "slug",
        "name",
        "brand",
        "url",
        "api"
      ]
    },
    "Source": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "retrievedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "legalBasis": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "title",
        "kind",
        "url",
        "retrievedAt",
        "legalBasis"
      ]
    },
    "Spec": {
      "type": "object",
      "properties": {
        "property": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "valueType": {
          "type": "string"
        },
        "value": {},
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "evidence": {
          "$ref": "#/$defs/Evidence"
        }
      },
      "required": [
        "property",
        "displayName",
        "valueType",
        "value",
        "unit",
        "evidence"
      ]
    },
    "SpecTable": {
      "type": "object",
      "description": "Template-ordered spec table. Rows that are not applicable or not yet checked are omitted; `not_published` = checked, the manufacturer does not publish it; `none` = the manufacturer states the feature is absent. A final group `other` holds keys outside the product's template.",
      "properties": {
        "specCategory": {
          "type": [
            "string",
            "null"
          ]
        },
        "templateVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "group": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "value",
                        "standard",
                        "optional",
                        "none",
                        "not_published"
                      ]
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/SpecTableValue"
                      }
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "state",
                    "required",
                    "values"
                  ]
                }
              }
            },
            "required": [
              "group",
              "label",
              "rows"
            ]
          }
        }
      },
      "required": [
        "specCategory",
        "templateVersion",
        "groups"
      ]
    },
    "SpecTableValue": {
      "type": "object",
      "properties": {
        "value": {},
        "valueLabel": {
          "type": "string"
        },
        "unit": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display unit."
        },
        "qualifier": {
          "type": "string",
          "enum": [
            "eq",
            "approx",
            "max",
            "min",
            "gt",
            "lt",
            "typ"
          ]
        },
        "measurementNote": {
          "type": [
            "string",
            "null"
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "standard",
            "optional",
            "none"
          ]
        },
        "optionPartNumbers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "evidence": {
          "$ref": "#/$defs/Evidence"
        }
      },
      "required": [
        "value",
        "valueLabel",
        "unit",
        "qualifier",
        "measurementNote",
        "availability",
        "optionPartNumbers",
        "evidence"
      ]
    }
  }
}