Zopping

Stock overrides & purchase limits

Constrain what's purchasable beyond raw stock — hold back a safety buffer, cap min/max purchasable quantity, or set bulk thresholds — scoped by product, category or tag, and optionally by order type. The advanced companion to Manage stock & prices.

When to use

  • Safety buffer — never sell the last N units (stockBuffer).
  • Per-order caps — min/max a shopper can buy in one order.
  • Order-type rules — different limits for DELIVERY vs PICKUP.
  • Bulk gating — a threshold above which an order is treated as bulk.

Define an override

Scope it with type (PRODUCT · CATEGORY · TAG) and entityId:

curl -X PUT https://zopping.com/api/catalogue-service/stock-override \
  -H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
  -d '{
    "organizationId": "<org-id>",
    "storeId": "<store-id>",
    "type": "PRODUCT",
    "entityId": 88120,
    "stockBuffer": 10,
    "minPurchasableStock": 1,
    "maxPurchasableStock": 20,
    "orderType": "DELIVERY"
  }'

A category- or tag-scoped override applies to every product underneath it — handy for "max 2 per order across all of Tobacco".

List overrides

curl "https://zopping.com/api/catalogue-service/stock-override?organizationId=<org-id>&storeId=<store-id>&type=PRODUCT&entityId=88120" \
  -H "Authorization: Bearer $ZOPPING_TOKEN"

Remove one with DELETE /api/catalogue-service/stock-override.

How it interacts with stock

Overrides sit on top of the raw stock you set via items: effective purchasable = stock minus stockBuffer, clamped to the min/max band.

Reference: Inventory → Stock overrides.