{
  "info": {
    "name": "SNRL API",
    "description": "Read-only REST API over the free SNRL chemical database. Set the collection variables `baseUrl` (default https://snrl.in/v1) and `apiKey` (create one at https://snrl.in/console.html), then every request is authorized via the X-API-Key header.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {"key": "baseUrl", "value": "https://snrl.in/v1", "type": "string"},
    {"key": "apiKey", "value": "cpd_live_your_key", "type": "string"}
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {"key": "key", "value": "X-API-Key", "type": "string"},
      {"key": "value", "value": "{{apiKey}}", "type": "string"},
      {"key": "in", "value": "header", "type": "string"}
    ]
  },
  "item": [
    {
      "name": "Search products",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/search?q=toluene&size=20",
          "host": ["{{baseUrl}}"],
          "path": ["search"],
          "query": [
            {"key": "q", "value": "toluene"},
            {"key": "size", "value": "20"},
            {"key": "hazard_code", "value": "H225", "disabled": true},
            {"key": "signal_word", "value": "Danger", "disabled": true},
            {"key": "sort", "value": "relevance", "disabled": true},
            {"key": "page", "value": "1", "disabled": true}
          ]
        },
        "description": "Full-text search over products. A CAS number or H-code routes to an exact match; free text is fuzzy."
      }
    },
    {
      "name": "Suggest (type-ahead)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/search/suggest?q=aceto&size=10",
          "host": ["{{baseUrl}}"],
          "path": ["search", "suggest"],
          "query": [
            {"key": "q", "value": "aceto"},
            {"key": "size", "value": "10"}
          ]
        },
        "description": "Autocomplete suggestions for a partial query."
      }
    },
    {
      "name": "List products",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/products?limit=5",
          "host": ["{{baseUrl}}"],
          "path": ["products"],
          "query": [
            {"key": "limit", "value": "5"},
            {"key": "cursor", "value": "", "disabled": true}
          ]
        },
        "description": "List products newest-first, cursor-paginated. Returns {items, next_cursor}."
      }
    },
    {
      "name": "Get product",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/products/:id",
          "host": ["{{baseUrl}}"],
          "path": ["products", ":id"],
          "variable": [{"key": "id", "value": "PRODUCT_UUID", "description": "A product id from List products"}]
        },
        "description": "Product identity + active SDS version: GHS signal word, pictograms, H-statements, composition, source SDS link."
      }
    },
    {
      "name": "Product version history",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/products/:id/versions",
          "host": ["{{baseUrl}}"],
          "path": ["products", ":id", "versions"],
          "variable": [{"key": "id", "value": "PRODUCT_UUID"}]
        },
        "description": "Every SDS revision captured for a product (append-only history)."
      }
    }
  ]
}
