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.

FieldRequiredTeam ModeDescription

id

All

History's unique ID

type

All

History type (in, out, adjust, move)

partner

All

Account

partner.id

All

Account's unique ID

partner.name

All

Account's name

partner.deleted

All

Whether if the account is deleted

from_location

Location

Departure location

from_location.id

Location

Location's unique ID

from_location.name

Location

Location name

from_location.deleted

Location

Whether if the location is deleted

to_location

Location

Arrival location

to_location.id

Location

Location's unique ID

to_location.name

Location

Location name

to_location.deleted

Location

Whether if the location is deleted

items

All

Line items in history

items.id

All

Item's unique ID

items.name

All

Item name

items.quantity

All

Inventory change due to stock in/out/adjustment/movement

items.deleted

All

Whether if the item is deleted

items.new_stock_level

Default/Unit

The stock level after the transaction (history)

items.from_location_new_stock_level

Location

The stock level for the departure location after the transaction (history)

items.to_location_new_stock_level

Location

The stock level for the arrival location after the transaction (history)

created_at

All

The time at which the transaction (history) happened

created_by

All

Member who created the transaction (history)

created_by.id

All

Member's unique ID

created_by.name

All

Member name

created_by.deleted

All

Whether if the member is deleted

count_of_items

All

The number of items

total_quantity

All

Total amount of inventory change

url

All

Address to go to the history details page

memo

All

Notes related to the transaction

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