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

# Create a product

> Creates a product in the store.

Creates a product in the store. The `shop` and owning user are set server-side from the installation and must not be supplied. Requires the `WRITE_INVENTORY` scope.


## OpenAPI

````yaml POST /products
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:
    post:
      tags:
        - products
      summary: Create a product
      description: >-
        Creates a product in the store. The `shop` and owning user are set
        server-side from the installation and must not be supplied. Requires the
        `WRITE_INVENTORY` scope.
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Product name.
                description:
                  type: string
                  description: Product description.
                price:
                  type: number
                  description: Base price (>= 0).
                weight:
                  type: number
                  description: Weight (>= 0).
                category:
                  type: string
                  description: Category ObjectId.
                quantity:
                  type: integer
                  description: Stock quantity (>= 0).
                promoPrice:
                  type: number
                  nullable: true
                  description: Sale/promotional price (>= 0); nullable.
                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. Default false.
                listed:
                  type: boolean
                  description: >-
                    Whether the product is listed in the storefront. Default
                    true.
                variants:
                  type: array
                  items:
                    $ref: '#/components/schemas/Variant'
                  nullable: true
                  description: >-
                    Product variants. Each: attributes (object of
                    string->string, required), price (number, required),
                    promoPrice (number, nullable), quantity (integer), weight
                    (number), sku (string).
                lowStockAlert:
                  type: number
                  description: Threshold at which the product is flagged low-stock (>= 0).
                barcode:
                  type: string
                  nullable: true
                  description: Product barcode; nullable.
              required:
                - name
                - description
                - price
                - weight
                - category
              example:
                name: Classic Tee
                description: Soft cotton t-shirt
                price: 19.99
                weight: 0.3
                category: 66a1f0aae1b3a40012ab1100
                quantity: 120
                promoPrice: 14.99
                images:
                  - https://cdn.salesive.com/p/classic-tee.jpg
                featured: true
                listed: true
                lowStockAlert: 10
                barcode: '0123456789012'
      responses:
        '201':
          description: Create 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: Create a product
                  data:
                    allOf:
                      - $ref: '#/components/schemas/Product'
                    example:
                      _id: 66a1f2c4e1b3a40012ab34cd
                      name: Classic Tee
                      slug: classic-tee
                      description: Soft cotton t-shirt
                      price: 19.99
                      promoPrice: 14.99
                      weight: 0.3
                      quantity: 120
                      category: 66a1f0aae1b3a40012ab1100
                      images:
                        - https://cdn.salesive.com/p/classic-tee.jpg
                      featured: true
                      listed: true
                      hasVariants: false
                      variants: []
                      lowStockAlert: 10
                      barcode: '0123456789012'
                      shop: 66a1eee0e1b3a40012ab0001
                      createdAt: '2026-06-28T09:00:00.000Z'
                      updatedAt: '2026-06-28T09:00: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.

````