API Documentation

Integrate Grek Theory products and plants into your applications

Getting Started

The Grek Theory API provides public access to our plants and products catalog. No authentication is required for basic requests.

Base URL: https://example.com/api

Plants API

GET/plants

Retrieve a list of all plants with optional filters.

Query Parameters:

  • difficulty - Filter by difficulty (Easy, Medium, Hard)
  • minPrice - Minimum price filter
  • maxPrice - Maximum price filter
  • limit - Limit results (default: 50)

Example Request:

/plants?difficulty=Easy&minPrice=20&maxPrice=50

Example Response:

{
  "success": true,
  "data": [
    {
      "id": "pothos-golden",
      "name": "Golden Pothos",
      "price": 24.99,
      "rating": 4.9,
      "difficulty": "Easy",
      "image": "/golden-pothos-vine.jpg"
    }
  ],
  "count": 1,
  "timestamp": "2024-12-26T10:30:00.000Z"
}
GET/plants/[id]

Retrieve detailed information about a specific plant.

Example Request:

/plants/monstera-deliciosa

Products API

GET/products

Retrieve a list of all products with optional filters.

Query Parameters:

  • category - Filter by category (Home Decor, Tools, etc)
  • minPrice - Minimum price filter
  • maxPrice - Maximum price filter
  • limit - Limit results (default: 50)

Example Request:

/products?category=Tools&minPrice=10&maxPrice=50

GET/products/[id]

Retrieve detailed information about a specific product.

Example Request:

/products/ceramic-planter

Response Format

All API responses follow a consistent format with success status and timestamp.

{
  "success": true,
  "data": [...],
  "count": 0,
  "timestamp": "2024-12-26T10:30:00.000Z"
}

HTTP Status Codes

200 OK

Successful request

404 Not Found

Resource not found

500 Server Error

Internal server error