> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a product

> Updates a product in the store.

Updates a product in the store. All fields are optional; only the supplied fields change. `shop` and `user` are stripped and cannot be reassigned. Supplying `variants` merges by variant `_id` (existing) or adds new ones. Requires the `WRITE_INVENTORY` scope.


## OpenAPI

````yaml PUT /products/{id}
openapi: 3.1.0
info:
  title: Salesive Apps API — Catalog
  description: >-
    Catalog data endpoints (products, foods and services) callable by an
    installed third-party app using its app access token. The target store is
    bound to the token server-side by the OAuth install flow.
  version: 1.0.0
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /products/{id}:
    put:
      tags:
        - products
      summary: Update a product
      description: >-
        Updates a product in the store. All fields are optional; only the
        supplied fields change. `shop` and `user` are stripped and cannot be
        reassigned. Supplying `variants` merges by variant `_id` (existing) or
        adds new ones. Requires the `WRITE_INVENTORY` scope.
      operationId: updateProduct
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ObjectId of the product to update.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Product name.
                description:
                  type: string
                  description: Product description (max 10000 chars).
                price:
                  type: number
                  description: Base price (>= 0).
                weight:
                  type: number
                  description: Weight (>= 0).
                quantity:
                  type: integer
                  description: Stock quantity (>= 0).
                promoPrice:
                  type: number
                  nullable: true
                  description: Sale/promotional price (>= 0); nullable.
                category:
                  type: string
                  description: Category ObjectId.
                images:
                  type: array
                  items:
                    type: string
                  description: Array of image URLs.
                video:
                  type: string
                  nullable: true
                  description: Video URL; nullable.
                featured:
                  type: boolean
                  description: Whether the product is featured.
                listed:
                  type: boolean
                  description: Whether the product is listed in the storefront.
                lowStockAlert:
                  type: number
                  description: Low-stock threshold (>= 0).
                variants:
                  type: array
                  items:
                    $ref: '#/components/schemas/Variant'
                  description: >-
                    Product variants; merged by variant _id or appended. Each
                    variant: attributes (required), price (required),
                    promoPrice, quantity, weight, sku.
                barcode:
                  type: string
                  nullable: true
                  description: Product barcode; nullable.
              example:
                price: 17.99
                quantity: 95
                featured: false
      responses:
        '200':
          description: Update a product — success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - success
                  - message
                  - data
                properties:
                  status:
                    type: integer
                    example: 200
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Update a product
                  data:
                    allOf:
                      - $ref: '#/components/schemas/Product'
                    example:
                      _id: 66a1f2c4e1b3a40012ab34cd
                      name: Classic Tee
                      slug: classic-tee
                      description: Soft cotton t-shirt
                      price: 17.99
                      promoPrice: 14.99
                      weight: 0.3
                      quantity: 95
                      category:
                        _id: 66a1f0aae1b3a40012ab1100
                        name: Apparel
                      images:
                        - https://cdn.salesive.com/p/classic-tee.jpg
                      featured: false
                      listed: true
                      hasVariants: false
                      variants: []
                      shop:
                        _id: 66a1eee0e1b3a40012ab0001
                        name: Acme Store
                        currency:
                          symbol: $
                          code: USD
                      updatedAt: '2026-06-28T09:15:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    Variant:
      type: object
      description: A product variant.
      required:
        - attributes
        - price
      properties:
        _id:
          type: string
          description: Variant ObjectId (existing variants).
        attributes:
          type: object
          description: 'Map of attribute name to value (e.g. { "color": "green" }).'
          additionalProperties:
            type: string
        price:
          type: number
          minimum: 0
        promoPrice:
          type: number
          minimum: 0
          nullable: true
        quantity:
          type: integer
          minimum: 0
        weight:
          type: number
          minimum: 0
        sku:
          type: string
    Product:
      type: object
      description: An ecommerce catalog product.
      properties:
        _id:
          type: string
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        price:
          type: number
        promoPrice:
          type: number
          nullable: true
        weight:
          type: number
        quantity:
          type: integer
        category:
          $ref: '#/components/schemas/CategoryRef'
        images:
          type: array
          items:
            type: string
        video:
          type: string
          nullable: true
        featured:
          type: boolean
        listed:
          type: boolean
        hasVariants:
          type: boolean
        variants:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
        lowStockAlert:
          type: number
        barcode:
          type: string
          nullable: true
        shop:
          $ref: '#/components/schemas/ShopRef'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    CategoryRef:
      description: >-
        Category. Populated as an object on reads, accepted/returned as an id
        string on writes.
      nullable: true
      oneOf:
        - type: string
          description: Category ObjectId.
        - type: object
          properties:
            _id:
              type: string
            name:
              type: string
              example: Apparel
            slug:
              type: string
    ShopRef:
      description: >-
        The owning store. Bound server-side to the app token; populated as an
        object on reads, returned as an id string on writes.
      oneOf:
        - type: string
          description: Store ObjectId.
        - type: object
          properties:
            _id:
              type: string
            name:
              type: string
              example: Acme Store
            logo:
              type: string
              nullable: true
            currency:
              $ref: '#/components/schemas/Currency'
            isActive:
              type: boolean
    Currency:
      type: object
      description: The store's currency.
      properties:
        _id:
          type: string
        name:
          type: string
        symbol:
          type: string
          example: $
        code:
          type: string
          example: USD
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 401
              success:
                type: boolean
                example: false
              message:
                type: string
                example: Unauthorized
              data:
                type: object
                nullable: true
    Forbidden:
      description: >-
        The app token is valid but lacks the OAuth scope required by this
        endpoint.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 403
              success:
                type: boolean
                example: false
              message:
                type: string
                example: 'Forbidden: missing required scope'
              data:
                type: object
                nullable: true
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````