Requires write_products access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/products/products.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Create a new product in the store.
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • productobject
    Product information.
  • created_at string
    The date and time when the product was created, which must be no earlier than 1990-01-01T00:00:00+08:00. Format: ISO 8601.
    If not provided, the time defaults to when this API call is received.
  • product_category string
    The product category customized by the merchant.
    Maximum length: 255
  • variantsobject[]
    A list of product variants.
    Maximum size: 500
  • option2 string
    Information of the second option of the variant.
    Maximum length: 255
  • taxable boolean
    Indicates whether the variant is subject to tax.
    • true: Tax is required.
    • false: Tax is not required.
    Default value: true
  • option5 string
    Information of the fifth option of the variant.
    Maximum length: 255
  • sku string
    The product SKU. It is distinct from variant.id returned by SHOPLINE.
    Maximum size: 255
  • option4 string
    Information of the fourth option of the variant.
    Maximum length: 255
  • price string
    The selling price of the variant. The value is rounded to two decimal places.
    Default value: 0
  • barcode string
    The barcode of the variant.
    Maximum length: 255
  • compare_at_price string
    The original price of the variant. The value is rounded to two decimal places.
    Default value: 0
  • option1 string
    Information of the first option of the variant.
    Maximum length: 255
  • required_shipping boolean
    Indicates whether the variant is required to be shipped.
    • true: Shipping is required.
    • false: Shipping is not required.
    Default value: true
  • weight_unit string
    The unit of weight for the variant. Valid values are:
    • g: gram
    • kg: kilogram
    • lb: pound
    • oz: ounce
    • zh_kg: kilogram
    Default value: g
  • inventory_tracker boolean
    Indicates whether the inventory tracking is enabled.
    • true: Inventory tracking is enabled.
    • false: Inventory tracking is not enabled.
    Default value: true
  • option3 string
    Information of the third option of the variant.
    Maximum length: 255
  • weight string
    The weight of the variant. The value is required to be greater than 0,and rounded to two decimal places.
  • imageobject
    The image of the variant.
  • alt string
    The alternative textual description of the variant image, usually a word or phrase with the characteristics or content of the image.
    Maximum length: 512
  • src string
    The link to the variant image, represented as a URL.
    Maximum length: 255
  • inventory_policy string
    Indicates whether the variant is allowed to be oversold.
    • deny: overselling not allowed
    • continue: overselling allowed
    Default value: deny
  • vendor string
    The brand or vendor of the product.
    Maximum length: 255
  • handle string
    The semantically unique identifier for the product, which is generated based on title by default.
    Maximum length: 255
  • subtitle string
    The subtitle of the product.
    Maximum length: 400
  • published_at string
    The date and time when the product was published to the online store. Format: ISO 8601.
  • status string
    The status of the product. Valid values are:
    • active: products on shelves
    • draft: products off shelves
    • archived: products archiving
    Default value: draft
  • spu string
    The identifier customized for the product by the merchant. It is distinct from product.id returned by SHOPLINE.
  • template_path string
    The theme template of the product.
  • path string
    The relative path of the product page.
    Maximum length: 512
  • tags array
    A list of tags of the product.
    Maximum size: 250
    Maximum length per string: 255
    Example: [""]
  • title string
    The title of the product.
    Maximum length: 255
  • published_scope string
    The published scope of product sales channels. The value of this field is fixed to web, indicating an online store.
  • body_html string
    The product description.
    Maximum length: 512
  • optionsobject[]
    A list of product options.
    Maximum size: 5
  • values_images map
    The mapping relationship between the option value and the corresponding image URL.
    Example: {}
  • name string
    The name of the option.
    Maximum length: 255
  • imagesobject[]
    A list of product images.
    Maximum size: 502
  • src string
    The link to the product image, represented as a URL.
    Maximum length: 255
  • alt string
    The alternative textual description of the product image, usually a word or phrase with the characteristics or content of the image.
    Maximum length: 512
  • activated_at string
    The date and time when the product was put on the shelves, which must not be earlier than created_at. Format: ISO 8601.
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • productobject
    Product information.
  • product_type string
    The source of the product. Valid values are:
    • NORMAL : products maintained in the SHOPLINE Admin
    • POD_TEMPORARY : temporary products on the Product Option Customizer&ProductBundler app
    • TEMPORARY : other temporary products
  • body_html string
    The product description.
  • published_at string
    The date and time when the product was published to the online store. Format:ISO 8601.
  • spu string
    The identifier customized for the product by the merchant. It is distinct from product.id returned by SHOPLINE.
  • template_path string
    The theme template of the product.
  • imagesobject[]
    A list of product images.
  • alt string
    The alternative textual description of the product image, usually a word or phrase with the characteristics or content of the image.
  • id string
    The unique identifier for the product image.
  • src string
    The link to the product image, represented as a URL.
  • product_behavior string
    Used to identify the special behavior of the product. This field returns a value only under certain conditions.
    For example, if the product has potential risks, the field returns a value.
  • subtitle string
    The subtitle of the product.
  • vendor string
    The brand or vendor of the product.
  • id string
    The unique identifier for the product.
  • activated_at string
    The date and time when the product was put on the shelves. Format: ISO 8601.
  • imageobject
    The cover image of the product.
  • alt string
    The alternative textual description of the image, usually a word or phrase with the characteristics or content of the image.
  • id string
    The unique identifier for the image.
  • src string
    The link to the image, represented as a URL.
  • created_at string
    The date and time when the product was created. Format: ISO 8601.
  • handle string
    The semantically unique identifier for the product, which is generated based on title by default.
  • published_scope string
    The published scope of product sales channels. The value of this field is fixed to web, indicating an online store.
  • title string
    The title of the product.
  • variantsobject[]
    A list of product variants.
  • option2 string
    Information of the second option of the variant.
  • sku string
    The product SKU. It is distinct from variant.id returned by SHOPLINE.
  • inventory_quantity integer
    The total inventory quantity at all storage locations.
  • option3 string
    Information of the third option of the variant.
  • updated_at string
    The date and time when the variant was last updated. Format: ISO 8601.
  • weight string
    The weight of the variant. The value is rounded up if it exceeds two decimal places.
  • created_at string
    The date and time when the variant was created. Format: ISO 8601.
  • id string
    The unique identifier for the variant.
  • option4 string
    Information of the fourth option of the variant.
  • title string
    The title of the variant, assembled from the option values of the variant.
  • inventory_policy string
    Indicates whether the variant is allowed to be oversold.
    • deny: overselling not allowed
    • continue: overselling allowed
  • weight_unit string
    The unit of weight for the variant. Valid values are:
    • g: gram
    • kg: kilogram
    • lb: pound
    • oz: ounce
    • zh_kg: kilogram
  • compare_at_price string
    The original price of the variant. The value is rounded to two decimal places.
  • price string
    The selling price of the variant. The value is rounded to two decimal places.
  • taxable boolean
    Indicates whether the variant is subject to tax.
    • true: Tax is required.
    • false: Tax is not required.
  • imageobject
    The image of the variant.
  • alt string
    The alternative textual description of the variant image, usually a word or phrase with the characteristics or content of the image.
  • id string
    The unique identifier for the variant image.
  • src string
    The link to the variant image, represented as a URL.
  • option1 string
    Information of the first option of the variant.
  • option5 string
    Information of the fifth option of the variant.
  • required_shipping boolean
    Indicates whether the variant is required to be shipped.
    • true: Shipping is required.
    • false: Shipping is not required.
  • inventory_tracker boolean
    Indicates whether the inventory tracking is enabled.
    • true: Inventory tracking is enabled.
    • false: Inventory tracking is not enabled.
  • inventory_item_id string
    The unique identifier for the inventory item.
  • barcode string
    The barcode of the variant.
  • product_id string
    The unique identifier for the product corresponding to the variant.
  • optionsobject[]
    A list of product options.
  • id string
    The unique identifier for the option.
  • name string
    The name of the option.
  • option_valuesobject[]
    A list of product option values.
  • value string
    The option value.
  • id string
    The unique identifier for the option value.
  • product_id string
    The unique identifier for the product corresponding to the option.
  • values array
    A list of option values.
    Example: [""]
  • values_images map
    The mapping relationship between the option value and the corresponding image URL.
    Example: {}
  • updated_at string
    The date and time when the product was last updated. Format: ISO 8601.
  • product_category string
    The product category customized by the merchant.
  • status string
    The status of the product. Valid values are:
    • active: products on shelves
    • draft: products off shelves
    • archived: products archiving
  • tags string
    A list of tags of the product.
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "product": {
    "tags": [
      ""
    ],
    "options": [
      {
        "name": "",
        "values_images": {}
      }
    ],
    "path": "",
    "template_path": "",
    "vendor": "",
    "product_category": "",
    "activated_at": "",
    "subtitle": "",
    "status": "",
    "handle": "",
    "title": "",
    "body_html": "",
    "spu": "",
    "created_at": "",
    "images": [
      {
        "alt": "",
        "src": ""
      }
    ],
    "published_scope": "",
    "variants": [
      {
        "inventory_policy": "",
        "option2": "",
        "compare_at_price": "",
        "option3": "",
        "option1": "",
        "option5": "",
        "weight": "",
        "required_shipping": false,
        "image": {
          "alt": "",
          "src": ""
        },
        "weight_unit": "",
        "inventory_tracker": false,
        "price": "",
        "option4": "",
        "barcode": "",
        "sku": "",
        "taxable": false
      }
    ],
    "published_at": ""
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/products/products.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Create product
Request
{
"product": {
"spu": "S000001",
"handle": "shopline-2025-05-14",
"images": [
{
"src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png",
"alt": "This is a image alt"
}
],
"published_scope": "web",
"subtitle": "This is a subtitle",
"variants": [
{
"taxable": true,
"compare_at_price": "11.2",
"sku": "T0000000001",
"weight_unit": "kg",
"option2": "L",
"price": "10.11",
"barcode": "B000000001",
"option5": "",
"option4": "",
"required_shipping": true,
"inventory_policy": "deny",
"image": {
"alt": "This is a image alt",
"src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
},
"option3": "",
"option1": "Red",
"inventory_tracker": true,
"weight": "1.2"
}
],
"created_at": "2024-08-22T16:03:42.527+08:00",
"title": "A product title",
"options": [
{
"name": "Color",
"values_images": {
"Red": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
}
},
{
"name": "Size",
"values_images": {
"L": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
}
}
],
"activated_at": "2024-08-23T16:04:42.527+08:00",
"path": "/my_product",
"vendor": "Shopline",
"tags": [
"tag1, tag2"
],
"published_at": "2024-08-23T16:04:42.527+08:00",
"product_category": "Electronic",
"status": "active",
"body_html": "This is a description"
}
}
Response
{
"product": {
"title": "A product title",
"images": [
{
"alt": "This is a image alt",
"id": "6993873159989240881",
"src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
}
],
"published_scope": "web",
"product_behavior": "",
"product_type": "NORMAL",
"status": "active",
"tags": "tag1 tag2",
"updated_at": "2025-05-14T12:03:54+08:00",
"vendor": "Shopline",
"variants": [
{
"barcode": "B000000001",
"option4": null,
"weight": "1.20",
"weight_unit": "kg",
"id": "18069938731621367248362340",
"inventory_quantity": 0,
"product_id": "16069938731613985273252340",
"taxable": true,
"created_at": "2025-05-14T12:03:54+08:00",
"updated_at": "2025-05-14T12:03:54+08:00",
"inventory_tracker": true,
"option2": "L",
"price": "10.11",
"inventory_item_id": "6993873164569420530",
"option1": "Red",
"sku": "T0000000001",
"compare_at_price": "11.20",
"title": "Red · L",
"option5": null,
"inventory_policy": "deny",
"required_shipping": true,
"image": {
"alt": "This is a image alt",
"id": "6993873159989240881",
"src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
},
"option3": null
}
],
"handle": "shopline-2025-05-14",
"body_html": "This is a description",
"created_at": "2024-08-22T16:03:42+08:00",
"product_category": "Electronic",
"spu": "S000001",
"activated_at": "2024-08-23T16:04:42+08:00",
"options": [
{
"values_images": {
"Red": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
},
"id": "16169938731621367248382340",
"name": "Color",
"product_id": "16069938731613985273252340",
"values": [
"Red"
]
},
{
"product_id": "16069938731613985273252340",
"values": [
"L"
],
"values_images": {
"L": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png"
},
"id": "16169938731621367248412340",
"name": "Size"
}
],
"id": "16069938731613985273252340",
"image": {
"id": "6993873159989240881",
"src": "https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png",
"alt": "This is a image alt"
},
"template_path": null,
"published_at": "2024-08-23T16:04:42+08:00",
"subtitle": "This is a subtitle"
}
}
Was this article helpful to you?