Skip to content
P4 Software P4 Software / logisticaHQ-en

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://p4-software.opendocs.page/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://p4-software.opendocs.page/mcp

Webhooks

Webhooks
← Back to System

A webhook makes LogisticaHQ tell another System, such as your ERP, e-commerce platform or accounting software, the moment something important changes: an order is shipped, a purchase order is received, a product's dimensions change. Instead of the other System asking LogisticaHQ again and again whether anything is new, LogisticaHQ sends it a message at the address you give, within seconds of the change.

Setting up a webhook is technical work, usually done by your IT team or LogisticaHQ partner together with the developers of the Receiving System. Only administrators can create, change or delete webhooks.

The webhook list

Open Setup > System > Webhooks. The list shows each webhook's name, client, address and description. Click a name to change a webhook. Tick webhooks and click Delete on the selection bar to remove them.

The Webhooks list with its Name, Client, Url and Description columns and the New button

Create a webhook

  1. Click New.
  2. Fill in the dialog, described below.
  3. Click Submit. The webhook starts Receiving events straight away.

The Webhook dialog filled in: Name ERP order updates, no client, the receiving address, two headers and a description

FieldWhat to enter
NameA name that says what the webhook is for. Required.
ClientLeave empty to receive the events of every client and of records that belong to no client. Choose a client to receive only that client's events, for example to send a 3PL client's order updates to that client's own System.
UrlThe address of the Receiving System, which must accept an HTTP POST. Use an https:// address so the messages and headers travel encrypted. Required.
HeadersExtra HTTP headers to send with every message, usually a key or token the Receiving System checks to be sure the message comes from you. Write each header as Name=Value and separate headers with semicolons, for example Authorization=Bearer your-token;X-Source=LogisticaHQ.
DescriptionA note for administrators, such as who owns the Receiving System.

Which changes send a message

RecordA message is sent when this changes
Pick ticketsThe state (for example Waved, Picked, Shipped, Closed), the upload date, and the order's tracked location during Delivery.
Purchase ordersThe state and the upload date.
Customer ReturnsThe state and the upload date.
Production ordersThe state and the upload date.
Surgery casesThe state, the dispatch date and the completion date.
Products and pack sizesDimensions, weight, unit cost and unit of measure, and a pack size's number of units.
UsersThe location tracked from their Handheld.
Stock changes made by handAn adjustment, a cycle count difference, or a pack size conversion or breakdown. One message that says there is news, and only when the company setting Stock Change Webhook is on (see below).

A record that belongs to a client, such as a client's pick ticket, goes to the webhooks without a client and to that client's webhooks.

Stock changes: one extra message, off by default

Stock changes made by hand (an adjustment, a cycle count difference, a pack size conversion or breakdown) do not change any of the records in the table above, so they have their own switch: the company setting Stock Change Webhook (Configuration, group Setup > Integration). It is off unless an administrator turns it on: a company that has webhooks registered for another purpose sends nothing about stock until it is switched on. A change to the setting takes effect within about a minute.

When it is on, the first stock change opens a 20 second window for that company and client. Everything inside the window is covered by one message, put on the queue about 30 seconds after the first change. The message only says that there is news: its ObjectType is AuditRecord, its EventType is Added, and the only changes it lists are SubType and ClientId. It carries no quantities and no product names, so the Receiving System must read the new audit records itself, through the audit route of the REST API. It goes to the webhooks without a client and to the webhooks of the stock's client, like every other message. A stock change that the connected ERP itself posted (its own delivery posting) sends nothing, so the ERP is not woken by its own change. Everything under "When a message cannot be delivered" applies: a lost message is not repeated, so keep the scheduled pull.

What the message looks like

Each message is an HTTP POST with a JSON body that says which record changed, how, by whom and when, and lists every field that changed with its old and new value:

{
  "ObjectId": "1829f328-30d9-4e93-b05b-06a4ef01133f",
  "ObjectType": "PickTicket",
  "ReferenceNumber": "SP-0019261",
  "Tenant": "newtenant",
  "EventType": "Modified",
  "Timestamp": "2026-09-26T14:05:12Z",
  "UserId": "...",
  "Changes": [
    { "PropertyName": "PickTicketState", "OldValue": "Picked", "NewValue": "Shipped" }
  ]
}

EventType is Added, Modified or Deleted. The Receiving System can use ObjectId or ReferenceNumber to read the full record through the REST API.

When a message cannot be delivered

The Receiving System must answer with a success status (2xx). When it does not, or cannot be reached, LogisticaHQ records the failure, with the status and the answer it received, in Logs, and moves on. Failed messages are not sent again. Build the Receiving System to catch up on its own. For example, when it starts it can ask the REST API for orders in the state it is waiting for, so nothing is missed while it was down.

Was this page helpful?