Products ======== .. contents:: :depth: 2 Both our drafts API and posts API support product creation. The product information can be saved inside to a post in using a `Shopify API `_-compatible schema. Parameters ********** +-------------------+------------------+---------------------------------------------------+ | Name | Type | Description | +===================+==================+===================================================+ | ``id`` | String | Product ID - Required | +-------------------+------------------+---------------------------------------------------+ | ``body_html`` | String | Body HTML - Optional | +-------------------+------------------+---------------------------------------------------+ | ``images`` | Array of Objects | Images information, refer to | | | | :ref:`product image section ` for | | | | more information - Optional | +-------------------+------------------+---------------------------------------------------+ | ``product_type`` | String | Product type or category - Optional | +-------------------+------------------+---------------------------------------------------+ | ``tags`` | Array of Strings | Tags - Optional | +-------------------+------------------+---------------------------------------------------+ | ``title`` | String | Title - Required | +-------------------+------------------+---------------------------------------------------+ | ``variants`` | Array of Objects | Variants information, refer to | | | | :ref:`product variant section ` | | | | for more information - Optional | +-------------------+------------------+---------------------------------------------------+ | ``vendor`` | String | Vendor - Optional | +-------------------+------------------+---------------------------------------------------+ .. _product-image: Image Parameters **************** =================== ================ =========================================== Name Type Description =================== ================ =========================================== ``id`` Integer Image ID - Required ``product_id`` String Product ID - Required ``position`` Integer Position - Optional ``width`` Integer Width - Optional ``height`` Integer Height - Optional ``src`` String Location - Optional =================== ================ =========================================== .. _product-variant: Variant Parameters ****************** +-----------------------+------------------+---------------------------------------------------+ | Name | Type | Description | +=======================+==================+===================================================+ | ``id`` | String | Variant ID - Required | +-----------------------+------------------+---------------------------------------------------+ | ``barcode`` | String | Barcode - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``compare_at_price`` | String | Price to compare to - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``image_id`` | Integer | Image ID - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``price`` | String | Price - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``product_id`` | String | Product ID - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``requires_shipping`` | Boolean | Indicates whether the product requires shipping | | | | - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``sku`` | String | SKU - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``taxable`` | String | Indicates whether taxes applies to the product - | | | | Optional | +-----------------------+------------------+---------------------------------------------------+ | ``tax_code`` | String | Tax code - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``title`` | String | Title - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``weight`` | String | Weight value - Optional | +-----------------------+------------------+---------------------------------------------------+ | ``weight_unit`` | String || Weight unit - Optional | | | || Choices available: | | | | | | | | - ``"g"`` (Grams) | | | | - ``"kg"`` (Kilograms) | | | | - ``"oz"`` (Ounces) | | | | - ``"lb"`` (Pounds) | +-----------------------+------------------+---------------------------------------------------+