Export Webhook API Configuration

VERSION TBD 

If the standard Export REST APIs are unavailable or customer needs require automatic notification of certain events, Export Webhook events can be configured. Any data covered by existing Export APIs can have a Webhook configured. When relevant data changes customers will be automatically notified of the new, updated, or removed data.

Currently updates happen on a schedule, every 15 minutes. Future iterations of the Export Webhook API will include configurable digest scheduling as well as real-time alerting.

Resource URL Summary

Create a new Webhook Definition

POST /seiapi/v3/webhooks/${dataType}

Edit an existing webhook

PUT /seiapi/v3/webhooks/${webhookId}

API Specific Parameters

ParameterDescription

${dataType}

The type of webhook being created. This corresponds to the Export REST API values. Valid values are:

  • Activity TBD
  • PhysicalInventory TBD
  • LoadInventory TBD
  • InventoryTransfer TBD
  • InventoryUsage TBD
  • StockLevelRecommendation TBD
  • TimeEntry TBD
  • UserAudit TBD
  • WorkOrder 4.18.0
${webhookId}

The ID of an existing webhook. This is returned when a webhook is created, and is also included in each data payload.

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.



API Specifics

Create a new Webhook Definition

This REST API will create a new Webhook Definition and then return it.

URL

POST /seiapi/v3/webhooks/${dataType}

HTTP Request Body

JSON Format
{
	"hook": {
		"url": "https://example.com/destination"
	},
	"filters": [{
		"WorkOrder": {
			// Work Order JSON object properties
		}
	}]
}

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain a collection of zero of more Work Order Objects.

JSON Format
{
	"webhookId": "b41773d9-6352-4db8-ab9a-9c84e69f4d37",
	"hook": {
		"url": "https://example.com/destination"
	},
	"filters": [{
		"WorkOrder": {
			// Work Order JSON object properties
		}
	}],
	"active": true,
	"created": "2022-07-26T18:10:43.511Z",
	"lastExecution": null
}

Otherwise, on error, the API returns the standard response object.

Update an existing webhook

This REST API will update an existing webhook

URL

PUT /seiapi/v3/webhooks/${webhookId}

HTTP Request Body

JSON Format
{
	"webhookId": "b41773d9-6352-4db8-ab9a-9c84e69f4d37",
	"hook": {
		"url": "https://example.com/new-destination"
	},
	"filters": [{
		"WorkOrder": {
			// Work Order JSON object properties
		}
	}]
}

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain the new webhook.

JSON Format
{
	"webhookId": "b41773d9-6352-4db8-ab9a-9c84e69f4d37",
	"hook": {
		"url": "https://example.com/new-destination"
	},
	"filters": [{
		"WorkOrder": {
			// Work Order JSON object properties
		}
	}],
	"active": true,
	"created": "2022-07-26T18:10:43.511Z",
	"lastExecution": "2022-07-26T18:25:43.511Z"
}

Otherwise, on error, the API returns the standard response object.