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 requiredEvent operation identificationExample:
orders/edited
- X-Shopline-Hmac-Sha256 string requiredSignatureExample:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
- X-Shopline-Shop-Domain string requiredShop domainExample:
shophub.myshopline.com
- X-Shopline-Shop-Id string requiredShop IDExample:
1610418123456
- X-Shopline-Merchant-Id string requiredMerchant IDExample:
2000001234
- X-Shopline-API-Version string requiredVersionExample:
v20210901
- X-Shopline-Webhook-Id string requiredMessage IDExample:
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 alt
src stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
imagesobject[]
List of Product Images.alt stringWords or phrases that share the characteristics or content of images.Example:This is a image alt
src stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
optionsobject[]
List of options.id stringUnique option identifier.Example:16158288104774469113452670
name stringThe name of product option.Example:Color
option_valuesobject[]
List of option values.id stringThe ID of option value.Example:16247051995358890915900034
value stringThe option value.Example:Red
product_id stringUnique product identifier. Maximum length:64Example:16058287356753569620272670
values arrayThe list of option value.Example:["Red", "Green", "White"]
values_images mapThe image of option value.Example:[object Object]
- 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:B000000001
compare_at_price stringThe original price of product variant. The price value is rounded to two decimal places.Example:10
id stringThe ID of product variant.Example:18054026339558906501791422
imageobject
The image of product variant.alt stringWords or phrases that share the characteristics or content of images.Example:This is a image alt
src stringThe image's location represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
inventory_item_id stringUnique inventory identifier.
Maximum length:64Example:5482608456602009969
inventory_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:continue
inventory_quantity integerThe quantity of inventory items.Example:100
inventory_tracker booleanTrack the inventory or not.- true:Tracking enabled
- false:Tracking disabled
Default value : false.Example:true
option1 stringThe variant corresponds to the value of the option 1.Example:Red
option2 stringThe variant corresponds to the value of the option 2.Example:L
option3 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:20
product_id stringUnique product identifier. Maximum length:64Example:16058287356753569620272670
required_shipping booleanShipping or not.- true:Requires shipping
- false:Does not require shipping
Default value .sku stringThe SKU code of product variant.Example:T000001
taxable booleanTax collection or not required.- true:Required
- false:Not required
Default value : true.title stringThe title of product variant.Example:Red/L
weight stringThe product variant's weight in the unit defined by weight_unit.Example:10
weight_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 OK
For more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?