Restocking Webhook

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 HeaderDescription
X-Loop-SignatureHashed 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.

FieldDescription
topicWebhook type (restock)
triggerEvent that triggered the webhook (created, updated, requested, closed)
idLoop return ID
order_idLoop order ID
provider_order_idShopify order ID

restock_items

FieldDescription
location_idShopify Location ID
variant_idShopify product variant ID
inventory_item_idShopify Inventory Item ID
available_adjustmentInventory increment amount
inventory_managementThe 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"
    }
  ]
}