POST v1/Triggers

Add a new Trigger.

Request Information

Requires Authorization!

URI Parameters

None.

Body Parameters

The Trigger changes object

TriggerChanges
NameDescriptionTypeAdditional information
TriggerDefinition

Gets or sets the trigger definition.

TriggerDefinition

None.

Notes

Gets or sets the notes.

string

Max length: 2147483647

TriggerActions

Gets or sets the trigger actions.

Collection of TriggerAction

None.

Id

Gets or sets the identifier.

integer

Must be 0

TriggerDefinitionId

Gets or sets the trigger definition identifier.

integer

Required

TriggerDefinitionName

Gets or sets the trigger definition name.

string

None.

Title

Gets or sets the title.

string

Max length: 50

Enabled

Indicates whether the Trigger is enabled.

boolean

Required

ShopOwnerId

Gets or sets the shop owner identifier.

integer

None.

ShopId

Gets or sets the shop identifier.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "TriggerDefinition": {
    "Id": 1,
    "Name": "sample string 2",
    "Description": "sample string 3",
    "IsAdminRequired": true
  },
  "Notes": "sample string 1",
  "TriggerActions": [
    {
      "Id": 1,
      "TriggerId": 2,
      "Sequence": 3,
      "TriggerActionDefinitionId": 4,
      "TriggerActionDefinitionName": "sample string 5",
      "Parameters": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "SingleExecutePerEntity": true,
      "AbortTriggerExcecuteOnFailure": true
    },
    {
      "Id": 1,
      "TriggerId": 2,
      "Sequence": 3,
      "TriggerActionDefinitionId": 4,
      "TriggerActionDefinitionName": "sample string 5",
      "Parameters": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "SingleExecutePerEntity": true,
      "AbortTriggerExcecuteOnFailure": true
    }
  ],
  "Id": 2,
  "TriggerDefinitionId": 3,
  "TriggerDefinitionName": "sample string 4",
  "Title": "sample string 5",
  "Enabled": true,
  "ShopOwnerId": 1,
  "ShopId": 1
}

application/xml, text/xml

Sample:
<TriggerChanges xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>2</Id>
  <TriggerDefinitionId>3</TriggerDefinitionId>
  <TriggerDefinitionName>sample string 4</TriggerDefinitionName>
  <Title>sample string 5</Title>
  <Enabled>true</Enabled>
  <ShopOwnerId>1</ShopOwnerId>
  <ShopId>1</ShopId>
  <TriggerDefinition>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <Description>sample string 3</Description>
    <IsAdminRequired>true</IsAdminRequired>
  </TriggerDefinition>
  <Notes>sample string 1</Notes>
  <TriggerActions>
    <TriggerAction>
      <Id>1</Id>
      <TriggerId>2</TriggerId>
      <Sequence>3</Sequence>
      <TriggerActionDefinitionId>4</TriggerActionDefinitionId>
      <TriggerActionDefinitionName>sample string 5</TriggerActionDefinitionName>
      <Parameters>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
      </Parameters>
      <SingleExecutePerEntity>true</SingleExecutePerEntity>
      <AbortTriggerExcecuteOnFailure>true</AbortTriggerExcecuteOnFailure>
    </TriggerAction>
    <TriggerAction>
      <Id>1</Id>
      <TriggerId>2</TriggerId>
      <Sequence>3</Sequence>
      <TriggerActionDefinitionId>4</TriggerActionDefinitionId>
      <TriggerActionDefinitionName>sample string 5</TriggerActionDefinitionName>
      <Parameters>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
      </Parameters>
      <SingleExecutePerEntity>true</SingleExecutePerEntity>
      <AbortTriggerExcecuteOnFailure>true</AbortTriggerExcecuteOnFailure>
    </TriggerAction>
  </TriggerActions>
</TriggerChanges>

Response Information

Resource Description

The Trigger object.


Trigger
NameDescriptionTypeAdditional information
TriggerDefinition

Gets or sets the trigger definition.

TriggerDefinition

None.

Notes

Gets or sets the notes.

string

Max length: 2147483647

TriggerActions

Gets or sets the trigger actions.

Collection of TriggerAction

None.

Id

Gets or sets the identifier.

integer

Must be 0

TriggerDefinitionId

Gets or sets the trigger definition identifier.

integer

Required

TriggerDefinitionName

Gets or sets the trigger definition name.

string

None.

Title

Gets or sets the title.

string

Max length: 50

Enabled

Indicates whether the Trigger is enabled.

boolean

Required

ShopOwnerId

Gets or sets the shop owner identifier.

integer

None.

ShopId

Gets or sets the shop identifier.

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "TriggerDefinition": {
    "Id": 1,
    "Name": "sample string 2",
    "Description": "sample string 3",
    "IsAdminRequired": true
  },
  "Notes": "sample string 1",
  "TriggerActions": [
    {
      "Id": 1,
      "TriggerId": 2,
      "Sequence": 3,
      "TriggerActionDefinitionId": 4,
      "TriggerActionDefinitionName": "sample string 5",
      "Parameters": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "SingleExecutePerEntity": true,
      "AbortTriggerExcecuteOnFailure": true
    },
    {
      "Id": 1,
      "TriggerId": 2,
      "Sequence": 3,
      "TriggerActionDefinitionId": 4,
      "TriggerActionDefinitionName": "sample string 5",
      "Parameters": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "SingleExecutePerEntity": true,
      "AbortTriggerExcecuteOnFailure": true
    }
  ],
  "Id": 2,
  "TriggerDefinitionId": 3,
  "TriggerDefinitionName": "sample string 4",
  "Title": "sample string 5",
  "Enabled": true,
  "ShopOwnerId": 1,
  "ShopId": 1
}

application/xml, text/xml

Sample:
<Trigger xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>2</Id>
  <TriggerDefinitionId>3</TriggerDefinitionId>
  <TriggerDefinitionName>sample string 4</TriggerDefinitionName>
  <Title>sample string 5</Title>
  <Enabled>true</Enabled>
  <ShopOwnerId>1</ShopOwnerId>
  <ShopId>1</ShopId>
  <TriggerDefinition>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <Description>sample string 3</Description>
    <IsAdminRequired>true</IsAdminRequired>
  </TriggerDefinition>
  <Notes>sample string 1</Notes>
  <TriggerActions>
    <TriggerAction>
      <Id>1</Id>
      <TriggerId>2</TriggerId>
      <Sequence>3</Sequence>
      <TriggerActionDefinitionId>4</TriggerActionDefinitionId>
      <TriggerActionDefinitionName>sample string 5</TriggerActionDefinitionName>
      <Parameters>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
      </Parameters>
      <SingleExecutePerEntity>true</SingleExecutePerEntity>
      <AbortTriggerExcecuteOnFailure>true</AbortTriggerExcecuteOnFailure>
    </TriggerAction>
    <TriggerAction>
      <Id>1</Id>
      <TriggerId>2</TriggerId>
      <Sequence>3</Sequence>
      <TriggerActionDefinitionId>4</TriggerActionDefinitionId>
      <TriggerActionDefinitionName>sample string 5</TriggerActionDefinitionName>
      <Parameters>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
        <Parameter>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </Parameter>
      </Parameters>
      <SingleExecutePerEntity>true</SingleExecutePerEntity>
      <AbortTriggerExcecuteOnFailure>true</AbortTriggerExcecuteOnFailure>
    </TriggerAction>
  </TriggerActions>
</Trigger>