Skip to content

PUT/products/{id}

Replace product

Full replacement. All mutable fields overwritten. Triggers `products.updated` webhook.

Parameters 1

NameTypeDescription
idrequiredpath · integerResource identifier

ReturnsProduct

AcceptsProductInput

Bearer token required

Response examples

200Product replaced

application/json example derived from schema

{
  "id": 1,
  "categoryId": 4,
  "name": "Desk Lamp",
  "description": "Ultra-fast connectivity with rock-solid reliability.",
  "price": 161.28,
  "originalPrice": 231.38,
  "currency": "USD",
  "stock": 257,
  "sku": "SKU-00001",
  "rating": 4.4,
  "reviewCount": 188,
  "image": "https://picsum.photos/seed/prod1/400/400",
  "images": [
    "https://picsum.photos/seed/prod1-0/400/400",
    "https://picsum.photos/seed/prod1-1/400/400",
    "https://picsum.photos/seed/prod1-2/400/400",
    "https://picsum.photos/seed/prod1-3/400/400",
    "https://picsum.photos/seed/prod1-4/400/400"
  ],
  "weight": 9.19,
  "dimensions": {
    "width": 33.4,
    "height": 40,
    "depth": 14.6
  },
  "isAvailable": true,
  "isFeatured": false,
  "tags": [
    "backend"
  ],
  "createdAt": "2024-05-30T01:37:26.059Z",
  "updatedAt": "2026-12-15T02:55:19.943Z"
}
400400 — invalid input or malformed JSON

application/json

{
  "error": {
    "status": 400,
    "message": "Request body required"
  }
}
404404 — resource not found

application/json

{
  "error": {
    "status": 404,
    "message": "users #999 not found"
  }
}

Released under the MIT License.