Create product
| Event Group | Event Identification |
|---|---|
| products | products/create |
After executing the product creation, you will receive this notification. You can obtain the returned product creation information.
For details on how to subscribe to Webhooks and how to respond after receiving a Webhook, please refer to the Webhook Overview.
Request Headers
- X-Shopline-Topic string requiredThe unique identifier for the event.Example:
orders/edited - X-Shopline-Hmac-Sha256 string requiredThe signature of the request. Upon receiving the request, you must verify the signature to confirm the authenticity and integrity of the data.Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM= - X-Shopline-Shop-Domain string requiredThe store domain.Example:
example.myshopline.com - X-Shopline-Shop-Id string requiredThe store ID.Example:
1610418123456 - X-Shopline-Merchant-Id string requiredThe merchant ID.Example:
2000001234 - X-Shopline-API-Version string requiredThe API version.Example:
v20250601 - X-Shopline-Webhook-Id string requiredThe ID of this Webhook event.Example:
b54557e48a5fbf7d70bcd043
Request Body
- body_html stringDescription of product. Maximum size: 512kExample:
This is a description - created_at stringThe date and time when the product was created. The value of this field follows the ISO 8601 standard time format.Example:
2023-03-02T18:18:42.883+0800 - handle stringThe handle of Product, a unique identifier automatically generated based on the product title.Example:
spring-women's-clothing - id stringUnique product identifier. Maximum length:64Example:
16058287356753569620272670 imageobject
Main Image of the Product.alt stringWords or phrases that share the characteristics or content of images.Example:This is a image altsrc stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngimagesobject[]
List of Product Images.alt stringWords or phrases that share the characteristics or content of images.Example:This is a image altsrc stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngoptionsobject[]
List of options.id stringUnique option identifier.Example:16158288104774469113452670name stringThe name of product option.Example:Coloroption_valuesobject[]
List of option values.id stringThe ID of option value.Example:16247051995358890915900034value stringThe option value.Example:Redproduct_id stringUnique product identifier. Maximum length:64Example:16058287356753569620272670values arrayThe list of option value.Example:["[\"Red\", \"Green\", \"White\"]"]values_images mapThe image of option value.Example:{}- product_behavior stringThe behavior of product.Example:
RISK,HIDDEN - product_category stringThe category of product.Example:
Electronic - product_type stringThe type of product. Valid values are:
- NORMAL
- POD_TEMPORARY
- TEMPORARY
Example:Electronic - published_at stringThe time when the product is published to the online stores. The value of this field follows the ISO 8601 standard time format.Example:
2023-03-02T18:18:42.883+0800 - published_scope stringSet the sales channel , when the value is " web " , it means online stores.Example:
web - spu stringThe product's SPU code.Example:
S000001 - status stringProduct status. Valid values are:
- activated: On shelves
- deactivated: Off shelves
- archived: Filing
Example:active - subtitle stringThe subtitle of product.Example:
This is a subtitle - tags stringThe tags of product.
Maximum size:250
Maximum length per string: 255Example:tag1,tag2 - template_path stringThe theme template of product.Example:
templates/products/detail.json - title stringThe title of product.
Maximum length:255Example:spring women's clothing - updated_at stringUpdate time. The value of this field follows the ISO 8601 standard time format.Example:
2023-03-02T18:18:42.883+0800 variantsobject[]
The list of product variants.barcode stringThe barcode of product.Example:B000000001compare_at_price stringThe original price of product variant. The price value is rounded to two decimal places.Example:10id stringThe ID of product variant.Example:18054026339558906501791422imageobject
The image of product variant.alt stringWords or phrases that share the characteristics or content of images.Example:This is a image altsrc stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pnginventory_item_id stringUnique inventory identifier.
Maximum length:64Example:5482608456602009969inventory_policy stringValid values for a product variant's inventory policy when it is sold out.- continue:Customers can still place orders even when the product variant's inventory is sold out.
- deny:Customers cannot continue to order when the product variant's inventory is completely sold out.
Default value: denyExample:continueinventory_quantity integerThe quantity of inventory items.Example:100inventory_tracker booleanTrack the inventory or not.- true:Tracking enabled
- false:Tracking disabled
Default value : false.Example:trueoption1 stringThe variant corresponds to the value of the option 1.Example:Redoption2 stringThe variant corresponds to the value of the option 2.Example:Loption3 stringThe variant corresponds to the value of the option 3.option4 stringThe variant corresponds to the value of the option 4.option5 stringThe variant corresponds to the value of the option 5.price stringThe price of product variant. The price value is rounded to two decimal places.Example:20product_id stringUnique product identifier. Maximum length:64Example:16058287356753569620272670required_shipping booleanShipping or not.- true:Requires shipping
- false:Does not require shipping
Default value .sku stringThe SKU code of product variant.Example:T000001taxable booleanTax collection or not required.- true:Required
- false:Not required
Default value : true.title stringThe title of product variant.Example:Red/Lweight stringThe product variant's weight in the unit defined by weight_unit.Example:10weight_unit stringThe measurement unit for the weight of the variant.Value Description g grams kg kilograms lb pounds oz ounces zh_kg kilograms Example:g- vendor stringThe vendor of product.Example:
Shopline
Status Codes
After receiving a webhook notification from SHOPLINE, you must respond with the following format:
HTTP/1.1 200 OKFor more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?