HP Logo

Humara Pandit Products API

Welcome to the official API documentation. Browse our spiritual products catalog and process orders seamlessly.

Authentication

Secure your requests with an API key.

All API requests must include your API key in the header.

Header Name
x-api-key
Example Value
YOUR_SECRET_KEY

Products API

GET https://api.humarapandit.com/api/v1/products

Query Parameters

ParameterTypeDescriptionExample
pagenumberPage number (default: 1)?page=2
limitnumberItems per page (default: 10)?limit=20
product_idstringFilter by specific product UUID?product_id=123e...
searchstringSearch product name or description?search=rudraksha
categorystringFilter by category (exact or subcategories)?category=bracelets
min_pricenumberMinimum variant price filter?min_price=100
max_pricenumberMaximum variant price filter?max_price=5000
sortstringSort: price_asc, price_desc, newest, oldest?sort=price_desc
in_stockbooleanIf true, only available products?in_stock=true

Response Example

JSON
{
  "meta": {
    "total": 114,
    "page": 1,
    "limit": 10,
    "totalPages": 12
  },
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "handle": "2-mukhi-rudraksha-indian",
      "title": "2-Mukhi Rudraksh (Indian)",
      "body_html": "<p>Authentic Indian Rudraksha...</p>",
      "vendor": "Astrotalk Store",
      "product_type": "rudraksha",
      "status": "active",
      "published_at": "2026-01-10T08:00:00Z",
      "tags": ["Indian", "Rudraksha"],
      "options": [
        { "name": "Title", "position": 1, "values": ["Default Title"] }
      ],
      "variants": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174001",
          "title": "Default Title",
          "sku": "RUD-001",
          "price": 100.00,
          "compare_at_price": 150.00,
          "grams": 25.00,
          "requires_shipping": true,
          "taxable": true,
          "available": true,
          "option1": "Default Title",
          "option2": null,
          "option3": null,
          "position": 1,
          "image_ids": ["123e4567-e89b-12d3-a456-426614174002"]
        }
      ],
      "images": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174002",
          "src": "https://d24iwcqdcpu9k.cloudfront.net/1.png",
          "position": 1,
          "width": 800,
          "height": 600
        }
      ],
      "created_at": "2026-01-10T08:00:00.000Z",
      "updated_at": "2026-02-15T10:15:00.000Z"
    }
  ]
}

GET https://api.humarapandit.com/api/v1/products/categories

Retrieve a hierarchical tree of all product categories.

Response Example

JSON
{
  "data": [
    {
      "name": "Apparel & Accessories",
      "subcategories": [
        {
          "name": "Clothing",
          "subcategories": [
            { "name": "Traditional & Ceremonial Clothing" }
          ]
        }
      ]
    },
    { "name": "Bracelets" },
    { "name": "Rudraksha" }
  ]
}

Orders API

POST https://api.humarapandit.com/api/v1/orders

Create a new order. Orders are always created with pending status.

Required Parameters

  • customer_id (string): ID of the customer placing the order.
  • items (array): List of items to order.
    • product_id (string, required) — variant ID or SKU
    • quantity (number, required)
    • unit_price (number, required)
    • total_price (number, required)
    • sku (string, optional)
    • name (string, optional)
  • shipping (object): Shipping details.
    • name (string, required)
    • phone (string, required)
    • address_line (string, required)
    • city (string, required)
    • state (string, required)
    • pincode (string, required)
    • alternate_phone_number (string, optional)

Request Body Example

JSON
{
  "customer_id": "cust_123",
  "items": [
    {
      "product_id": "123e4567-e89b-12d3-a456-426614174001",
      "quantity": 2,
      "unit_price": 100,
      "total_price": 200,
      "name": "2-Mukhi Rudraksh",
      "sku": "RUD-001"
    }
  ],
  "shipping": {
    "name": "John Doe",
    "phone": "+919876543210",
    "address_line": "123 Temple Street",
    "city": "Varanasi",
    "state": "Uttar Pradesh",
    "pincode": "221001",
    "alternate_phone_number": "+919876543211"
  }
}

Success Response (201)

JSON
{
  "message": "Order created successfully",
  "order_id": "ord_8fca23456789",
  "status": "success",
  "grand_total": 200
}

PATCH https://api.humarapandit.com/api/v1/orders/[id]

Update the status of an existing order. You can only update orders you created.

Parameters (JSON)

  • status (string, required): Update order status. Allowed values: paid, abandoned, pending, other.

Request Body Example

JSON
{
  "status": "paid"
}

Test Commands

Copy and paste these commands into your terminal to test the API.

1. Get All Products (Filtered)

curl "https://api.humarapandit.com/api/v1/products?category=rudraksha&in_stock=true" \
  -H "x-api-key: YOUR_SECRET_KEY"

2. Get Specific Product

curl "https://api.humarapandit.com/api/v1/products?product_id=123e4567-e89b-12d3-a456-426614174000" \
  -H "x-api-key: YOUR_SECRET_KEY"

3. Get Product Categories

curl "https://api.humarapandit.com/api/v1/products/categories" \
  -H "x-api-key: YOUR_SECRET_KEY"

4. Search with Price Range

curl "https://api.humarapandit.com/api/v1/products?search=bracelet&min_price=500&max_price=2000" \
  -H "x-api-key: YOUR_SECRET_KEY"

5. Create Order

curl -X POST https://api.humarapandit.com/api/v1/orders \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_001",
    "items": [
      { "product_id": "123e4567-e89b-12d3-a456-426614174001", "quantity": 1, "unit_price": 100, "total_price": 100 }
    ],
    "shipping": {
      "name": "Amit Sharma",
      "phone": "9876543210",
      "address_line": "123 MG Road",
      "city": "Bangalore",
      "state": "Karnataka",
      "pincode": "560001"
    }
  }'

6. Update Order Status

curl -X PATCH https://api.humarapandit.com/api/v1/orders/ord_123456789012 \
  -H "x-api-key: YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "paid"
  }'