WACM.in Logo
Back to API Docs

eCommerce Store API

Shop API Reference

Build and manage your WhatsApp eCommerce store. Sync products, process orders, and integrate with Shopify or WooCommerce seamlessly.

eCommerce API - LLM Context

LLM Ready

Feed complete Shop & Catalog API specs directly to your AI agent or coding assistant.

Download .mdOpenAPI 3.1
Machine-Readable Feeds:/llms.txt /llms-full.txt

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://app.wacm.in/v1/shop

Public API Base

https://app.wacm.in/shop

The 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.

Authenticated Request
curl -X GET "https://app.wacm.in/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:

1

Get Your Token

Log in to your WACM dashboard, navigate to Settings → API to get your Personal Access Token.

2

Push Categories

Make a POST request to /v1/shop/categories to establish your product taxonomy. Save the returned Category IDs.

3

Push Products

Make a POST request to /v1/shop/products, attaching the newly created category_id to each item.

4

Fulfill Orders

Poll the /v1/shop/orders endpoint to receive new purchases, or use the WACM Webhook engine to listen for real-time events.

5

Update Statuses

Once you ship an item, PUT the new status (e.g., Shipped) back to the /v1/shop/orders/{id}/status endpoint.

Products

GET
/v1/shop/products

List all products

POST
/v1/shop/products

Create a new product

GET
/v1/shop/products/{'{id}'}

Get product details

PUT
/v1/shop/products/{'{id}'}

Update product

DELETE
/v1/shop/products/{'{id}'}

Delete product

List Products

Request
curl -X GET "https://app.wacm.in/v1/shop/products" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Create Product

Request
curl -X POST "https://app.wacm.in/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",
    "category_id": 1
  }'

Request Body

ParameterTypeRequiredDescription
namestringRequiredProduct name
pricenumberRequiredProduct price
descriptionstringOptionalProduct description
compare_at_pricenumberOptionalOriginal price (for showing discounts)
currencystringOptionalCurrency code (default: INR)
stock_quantityintegerOptionalAvailable stock quantity
statusstringOptionalProduct status: Active, Draft, Archived
external_idstringOptionalExternal SKU or product ID
imagestringOptionalProduct image URL
category_idintegerOptionalCategory ID reference

Response

201 Created
{
  "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,
  "category_id": 1,
  "created_at": "2025-01-15T10:30:00.000000Z",
  "updated_at": "2025-01-15T10:30:00.000000Z"
}

Categories

GET
/v1/shop/categories

List all categories

POST
/v1/shop/categories

Create a new category

GET
/v1/shop/categories/{'{id}'}

Get category details

PUT
/v1/shop/categories/{'{id}'}

Update category

DELETE
/v1/shop/categories/{'{id}'}

Delete category (returns 204 No Content)

Create Category

Request
curl -X POST "https://app.wacm.in/v1/shop/categories" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Electronics",
    "slug": "electronics",
    "description": "Electronic devices and accessories"
  }'

Request Body

ParameterTypeRequiredDescription
namestringRequiredCategory name
slugstringRequiredUnique category slug
descriptionstringOptionalCategory description
imageURLOptionalCategory image URL

Public Categories Endpoint

No authentication required - uses company_id for scoping.

Request
curl -X GET "https://app.wacm.in/shop/{company_id}/categories"

Orders

GET
/v1/shop/orders

List all orders

GET
/v1/shop/orders/{'{id}'}

Get order details

PUT
/v1/shop/orders/{'{id}'}/status

Update order status

Update Order Status

Request
curl -X PUT "https://app.wacm.in/v1/shop/orders/123/status" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Shipped"
  }'

Request Body

ParameterTypeRequiredDescription
statusstringRequiredNew order status

Valid Order Statuses

PendingProcessingShippedFulfilledDeliveredCancelledRefunded

ERP Sync

Synchronize your ERP system inventory with WACM Shop.

POST
/shop/erp/syncBearer token required

Sync products and inventory from ERP

Request
curl -X POST "https://app.wacm.in/shop/erp/sync" \
  -H "Authorization: Bearer YOUR_ERP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      {
        "external_id": "ERP-001",
        "name": "ERP product",
        "stock_quantity": 50,
        "price": 1999.00
      }
    ]
  }'

Webhooks

Receive incoming Shopify, WooCommerce, and custom events. Each endpoint uses the generated webhook token in its URL.

POST
/shop/webhooks/shopify/{token}Token in URL

Shopify webhook receiver

POST
/shop/webhooks/woo/{token}Token in URL

WooCommerce webhook receiver

POST
/shop/webhooks/custom/{token}Token Auth

Custom webhook receiver

POST
/shop/webhooks/shiprocket/{token}Token in URL

Shiprocket logistics webhook receiver

POST
/shop/webhooks/fastrr/{token}Token in URL

Fastrr checkout webhook receiver

POST
/shop/webhooks/test/{token}Token in URL

Webhook verification and testing endpoint

Security

Webhook URLs contain a generated token. Shopify and WooCommerce handlers also validate their respective request signatures when configured.

Shopify Integration

Connect your Shopify store to automatically sync products and receive order notifications.

Webhook Events Supported

  • products/create - New product created
  • products/update - Product updated
  • products/delete - Product deleted
  • orders/create - New order placed
  • orders/updated - Order status changed
Shopify Webhook URL
https://app.wacm.in/shop/webhooks/shopify/{your_webhook_token}

WooCommerce Integration

Connect your WooCommerce store to sync products and process orders through WhatsApp.

WooCommerce Webhook URL
https://app.wacm.in/shop/webhooks/woo/{your_webhook_token}

Product Status Reference

StatusDescription
ActiveProduct is visible and purchasable
DraftProduct is hidden from store (work in progress)
ArchivedProduct is no longer available

Order Status Reference

StatusDescription
PendingOrder received, awaiting processing
ProcessingOrder is being prepared
ShippedOrder has been shipped
DeliveredOrder delivered to customer
CancelledOrder was cancelled
RefundedPayment was refunded

HMAC-SHA256 Security

All external webhooks (Shopify/WooCommerce) are verified using HMAC-SHA256 signatures to ensure request authenticity.

Verification Process
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 match

Security Best Practice

Always verify webhook signatures before processing. Never trust unverified webhook payloads.

WhatsApp Business API

Send messages, manage contacts, and run campaigns.

View Docs