Single Product Inventory Update API

The Single Product Update API allows you to update inventory, pricing, and availability settings for a specific product at a specific location.
This endpoint is ideal for real-time stock updates, manual adjustments, or syncing individual product changes from external systems.


Endpoint

POST

/mulopimfwc/v1/inventory/update

Headers

KeyValue
Content-Typeapplication/json
X-API-Keyyour-api-key-here

🔐 The X-API-Key is required for authentication. Requests without a valid API key will be rejected. Please set up the API first by following the documentation.


Request Body

The request body contains product identification, location identification, and inventory-related fields.

You must specify both:

  • A product identifier (product_id or sku)
  • A location identifier (location_id or location_slug)

Request Body Example

{
  "product_id": 456,
  "location_id": 3,
  "stock": 25,
  "regular_price": "39.99",
  "sale_price": "34.99",
  "backorders": "no",
  "disabled": false
}

Field Description

FieldTypeRequiredDescription
product_idintegerOptionalWooCommerce Product ID (required if SKU is not provided)
skustringOptionalProduct SKU (required if product_id is not provided)
location_idintegerOptionalLocation ID (required if location_slug is not provided)
location_slugstringOptionalLocation slug
stockintegerYesStock quantity for the product at the specified location
regular_pricestringOptionalRegular price of the product
sale_pricestringOptionalSale price (must be lower than regular price)
backordersstringOptionalBackorder status (no, notify, yes)
disabledbooleanOptionalDisable product availability for this location (true or false)

Backorder Values

ValueMeaning
noBackorders not allowed
notifyAllow backorders and notify customer
yesAllow backorders without notification

Response Example

{
  "success": true,
  "message": "Inventory updated successfully.",
  "data": {
    "product_id": 456,
    "location_id": 3,
    "sku": "PROD-456"
  }
}

Response Fields

FieldDescription
successIndicates whether the update was successful
messageHuman-readable status message
data.product_idUpdated product ID
data.location_idUpdated location ID
data.skuProduct SKU

Behavior Notes

  • If stock is set to 0, the product will be treated as out of stock for that location.
  • Setting disabled: true will make the product unavailable at the specified location without deleting inventory data.
  • Pricing updates apply only to the selected location, not globally.

Error Handling

  • Missing required identifiers will return a validation error.
  • Invalid price values (e.g., sale price higher than regular price) will cause the request to fail.
  • Errors are returned with descriptive messages to help debugging.