Create a Product

Create a Product

POST https://api.moltin.com/v2/products

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API

Request Body

NameTypeDescription

type

string

Represents the type of object being created

name

string

A human readable name for this product

slug

string

A unique slug for this product

sku

string

A unique SKU for this product

manage_stock

boolean

True if moltin should manage stock, false if not

description

string

A human readable description of the product

price

array

An array of prices, one for each currency

price.amount

integer

Value of the price

price.currency

string

Currency of this price (3 letter ISO)

price.includes_tax

boolean

true if relevant taxes have been included in the price, false if not

status

string

draft, live

commodity_type

string

physical, digital

{
    "data": {
        "type": "product",
        "id": "e41f25d8-a2c2-4af2-b316-364f3fc8048d",
        "name": "Deck Shoe",
        "slug": "deck-shoe_33",
        "sku": "deck-shoe_33",
        "manage_stock": false,
        "description": "Modern boat shoes were invented in 1935 by American Paul A. Sperry",
        "price": [
            {
                "amount": 5891,
                "currency": "USD",
                "includes_tax": true
            }
        ],
        "status": "live",
        "commodity_type": "physical",
        "relationships": {},
        "meta": {
            "display_price": {
                "with_tax": {
                    "amount": 5891,
                    "currency": "USD",
                    "formatted": "$58.91"
                },
                "without_tax": {
                    "amount": 5891,
                    "currency": "USD",
                    "formatted": "$58.91"
                }
            },
            "stock": {
                "level": 0,
                "availability": "out-stock"
            }
        }
    }
}
curl -X POST https://api.moltin.com/v2/products \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
        "data": {
            "type": "product",
            "name": "Deck Shoe",
            "slug": "deck-shoe",
            "sku": "deck-shoe-001",
            "description": "Modern boat shoes were invented in 1935 by American Paul A. Sperry",
            "manage_stock": true,
            "price": [
            {
                "amount": 5891,
                "currency": "USD",
                "includes_tax": true
            }
            ],
            "status": "live",
            "commodity_type": "physical"
        }
    }'

Last updated