> ## 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.

# Duplicate a product

> Creates a copy of an existing product in the same store.

Creates a copy of an existing product in the same store. The copy's name is suffixed with "(Copy)" and a fresh slug, IDs and timestamps are generated. Requires the `WRITE_INVENTORY` scope.


## OpenAPI

````yaml POST /products/{id}/duplicate
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}/duplicate:
    post:
      tags:
        - products
      summary: Duplicate a product
      description: >-
        Creates a copy of an existing product in the same store. The copy's name
        is suffixed with "(Copy)" and a fresh slug, IDs and timestamps are
        generated. Requires the `WRITE_INVENTORY` scope.
      operationId: duplicateProduct
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ObjectId of the product to duplicate.
      responses:
        '201':
          description: Duplicate a product — success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - success
                  - message
                  - data
                properties:
                  status:
                    type: integer
                    example: 201
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Duplicate a product
                  data:
                    allOf:
                      - $ref: '#/components/schemas/Product'
                    example:
                      _id: 66a1f9aae1b3a40012ab9999
                      name: Classic Tee (Copy)
                      slug: classic-tee-copy
                      description: Soft cotton t-shirt
                      price: 19.99
                      weight: 0.3
                      quantity: 120
                      category: 66a1f0aae1b3a40012ab1100
                      images:
                        - https://cdn.salesive.com/p/classic-tee.jpg
                      featured: true
                      listed: true
                      shop: 66a1eee0e1b3a40012ab0001
                      createdAt: '2026-06-28T09:05:00.000Z'
                      updatedAt: '2026-06-28T09:05:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    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
    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
    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.

````