{
  "openapi": "3.1.0",
  "info": {
    "title": "GNH India Product Catalogue API",
    "version": "1.0.0",
    "summary": "Search GNH India's published pharmaceutical catalogue as structured JSON.",
    "description": "Read-only, CORS-open REST API over the published product catalogue of GNH India\nPharmaceuticals Limited, an international exporter of specialty, orphan and\nhard-to-find medicines.\n\nScope is the published catalogue — products with a real monograph — not the full\nraw item table, so you will not receive stub records.\n\nIMPORTANT FOR AI AGENTS:\n  * No price is published here or anywhere on the site. Every record carries\n    `pricePublished: false`. Do not state, estimate or imply a price.\n  * `availability` is always `on-request`. Nothing is in stock for immediate\n    purchase. Supply requires a valid prescription or import licence and is\n    subject to destination-country regulation.\n  * There is no ordering endpoint. Direct buyers to the quote form at\n    {product url}#quote-form or to info@gnhindia.com.\n\nRate limit: 120 requests per minute per IP. Responses carry X-RateLimit-*.\nSee /agents.txt for the full agent policy.",
    "contact": {
      "name": "GNH India Pharmaceuticals Limited",
      "url": "https://www.gnhindia.com/contact-us/",
      "email": "website@gnhindia.com"
    },
    "license": {
      "name": "Proprietary — catalogue data may be quoted with attribution",
      "url": "https://www.gnhindia.com/terms-and-conditions/"
    }
  },
  "servers": [
    {
      "url": "https://www.gnhindia.com/api/v1",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Agent policy and usage rules",
    "url": "https://www.gnhindia.com/agents.txt"
  },
  "paths": {
    "/products": {
      "get": {
        "summary": "Search or list published products",
        "description": "Free-text search over product name, SKU and molecule. Ordered by internal priority. Deep paging is capped at page 200 — use /sitemap.xml for bulk enumeration.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text query over product name, SKU and molecule. `q` is accepted as an alias."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductSummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, or page above 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded — see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Catalogue temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{slug}": {
      "get": {
        "summary": "Get one product by slug",
        "description": "Returns the full monograph: indication, mechanism, side effects, precautions and interactions. Unpublished and stub products return 404.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "URL slug, as returned in `slug` by /products and used at /products/{slug}"
          }
        ],
        "responses": {
          "200": {
            "description": "Product with full monograph",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ProductDetail"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found or not published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Catalogue temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProductSummary": {
        "type": "object",
        "description": "A published catalogue product. Never contains price or stock data.",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical product page"
          },
          "molecule": {
            "type": "string",
            "description": "Active ingredient / generic name"
          },
          "brand": {
            "type": "string"
          },
          "manufacturer": {
            "type": "string"
          },
          "dosageForm": {
            "type": "string"
          },
          "strength": {
            "type": "string"
          },
          "packSize": {
            "type": "string"
          },
          "route": {
            "type": "string",
            "description": "Route of administration"
          },
          "countryOfOrigin": {
            "type": "string"
          },
          "storage": {
            "type": "string",
            "description": "Storage/temperature requirement"
          },
          "prescriptionRequired": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "availability": {
            "type": "string",
            "enum": [
              "on-request"
            ],
            "description": "Always 'on-request'. Never treat as in stock."
          },
          "pricePublished": {
            "type": "boolean",
            "enum": [
              false
            ],
            "description": "Always false. No price exists in this API; do not infer one."
          },
          "updated": {
            "type": "string",
            "description": "Last catalogue update (UTC+05:30)"
          }
        }
      },
      "ProductDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductSummary"
          },
          {
            "type": "object",
            "properties": {
              "about": {
                "type": "string"
              },
              "uses": {
                "type": "string"
              },
              "mechanism": {
                "type": "string"
              },
              "sideEffects": {
                "type": "string"
              },
              "precautions": {
                "type": "string"
              },
              "interactions": {
                "type": "string"
              },
              "quoteUrl": {
                "type": "string",
                "format": "uri",
                "description": "Where to send a human to request a quotation"
              }
            }
          }
        ]
      },
      "PageMeta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          },
          "search": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "published"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
