---
title: "Update an existing product"
url: "https://developer.apiprimer.com/apis/product-inventory-api/versions/b23daac0-23b7-4663-8306-2f0b7d604314/paths/products-productId/put"
---

> Full API specification: https://developer.apiprimer.com/apis/product-inventory-api/versions/b23daac0-23b7-4663-8306-2f0b7d604314.md

# Update an existing product

`PUT` `/products/{productId}`

## Path parameters

- `productId` (string, required) - ID of the product to update

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Product updated successfully
- `404` - Product not found

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Product Inventory API
  version: 1.0.0
servers:
  - url: https://api.apiprimer.com
paths:
  /products/{productId}:
    put:
      summary: Update an existing product
      parameters:
        - in: path
          name: productId
          required: true
          schema:
            type: string
          description: ID of the product to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the product
                description:
                  type: string
                  description: Product description
                price:
                  type: number
                  format: float
                  description: Price of the product
      responses:
        "200":
          description: Product updated successfully
        "404":
          description: Product not found
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
```
