Shop API Documentation v1.0
Detailed references, endpoints, and examples for integrating your custom storefronts or ERPs with the WACM Shop Module.
Endpoints
Core API
Authentication
API requests require a Bearer Token. This can be passed in two ways:
1. HTTP Header (Recommended)
Authorization: Bearer YOUR_API_TOKEN
2. Query Parameter
If your system cannot send HTTP headers, you can append the token to the URL:
?token=YOUR_API_TOKEN
Base URL: https://app.wacm.in/api/v1/shop
Quick Start & Integration Flow
To seamlessly integrate your external system with WACM Shop, follow this general order of operations:
1. Obtain your Token
Log in to your WACM dashboard and navigate to your API settings to generate your Personal Access Token.
2. Push Categories
Make a POST request to /categories to establish your product taxonomy. Save the returned Category IDs in your system.
3. Push Products
Make a POST request to /products. Attach the newly created shop_category_id to each item.
4. Process Orders
Poll the /orders endpoint to receive new purchases, or use the WACM Webhook engine to listen for real-time order events.
5. Update Statuses
Once you fulfill or ship an item, send a PUT request to /orders/{id}/status with the new status.
Products
/products
Retrieves all active products belonging to your company.
/products
Create a new product.
| Parameter | Type | Description |
|---|---|---|
name | String Required | Name of the product. |
price | Number Required | Selling price. |
description | String | Detailed description. |
stock_quantity | Integer | Available inventory amount. |
status | String | Active, Draft, or Archived. |
Response Example
{
"data": {
"id": 105,
"name": "Summer Dress",
"price": "49.99",
"status": "Active"
}
}
Categories
/categories
Retrieve all product categories.
/categories
Create a new category. Required fields: name and slug.
Orders
/orders
Retrieve a list of all orders.
/orders/{id}/status
Update the fulfillment status of an order.
| Parameter | Type | Description |
|---|---|---|
status | String Required | Must be one of: Pending, Processing, Shipped, Delivered, Cancelled, Refunded. |
Bulk ERP Sync
https://app.wacm.in/api/shop/erp/sync
Unlike the V1 API endpoints above which process one record at a time via Sanctum tokens, the Bulk ERP Sync endpoint uses a unique ERP Token and accepts a massive array of products in a single POST request for rapid inventory synchronization.
You can find your ERP Token in the Shop > Integrations settings tab.