POST OrderWebhooks/CreateWebhook

Creates a webhook

Request Information

URI Parameters

None.

Body Parameters

CreateWebhookCommand
Name Type Description Additional information
OnlineOrdersWebhookSettingId integer

Required for UpdateWebhook.

SiteOverrideId integer

SiteID = 0 will cause the webhook to trigger for all sites

WebhookType integer

None.

WebhookSendType string

None.

Endpoint string

Required

Body string

None.

Request Formats

application/json, text/json

Sample:
{
  "OnlineOrdersWebhookSettingId": 1,
  "SiteOverrideId": 2,
  "WebhookType": 3,
  "WebhookSendType": "sample string 4",
  "Endpoint": "sample string 5",
  "Body": "sample string 6"
}

application/xml, text/xml

Sample:
<CreateWebhookCommand xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.WebhookSettings.Commands">
  <Body>sample string 6</Body>
  <Endpoint>sample string 5</Endpoint>
  <OnlineOrdersWebhookSettingId>1</OnlineOrdersWebhookSettingId>
  <SiteOverrideId>2</SiteOverrideId>
  <WebhookSendType>sample string 4</WebhookSendType>
  <WebhookType>3</WebhookType>
</CreateWebhookCommand>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

OnlineOrdersWebhookSettingDto
Name Type Description Additional information
OnlineOrdersWebhookSettingId integer

None.

ApiDeveloperId integer

None.

ApiDeveloperName string

None.

SiteOverrideId integer

None.

SiteOverrideName string

None.

WebhookType integer

None.

WebhookTypeName string

None.

WebhookSendType integer

None.

WebhookSendTypeName string

None.

Endpoint string

None.

Body string

None.

Response Formats

application/json, text/json

Sample:
{
  "OnlineOrdersWebhookSettingId": 1,
  "ApiDeveloperId": 2,
  "ApiDeveloperName": "sample string 3",
  "SiteOverrideId": 4,
  "SiteOverrideName": "sample string 5",
  "WebhookType": 6,
  "WebhookTypeName": "sample string 7",
  "WebhookSendType": 8,
  "WebhookSendTypeName": "sample string 9",
  "Endpoint": "sample string 10",
  "Body": "sample string 11"
}

application/xml, text/xml

Sample:
<OnlineOrdersWebhookSettingDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.WebhookSettings.Dtos">
  <ApiDeveloperId>2</ApiDeveloperId>
  <ApiDeveloperName>sample string 3</ApiDeveloperName>
  <Body>sample string 11</Body>
  <Endpoint>sample string 10</Endpoint>
  <OnlineOrdersWebhookSettingId>1</OnlineOrdersWebhookSettingId>
  <SiteOverrideId>4</SiteOverrideId>
  <SiteOverrideName>sample string 5</SiteOverrideName>
  <WebhookSendType>8</WebhookSendType>
  <WebhookSendTypeName>sample string 9</WebhookSendTypeName>
  <WebhookType>6</WebhookType>
  <WebhookTypeName>sample string 7</WebhookTypeName>
</OnlineOrdersWebhookSettingDto>