Shop API Documentation v1.0

Detailed references, endpoints, and examples for integrating your custom storefronts or ERPs with the WACM Shop Module.

Download as .md

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

GET

/products

Retrieves all active products belonging to your company.


POST

/products

Create a new product.

ParameterTypeDescription
nameString RequiredName of the product.
priceNumber RequiredSelling price.
descriptionStringDetailed description.
stock_quantityIntegerAvailable inventory amount.
statusStringActive, Draft, or Archived.
Response Example
{
  "data": {
    "id": 105,
    "name": "Summer Dress",
    "price": "49.99",
    "status": "Active"
  }
}

Categories

GET

/categories

Retrieve all product categories.


POST

/categories

Create a new category. Required fields: name and slug.

Orders

GET

/orders

Retrieve a list of all orders.


PUT

/orders/{id}/status

Update the fulfillment status of an order.

ParameterTypeDescription
statusString RequiredMust be one of: Pending, Processing, Shipped, Delivered, Cancelled, Refunded.

Bulk ERP Sync

POST

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.