{
  "openapi": "3.1.0",
  "info": {
    "title": "Xrossways Solar Public Content API",
    "version": "1.0.0",
    "description": "Read-only static JSON API exposing Xrossways Solar public content (projects, articles, subsidies, FAQs, pricing, quiz). No authentication. Suitable for AI agents and LLM function calling; every operation has a unique operationId and typed schema. Versioning: /api/v1/ is current; breaking changes ship as a new /api/vN/ path while the previous major stays available; unversioned /api/*.json aliases track the current major for compatibility. Deprecation policy: a superseded major keeps serving for at least 90 days with Deprecation and Sunset response headers plus a migration note before removal; no version is currently deprecated.",
    "contact": {
      "name": "Xrossways Solar",
      "url": "https://xrossways.com",
      "email": "contact@xrossways.com"
    }
  },
  "servers": [
    {
      "url": "https://xrossways.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Human-readable API and developer docs",
    "url": "https://xrossways.com/developers/"
  },
  "paths": {
    "/api/v1/projects.json": {
      "get": {
        "operationId": "listProjects",
        "summary": "List solar installation projects",
        "description": "Returns all published Xrossways Solar installation case studies with location, system size, savings, specs, and client info.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "List solar installation projects (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "A solar installation case study.",
                    "required": ["id", "title"],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable project identifier."
                      },
                      "title": {
                        "type": "string",
                        "description": "Project display title."
                      },
                      "type": {
                        "type": "string",
                        "description": "residential, commercial, or industrial."
                      },
                      "location": {
                        "type": "string",
                        "description": "City and state."
                      },
                      "systemSize": {
                        "type": "string",
                        "description": "Installed capacity, e.g. \"15 kW\"."
                      },
                      "completionDate": {
                        "type": "string"
                      },
                      "savings": {
                        "type": "string",
                        "description": "Reported customer savings."
                      },
                      "description": {
                        "type": "string"
                      },
                      "longDescription": {
                        "type": "string"
                      },
                      "client": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/blog-posts.json": {
      "get": {
        "operationId": "listBlogPosts",
        "summary": "List blog articles",
        "description": "Returns all published solar guides and articles with title, excerpt, author, date, category, tags, and full markdown content.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "List blog articles (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "A published solar article; content is markdown.",
                    "required": ["slug", "title", "content"],
                    "properties": {
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "date": {
                        "type": "string",
                        "format": "date"
                      },
                      "updatedDate": {
                        "type": "string",
                        "format": "date"
                      },
                      "category": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "excerpt": {
                        "type": "string"
                      },
                      "author": {
                        "type": "string"
                      },
                      "readTime": {
                        "type": "string"
                      },
                      "image": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string",
                        "description": "Full article body in markdown."
                      }
                    },
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subsidies.json": {
      "get": {
        "operationId": "getSubsidyData",
        "summary": "Get solar subsidy data",
        "description": "Returns central PM Surya Ghar subsidy tiers plus per-state subsidy details, incentives, net-metering policy, and processing times.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Get solar subsidy data (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Central plus per-state solar subsidy data for India.",
                  "required": ["central", "states"],
                  "properties": {
                    "central": {
                      "type": "object",
                      "description": "PM Surya Ghar central subsidy tiers and process."
                    },
                    "states": {
                      "type": "array",
                      "description": "Per-state subsidy details keyed by state code.",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/faqs.json": {
      "get": {
        "operationId": "listFaqs",
        "summary": "List frequently asked questions",
        "description": "Returns categorized solar FAQs with questions and answers covering cost, installation, subsidies, and maintenance.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "List frequently asked questions (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Categorized solar FAQs.",
                  "required": ["categories"],
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pricing.json": {
      "get": {
        "operationId": "listPricingTiers",
        "summary": "List solar pricing tiers",
        "description": "Returns residential and commercial solar package pricing with system size, price range, subsidy eligibility, net cost, and specs.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "List solar pricing tiers (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "A solar package with pricing and subsidy math.",
                    "required": ["id", "name"],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "category": {
                        "type": "string",
                        "description": "residential, commercial, or industrial."
                      },
                      "name": {
                        "type": "string"
                      },
                      "systemSize": {
                        "type": "string"
                      },
                      "priceRange": {
                        "type": "object"
                      },
                      "subsidyEligible": {
                        "type": "boolean"
                      },
                      "estimatedSubsidy": {
                        "type": "number"
                      },
                      "netCost": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quiz.json": {
      "get": {
        "operationId": "getSolutionQuiz",
        "summary": "Get find-your-solution quiz",
        "description": "Returns the questions and recommendation rules behind the Find Your Solution quiz at /find-your-solution/.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Get find-your-solution quiz (static JSON file)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Find-your-solution quiz questions and recommendation rules.",
                  "required": ["questions", "recommendations"],
                  "properties": {
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Unknown API resource (RFC 9457 problem details as JSON)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Project": {
        "type": "object",
        "description": "A solar installation case study.",
        "required": ["id", "title"],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable project identifier."
          },
          "title": {
            "type": "string",
            "description": "Project display title."
          },
          "type": {
            "type": "string",
            "description": "residential, commercial, or industrial."
          },
          "location": {
            "type": "string",
            "description": "City and state."
          },
          "systemSize": {
            "type": "string",
            "description": "Installed capacity, e.g. \"15 kW\"."
          },
          "completionDate": {
            "type": "string"
          },
          "savings": {
            "type": "string",
            "description": "Reported customer savings."
          },
          "description": {
            "type": "string"
          },
          "longDescription": {
            "type": "string"
          },
          "client": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "BlogPost": {
        "type": "object",
        "description": "A published solar article; content is markdown.",
        "required": ["slug", "title", "content"],
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "updatedDate": {
            "type": "string",
            "format": "date"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excerpt": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "readTime": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "Full article body in markdown."
          }
        },
        "additionalProperties": true
      },
      "SubsidyData": {
        "type": "object",
        "description": "Central plus per-state solar subsidy data for India.",
        "required": ["central", "states"],
        "properties": {
          "central": {
            "type": "object",
            "description": "PM Surya Ghar central subsidy tiers and process."
          },
          "states": {
            "type": "array",
            "description": "Per-state subsidy details keyed by state code.",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "FaqData": {
        "type": "object",
        "description": "Categorized solar FAQs.",
        "required": ["categories"],
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "PricingTier": {
        "type": "object",
        "description": "A solar package with pricing and subsidy math.",
        "required": ["id", "name"],
        "properties": {
          "id": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "description": "residential, commercial, or industrial."
          },
          "name": {
            "type": "string"
          },
          "systemSize": {
            "type": "string"
          },
          "priceRange": {
            "type": "object"
          },
          "subsidyEligible": {
            "type": "boolean"
          },
          "estimatedSubsidy": {
            "type": "number"
          },
          "netCost": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "QuizData": {
        "type": "object",
        "description": "Find-your-solution quiz questions and recommendation rules.",
        "required": ["questions", "recommendations"],
        "properties": {
          "questions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "recommendations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ProblemDetail": {
        "type": "object",
        "description": "RFC 9457 problem details returned for API errors (404/405/406).",
        "required": ["title", "status", "code", "detail"],
        "properties": {
          "title": {
            "type": "string",
            "example": "Not Found"
          },
          "status": {
            "type": "integer",
            "example": 404
          },
          "code": {
            "type": "string",
            "example": "api_route_not_found"
          },
          "detail": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
