eCommerce Store API
Shop API Reference
Build and manage your WhatsApp eCommerce store. Sync products, process orders, and integrate with Shopify or WooCommerce seamlessly.
Overview
The Shop API enables you to manage your WhatsApp eCommerce store programmatically. Create and manage products, organize categories, process orders, and integrate with external platforms like Shopify and WooCommerce.
Developer API Base
https://api.wacm.in/api/v1/shopPublic API Base
https://api.wacm.in/shopThe API uses RESTful conventions with JSON request/response bodies. All developer endpoints require authentication via Bearer token.
Authentication
Developer API endpoints (v1) require authentication. Public endpoints for categories and products use company_id for scoping.
curl -X GET "https://api.wacm.in/api/v1/shop/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"Integration Flow
Follow these steps to integrate your external system with WACM Shop:
Get Your Token
Log in to your WACM dashboard, navigate to Settings → API to get your Personal Access Token.
Push Categories
Make a POST request to /categories to establish your product taxonomy. Save the returned Category IDs.
Push Products
Make a POST request to /products, attaching the newly created shop_category_id to each item.
Fulfill Orders
Poll the /orders endpoint to receive new purchases, or use the WACM Webhook engine to listen for real-time events.
Update Statuses
Once you ship an item, PUT the new status (e.g., Shipped) back to the /orders/{id}/status endpoint.
Products
/productsList all products
/productsCreate a new product
/products/{'{id}'}Get product details
/products/{'{id}'}Update product
/products/{'{id}'}Delete product
List Products
curl -X GET "https://api.wacm.in/api/v1/shop/products" \
-H "Authorization: Bearer YOUR_API_TOKEN"Create Product
curl -X POST "https://api.wacm.in/api/v1/shop/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Wireless Headphones",
"description": "High-quality wireless headphones with noise cancellation",
"price": 2999.00,
"compare_at_price": 4999.00,
"currency": "INR",
"stock_quantity": 100,
"status": "Active",
"external_id": "SKU-WH-001",
"shop_category_id": 1
}'Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Product name |
| price | number | Required | Product price |
| description | string | Optional | Product description |
| compare_at_price | number | Optional | Original price (for showing discounts) |
| currency | string | Optional | Currency code (default: INR) |
| stock_quantity | integer | Optional | Available stock quantity |
| status | string | Optional | Product status: Active, Draft, Archived |
| external_id | string | Optional | External SKU or product ID |
| image | string | Optional | Product image URL |
| shop_category_id | integer | Optional | Category ID reference |
Response
{
"id": 1,
"name": "Premium Wireless Headphones",
"description": "High-quality wireless headphones with noise cancellation",
"price": 2999.00,
"compare_at_price": 4999.00,
"currency": "INR",
"stock_quantity": 100,
"status": "Active",
"external_id": "SKU-WH-001",
"image": null,
"shop_category_id": 1,
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z"
}Categories
/categoriesList all categories
/categoriesCreate a new category
/categories/{'{id}'}Get category details
/categories/{'{id}'}Update category
/categories/{'{id}'}Delete category
Create Category
curl -X POST "https://api.wacm.in/api/v1/shop/categories" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Electronics",
"description": "Electronic devices and accessories"
}'Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Category name |
| description | string | Optional | Category description |
| parent_id | integer | Optional | Parent category ID for subcategories |
Public Categories Endpoint
No authentication required - uses company_id for scoping.
curl -X GET "https://api.wacm.in/shop/{company_id}/categories"Orders
/ordersList all orders
/orders/{'{id}'}Get order details
/orders/{'{id}'}/statusUpdate order status
Update Order Status
curl -X PUT "https://api.wacm.in/api/v1/shop/orders/123/status" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Shipped"
}'Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | Required | New order status |
Valid Order Statuses
ERP Sync
Synchronize your ERP system inventory with WACM Shop.
/erp/syncPublicSync products and inventory from ERP
curl -X POST "https://api.wacm.in/shop/erp/sync" \
-H "Content-Type: application/json" \
-d '{
"company_id": 1,
"products": [
{
"external_id": "ERP-001",
"stock_quantity": 50,
"price": 1999.00
}
]
}'AI Product Search
Use AI-powered search to find products by natural language queries.
/ai/searchPublicSearch products using AI
curl -X POST "https://api.wacm.in/shop/ai/search" \
-H "Content-Type: application/json" \
-d '{
"company_id": 1,
"query": "wireless headphones under 3000",
"limit": 10
}'Webhooks
Receive real-time notifications for store events. Webhooks are verified via HMAC-SHA256 signature for security.
/webhooks/shopify/{company_id}No AuthShopify webhook receiver
/webhooks/woo/{company_id}No AuthWooCommerce webhook receiver
/webhooks/custom/{token}Token AuthCustom webhook receiver
Security
External webhooks (Shopify/WooCommerce) are verified via HMAC-SHA256 signature in the request headers. No additional authentication required.
Shopify Integration
Connect your Shopify store to automatically sync products and receive order notifications.
Webhook Events Supported
products/create- New product createdproducts/update- Product updatedproducts/delete- Product deletedorders/create- New order placedorders/updated- Order status changed
https://api.wacm.in/shop/webhooks/shopify/{your_company_id}WooCommerce Integration
Connect your WooCommerce store to sync products and process orders through WhatsApp.
https://api.wacm.in/shop/webhooks/woo/{your_company_id}Product Status Reference
| Status | Description |
|---|---|
| Active | Product is visible and purchasable |
| Draft | Product is hidden from store (work in progress) |
| Archived | Product is no longer available |
Order Status Reference
HMAC-SHA256 Security
All external webhooks (Shopify/WooCommerce) are verified using HMAC-SHA256 signatures to ensure request authenticity.
1. Receive webhook request with HMAC signature header
2. Compute HMAC-SHA256 using your shared secret
3. Compare computed signature with received signature
4. Process request only if signatures matchSecurity Best Practice
Always verify webhook signatures before processing. Never trust unverified webhook payloads.
WhatsApp Business API
Send messages, manage contacts, and run campaigns.