Webhook

Webhooks are features that allows you to receive real-time notifications when certain events occur in BoxHero.

Registration

You can register a webhook at [Settings] - [Integrations & API] .

Handler

When an event occurs, it delivers the event body to the registered Webhook Endpoint. If the webhook handler response status code is 200, it is judged to have been received successfully. If a non-200 status code is returned, it is considered a temporary error and retries up to 3 times.

Event Body

The following data is transferred to the POST Body in a JSON format.

{
  "id": "1234", // Event's unique ID
  "topic": "txs/new", // Event topic
  "version": 1, // Event body version
  "payload": { // Event body
    ...
  }
}

Event Topic

We currently only support txs/new events. If you need additional topics, please contact support at (support+boxhero@bgpworks.com).

txs/new

Sent when an inventory change (in/out/adjustment/movement) event occurs.

Example - Stock in event (default team mode)

{
  "id": 16160911,
  "type": "in",
  "items": [
    {
      "id": 14277699,
      "name": "belif Cleansing Gel Oil Enriched",
      "quantity": 2,
      "deleted": false,
      "new_stock_level": 40
    },
    {
      "id": 14277698,
      "name": "belif Aqua Bomb Jelly Cleanser",
      "quantity": 2,
      "deleted": false,
      "new_stock_level": 207
    }
  ],
  "created_at": "2023-08-14T05:14:29.499Z",
  "created_by": {
    "id": 201345,
    "name": "corp",
    "deleted": false
  },
  "count_of_items": 2,
  "total_quantity": 4,
  "url": "https://web.boxhero-app.com/team/149058/mode/0#/tx/16160911"
}

Example - Stock movement event (location mode)

{
  "id": 3692714,
  "type": "move",
  "from_location": {
    "id": 52765,
    "name": "Warehouse 2",
    "deleted": false
  },
  "to_location": {
    "id": 52766,
    "name": "Warehouse 3",
    "deleted": false
  },
  "items": [
    {
      "id": 14873303,
      "name": "Auto liner 3.5mm",
      "quantity": 1,
      "deleted": false,
      "from_location_new_stock_level": -1,
      "to_location_new_stock_level": 1
    }
  ],
  "created_at": "2023-04-25T05:42:27.545Z",
  "created_by": {
    "id": 176829,
    "name": "Joy Kim",
    "deleted": false
  },
  "count_of_items": 1,
  "total_quantity": 1,
  "url": "https://web.boxhero-app.com/team/150581/mode/2#/ltx/3692714"
}

Last updated