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
slugstringOptionalProduct URL slug (auto-generated from name if omitted)
descriptionstringOptionalProduct description (defaults to empty string if omitted)
compare_at_pricenumberOptionalOriginal price (for showing discounts)
currencystringOptionalCurrency code (default: INR)
stock_quantityintegerOptionalAvailable stock quantity
availabilitystringOptionalStock availability: in stock or out of stock
statusstring | booleanOptionalProduct status: Active, Draft, Archived (or boolean true/false)
external_idstringOptionalExternal SKU or product ID
imagestringOptionalProduct image URL
brandstringOptionalProduct brand name
item_typestringOptionalItem classification: product or service
product_urlstringOptionalExternal product URL
tagsarray | stringOptionalProduct tags array or comma-separated string
category_idintegerOptionalCategory ID reference

Shop CRUD responses wrap the result in data. Creates return HTTP 201; deletes return 200 JSON confirmation ({ "status": "success", "message": "...", "id": 1 }). List endpoints return complete arrays under data. Example product response:

Response

201 Created
{
  "data": {
  "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 (slug auto-generated if omitted)

GET
/v1/shop/categories/{id}

Get category details

PUT
/v1/shop/categories/{id}

Update category

DELETE
/v1/shop/categories/{id}

Delete category (returns 200 JSON)

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
slugstringOptionalUnique category slug (auto-generated from name if omitted)
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 (supports status, payment_status, contact_id, source, search, limit)

GET
/v1/shop/orders/{id}

Get order details

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

Update order status, payment status, and tracking metadata

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",
    "payment_status": "Paid",
    "tracking_number": "SR-982341",
    "tracking_url": "https://shiprocket.co/tracking/SR-982341",
    "notes": "Dispatched via express courier"
  }'

Request Body

ParameterTypeRequiredDescription
statusstringRequiredNew order status (Pending, Processing, Shipped, Fulfilled, Delivered, Cancelled, Refunded)
payment_statusstringOptionalOptional payment status (Pending, Paid, Failed, Refunded, COD)
tracking_numberstringOptionalOptional shipment tracking number
tracking_urlURLOptionalOptional shipment tracking URL
notesstringOptionalOptional order fulfillment notes

Valid Order Statuses

PendingProcessingShippedFulfilledDeliveredCancelledRefunded

Abandoned Carts & Store Analytics

Inspect active and abandoned shopping carts, generate one-click recovery checkout links, dispatch WhatsApp cart recovery reminders, and retrieve storefront performance statistics.

GET
/v1/shop/carts

List shopping carts (filters: abandoned_only, recovered, contact_id, limit)

GET
/v1/shop/carts/{id}

Get shopping cart details and line items

POST
/v1/shop/carts/{id}/recover

Generate a recovery checkout URL for an abandoned cart

POST
/v1/shop/carts/{id}/notify

Send a WhatsApp abandoned cart reminder message to the customer

GET
/v1/shop/stats

Get storefront catalog, order, revenue, and abandoned cart analytics

ERP Sync

Synchronize product details from your ERP. This endpoint applies external_id, name, description, price, status and image; it does not update stock_quantity. Use authenticated product PUT/PATCH for stock updates. Records without external_id or name are skipped.

POST
/shop/erp/syncBearer token required

Sync product details from ERP (stock is updated via product PUT/PATCH)

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",
        "status": "Active",
        "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

Shopify webhooks require valid HMAC-SHA256 signatures. WooCommerce HMAC validation applies when a webhook secret is configured; configure this secret before enabling an integration.

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