Skip to main content
POST
/
api
/
dashboard
/
products
Create Product
curl --request POST \
  --url https://api.example.com/api/dashboard/products \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "description": "<string>",
  "vendor": "<string>",
  "product_type": "<string>",
  "tags": [
    "<string>"
  ],
  "price": 1,
  "compare_at_price": 1,
  "cost_per_item": 1,
  "currency": "USD",
  "images": [
    {
      "url": "<string>",
      "alt": "<string>",
      "position": 0
    }
  ],
  "options": [
    {
      "name": "<string>",
      "values": [
        "<string>"
      ]
    }
  ],
  "track_inventory": true,
  "status": "active"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "slug": "<string>",
  "description": "<string>",
  "vendor": "<string>",
  "product_type": "<string>",
  "tags": [
    "<string>"
  ],
  "price": "<string>",
  "compare_at_price": "<string>",
  "cost_per_item": "<string>",
  "currency": "<string>",
  "images": [
    {}
  ],
  "has_variants": true,
  "options": [
    {}
  ],
  "variants": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sku": "<string>",
      "barcode": "<string>",
      "option1": "<string>",
      "option2": "<string>",
      "option3": "<string>",
      "price": "<string>",
      "compare_at_price": "<string>",
      "cost_per_item": "<string>",
      "inventory_quantity": 123,
      "inventory_policy": "<string>",
      "low_stock_threshold": 123,
      "weight": "<string>",
      "weight_unit": "<string>",
      "requires_shipping": true,
      "image_url": "<string>",
      "available": true,
      "is_low_stock": true,
      "is_out_of_stock": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "track_inventory": true,
  "total_inventory": 123,
  "in_stock": true,
  "status": "<string>",
  "published_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null
X-API-Key
string | null
X-Stella-Merchant-Id
string | null

Body

application/json

Schema for creating a product.

name
string
required
Maximum string length: 255
slug
string | null
Maximum string length: 255
description
string | null
vendor
string | null
Maximum string length: 255
product_type
string | null
Maximum string length: 255
tags
string[] | null
price
Required range: x >= 0
compare_at_price
Required range: x >= 0
cost_per_item
Required range: x >= 0
currency
string
default:USD
Maximum string length: 3
images
ImageCreate · object[] | null
options
ProductOptionCreate · object[] | null
track_inventory
boolean
default:true
status
string
default:active
Pattern: ^(active|draft|archived)$

Response

Successful Response

Schema for product in responses.

id
string<uuid>
required
merchant_id
string<uuid>
required
name
string
required
slug
string | null
required
description
string | null
required
vendor
string | null
required
product_type
string | null
required
tags
string[] | null
required
price
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
compare_at_price
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cost_per_item
string | null
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
currency
string
required
images
Images · object[]
required
has_variants
boolean
required
options
Options · object[]
required
variants
VariantResponse · object[]
required
track_inventory
boolean
required
total_inventory
integer
required
in_stock
boolean
required
status
string
required
published_at
string<date-time> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required