Export Webhook API Configuration
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
Parameter | Description |
---|---|
| The type of webhook being created. This corresponds to the Export REST API values. Valid values are:
|
${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
{ "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.
{ "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
{ "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.
{ "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.