Create inventory object
| Event Group | Event Identification |
|---|---|
| inventory_items | inventory_items/create |
Create inventory
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
inventory_itemobject
The Inventory item object.cost stringThe cost per unit of the inventory item.Example:10.9created_at stringDate and time of the inventory item's creation.Example:2022-12-06T15:13:50+08:00fulfillment_location_id stringThe ID of the fulfillment location currently used by the variant, only applicable when location_type is fulfillmentExample:5340156898590073708id stringThe ID of the Inventory item.Example:5703943240925324252location_type stringThe location type currently used for managing inventory quantities in variantsExample:normalsku stringThe SKU of the inventory item.Example:B000000001tracked booleanTrack the inventory levels of this item or not.Example:trueupdated_at stringDate and time of the last update to the inventory item.Example:2022-12-06T15:13:50+08:00variant_id stringThe variant ID of this inventoryItemExample:18057039432358082693350282
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?