Restocking Webhook
This webhook is sent out when a return is processed and you have the Restock setting in Loop set to webhooks rather than restocking set to Shopify directly. The response can be used to restock the item in your inventory management system. This setting is found in the Loop admin under Returns management > Policy settings > General.
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 (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 |
---|---|
location_id | Shopify Location ID |
variant_id | Shopify product variant ID |
inventory_item_id | Shopify Inventory Item ID |
available_adjustment | Inventory increment amount |
inventory_management | The inventory management system used |
Response
{
"topic": "restock",
"trigger": "restock.requested",
"id": "12345",
"order_id": "1234567890",
"provider_order_id": "1029384756",
"restock_items": [
{
"location_id": "10123456789",
"variant_id": "459875465",
"inventory_item_id": "10987654321",
"available_adjustment": "1",
"inventory_management": "shopify"
}
]
}