Purchase order webhooks
Types of triggers
Webhooks can be triggered on the following events related to purchase orders.
Purchase order is received
This webhook will fire when a purchase order's status is changed to Received or above (400 or above). There must be at least one received item on the purchase order as well.
Purchase order status is changed
This webhook will fire when a purchase order's status is changed. You can select the statuses you want the webhook to trigger for, e.g. if you want it be triggered whenever an order's status goes to Inbound.
Purchase order is created
This webhook will fire when a purchase order is created.
Payload
Example
When the webhook is triggered, the following payload will be delivered to the webhook endpoint.
{
"webhookPurchaseOrdersId": 0,
"webhookEventId": 0,
"system": "string",
"timestamp": "2023-01-01T12:00:00.0000000",
"purchaseOrderId": 0,
"purchaseOrderNumber": "string",
"goodsOwnerId": 0,
"path": "string",
"webhookTemplate": "string",
"purchaseOrderStatus": {
"number": 0
},
"goodsOwnerName": "string",
"purchaseOrderType": {
"purchaseOrderTypeId": 0,
"purchaseOrderTypeCode": "string"
}
}
Specification
WebhookPurchaseOrderPayload | ||
---|---|---|
webhookPurchaseOrdersId | int | Internal ID for the webhook. |
webhookEventId | int | Internal ID for this particular event. |
system | string | The name of the Ongoing WMS instance where the event happened. |
timestamp | string | When the event happened. |
purchaseOrderId | int | Purchase order ID. |
purchaseOrderNumber | string | Purchase order number. |
goodsOwnerId | int | The Ongoing WMS system id for the goods owner. |
path | string | REST API path to the resource. |
webhookTemplate | string | The name of the webhook type. |
purchaseOrderStatus | PurchaseOrderStatus | An element of type PurchaseOrderStatus. |
goodsOwnerName | string | |
purchaseOrderType | PurchaseOrderType | An element of type PurchaseOrderType. |
PurchaseOrderStatus | ||
---|---|---|
number | int | Order status ID. |
PurchaseOrderType | ||
---|---|---|
purchaseOrderTypeId | int | Purchase order type ID. |
purchaseOrderTypeCode | string | Purchase order type code. |