Restocking Webhook
This is sent out when a line item has been restocked in Shopify. This webhook triggers when you have the Restock setting in Loop set to webhooks rather than restocking set to Shopify directly. This setting is found in the general settings page of the Loop Admin.
Response Header | Description |
---|---|
X-Loop-Signature | Hashed Webhook Secret Key |
The X-Loop-Signature is a base-64, HMAC hash of body payload using the Webhook Secret provided by Loop.
Note: Before attempting to create your hash of the POST request body, make sure slashes have been escaped & newlines have been removed from the JSON.
Field | Description |
---|---|
topic | Webhook type (return, label, restock) |
trigger | Event that triggered the webhook (created, updated, requested, closed) |
id | Loop return ID |
order_id | Loop order ID |
provider_order_id | Shopify order ID |
restock_items
Field | Description |
---|---|
array key | Shopify Order Line Item ID |
location_id | Shopify Location ID |
inventory_item_id | Shopify Inventory Item ID |
available_adjustment | Inventory increment amount |
variant_id | Shopify product variant ID |
Response
{
"topic": "restock",
"trigger": "restock.requested",
"id": "12345",
"order_id": "1234567890",
"provider_order_id": "1029384756",
"restock_items": [
{
"location_id": "10123456789",
"inventory_item_id": "10987654321",
"available_adjustment": "1",
"inventory_management": "shopify",
"variant_id": "459875465"
}
]
}