Login / Register
PATCH
/api/public/v1/products/{productId}

Update a product

Update one or more fields on a product. `cost` (the wholesale cost) is `null` unless the credential also holds `purchasing:costs` at that location.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

products:write

Path Parameters

NameTypeRequiredDescription
productIdstringRequiredProduct ID.

Request Body

PropertyTypeDescription
namestringProduct name.
descriptionstringProduct description.
pricenumberPrice in cents.
stocknumberCurrent stock count.
stockUnitstringUnit label for stock.
stockEnabledbooleanToggle stock tracking.
recurringbooleanBill this product on a recurring schedule.
recurringIntervalstringBilling interval.
recurringIntervalCountnumberNumber of intervals between charges.
allergensarrayWhat it contains that people are allergic to: any of `milk`, `eggs`, `fish`, `shellfish`, `tree-nuts`, `peanuts`, `wheat`, `soy`, `sesame`. Replaces the list.
dietaryTagsarrayWhat it suits: any of `vegetarian`, `vegan`, `gluten-free`, `dairy-free`, `halal`, `kosher`, `spicy`. Replaces the list.
prepMinutesnumberMinutes one takes to make (1–240), or `null` for none. A kitchen ticket holding it is given at least this long before it reads as late.
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/products/{productId}" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "price": 14000,
    "stock": 25,
    "stockEnabled": true
  }'
200Example response
json
{
  "message": "Product updated successfully!",
  "content": {
    "product": {
      "id": "prod_1"
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Inventory → Products
/inventory/products
  1. Open a product and edit it.