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

# Create a Product

> Creates a Product



## OpenAPI

````yaml /api-reference/platform.yaml post /api/v2/platform/products
openapi: 3.0.3
info:
  title: Platform API
  contact:
    name: Vendo Connect Inc.
    url: https://getvendo.com
    email: sales@getvendo.com
  description: Spree Platform API
  version: v2
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Addresses
  - name: Adjustments
  - name: Classifications
  - name: Countries
  - name: CMS Pages
  - name: CMS Sections
  - name: Digital Assets
  - name: Digital Links
  - name: Line Items
  - name: Menus
  - name: Menu Items
  - name: Option Types
  - name: Option Values
  - name: Orders
  - name: Payments
  - name: Payment Methods
  - name: Products
  - name: Promotions
  - name: Promotion Actions
  - name: Promotion Categories
  - name: Promotion Rules
  - name: Roles
  - name: Shipments
  - name: Shipping Categories
  - name: Shipping Methods
  - name: States
  - name: Stock Items
  - name: Stock Locations
  - name: Store Credit Categories
  - name: Store Credit Types
  - name: Store Credits
  - name: Tax Categories
  - name: Tax Rates
  - name: Taxons
  - name: Taxonomies
  - name: Users
  - name: Variants
  - name: Vendors
  - name: Webhook Events
  - name: Webhook Subscribers
  - name: Wishlists
  - name: Wished Items
  - name: Zones
paths:
  /api/v2/platform/products:
    post:
      tags:
        - Products
      summary: Create a Product
      description: Creates a Product
      operationId: create-product
      parameters:
        - name: include
          in: query
          description: >-
            Select which associated resources you would like to fetch, see: <a
            href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
          example: prices
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_product_params'
      responses:
        '201':
          description: Record created
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '168'
                      type: product
                      attributes:
                        name: Spinning Top
                        description: null
                        available_on: null
                        deleted_at: null
                        slug: spinning-top
                        meta_description: null
                        meta_keywords: null
                        created_at: '2022-11-08T19:34:53.239Z'
                        updated_at: '2022-11-08T19:34:53.243Z'
                        promotionable: true
                        meta_title: null
                        discontinue_on: null
                        public_metadata: {}
                        private_metadata: {}
                        status: draft
                        make_active_at: null
                        display_compare_at_price: null
                        display_price: $87.43
                        purchasable: false
                        in_stock: false
                        backorderable: false
                        available: false
                        currency: USD
                        price: '87.43'
                        compare_at_price: null
                      relationships:
                        tax_category:
                          data: null
                        primary_variant:
                          data:
                            id: '235'
                            type: variant
                        default_variant:
                          data:
                            id: '235'
                            type: variant
                        variants:
                          data: []
                        option_types:
                          data: []
                        product_properties:
                          data: []
                        taxons:
                          data: []
                        images:
                          data: []
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: >-
                      Name can't be blank, Shipping Category can't be blank, and
                      Price can't be blank
                    errors:
                      name:
                        - can't be blank
                      shipping_category:
                        - can't be blank
                      price:
                        - can't be blank
              schema:
                $ref: '#/components/schemas/validation_errors'
      security:
        - bearer_auth: []
components:
  schemas:
    create_product_params:
      type: object
      properties:
        product:
          type: object
          required:
            - name
            - price
            - shipping_category_id
          properties:
            name:
              type: string
            description:
              type: string
            available_on:
              type: string
            discontinue_on:
              type: string
            permalink:
              type: string
            meta_description:
              type: string
            meta_keywords:
              type: string
            price:
              type: string
            sku:
              type: string
            deleted_at:
              type: string
            prototype_id:
              type: string
            option_values_hash:
              type: string
            weight:
              type: string
            height:
              type: string
            width:
              type: string
            depth:
              type: string
            shipping_category_id:
              type: string
            tax_category_id:
              type: string
            cost_currency:
              type: string
            cost_price:
              type: string
            compare_at_price:
              type: string
            option_type_ids:
              type: string
            taxon_ids:
              type: string
            public_metadata:
              type: object
            private_metadata:
              type: object
      required:
        - product
      x-internal: false
    resource:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/resource_properties'
      required:
        - data
      x-internal: false
    validation_errors:
      type: object
      properties:
        error:
          type: string
        errors:
          type: object
      required:
        - error
        - errors
      x-internal: false
    resource_properties:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
        relationships:
          type: object
      required:
        - id
        - type
        - attributes
      x-internal: false
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````