POST api/BookingTypes/{bookingTypeIdentity}/Rules
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
bookingTypeIdentity | string |
Required |
Body Parameters
BookingRuleName | Description | Type | Additional information |
---|---|---|---|
Identity | globally unique identifier |
None. |
|
RuleType | BookingRuleType |
None. |
|
Properties | Collection of BookingRuleDatum |
None. |
|
AppliesTo | Collection of NamedObject |
None. |
|
RunOnCreate | boolean |
None. |
|
RunOnUpdate | boolean |
None. |
|
RunOnDelete | boolean |
None. |
|
FailureMessage | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "Identity": "58ff351d-3a89-4ad5-a9d0-50f2ad0df695", "RuleType": { "Properties": [ { "Name": "sample string 1", "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "Identity": "c7b61711-2416-4d90-b130-b664b3918b69", "StartRange": true, "EndRange": true }, { "Name": "sample string 1", "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "Identity": "c7b61711-2416-4d90-b130-b664b3918b69", "StartRange": true, "EndRange": true } ], "RunOnUpdateAsCreate": true, "RunOnCreateType": 0, "RunOnUpdateType": 0, "RunOnDeleteType": 0, "Identity": "55e5adb9-1cbd-4901-88f9-04a146df87f1", "Name": "sample string 3" }, "Properties": [ { "Value": {}, "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "StartRange": true, "EndRange": true, "Identity": "51f3fb01-843a-4f3d-8a71-3c77ee85a47f", "Name": "sample string 6" }, { "Value": {}, "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "StartRange": true, "EndRange": true, "Identity": "51f3fb01-843a-4f3d-8a71-3c77ee85a47f", "Name": "sample string 6" } ], "AppliesTo": [ { "Identity": "ba26eeea-f8a1-4a90-a315-94db67dd1738", "Name": "sample string 2" }, { "Identity": "ba26eeea-f8a1-4a90-a315-94db67dd1738", "Name": "sample string 2" } ], "RunOnCreate": true, "RunOnUpdate": true, "RunOnDelete": true, "FailureMessage": "sample string 5" }
application/xml, text/xml
Sample:
<BookingRule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.API.Model"> <AppliesTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security"> <d2p1:NamedObject> <d2p1:Identity>ba26eeea-f8a1-4a90-a315-94db67dd1738</d2p1:Identity> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:NamedObject> <d2p1:NamedObject> <d2p1:Identity>ba26eeea-f8a1-4a90-a315-94db67dd1738</d2p1:Identity> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:NamedObject> </AppliesTo> <FailureMessage>sample string 5</FailureMessage> <Identity>58ff351d-3a89-4ad5-a9d0-50f2ad0df695</Identity> <Properties> <BookingRuleDatum> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">51f3fb01-843a-4f3d-8a71-3c77ee85a47f</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 6</Name> <EndRange>true</EndRange> <StartRange>true</StartRange> <Value /> <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleDatum> <BookingRuleDatum> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">51f3fb01-843a-4f3d-8a71-3c77ee85a47f</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 6</Name> <EndRange>true</EndRange> <StartRange>true</StartRange> <Value /> <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleDatum> </Properties> <RuleType> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">55e5adb9-1cbd-4901-88f9-04a146df87f1</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name> <Properties> <BookingRuleTypeProperty> <EndRange>true</EndRange> <Identity>c7b61711-2416-4d90-b130-b664b3918b69</Identity> <Name>sample string 1</Name> <StartRange>true</StartRange> <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleTypeProperty> <BookingRuleTypeProperty> <EndRange>true</EndRange> <Identity>c7b61711-2416-4d90-b130-b664b3918b69</Identity> <Name>sample string 1</Name> <StartRange>true</StartRange> <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleTypeProperty> </Properties> <RunOnCreateType>Never</RunOnCreateType> <RunOnDeleteType>Never</RunOnDeleteType> <RunOnUpdateAsCreate>true</RunOnUpdateAsCreate> <RunOnUpdateType>Never</RunOnUpdateType> </RuleType> <RunOnCreate>true</RunOnCreate> <RunOnDelete>true</RunOnDelete> <RunOnUpdate>true</RunOnUpdate> </BookingRule>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
BookingRuleName | Description | Type | Additional information |
---|---|---|---|
Identity | globally unique identifier |
None. |
|
RuleType | BookingRuleType |
None. |
|
Properties | Collection of BookingRuleDatum |
None. |
|
AppliesTo | Collection of NamedObject |
None. |
|
RunOnCreate | boolean |
None. |
|
RunOnUpdate | boolean |
None. |
|
RunOnDelete | boolean |
None. |
|
FailureMessage | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "Identity": "cc378a41-2c2e-43e7-ae06-c731010109e5", "RuleType": { "Properties": [ { "Name": "sample string 1", "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "Identity": "226491f2-af15-464f-95ae-b2f734ad4a53", "StartRange": true, "EndRange": true }, { "Name": "sample string 1", "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "Identity": "226491f2-af15-464f-95ae-b2f734ad4a53", "StartRange": true, "EndRange": true } ], "RunOnUpdateAsCreate": true, "RunOnCreateType": 0, "RunOnUpdateType": 0, "RunOnDeleteType": 0, "Identity": "376701a9-e34f-40a2-9e97-5bf2f7b1f6d4", "Name": "sample string 3" }, "Properties": [ { "Value": {}, "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "StartRange": true, "EndRange": true, "Identity": "9c7a8287-72af-4cea-acfc-294d7fadf2b7", "Name": "sample string 6" }, { "Value": {}, "ValueType": "sample string 2", "ValueChoices": [ "sample string 1", "sample string 2" ], "StartRange": true, "EndRange": true, "Identity": "9c7a8287-72af-4cea-acfc-294d7fadf2b7", "Name": "sample string 6" } ], "AppliesTo": [ { "Identity": "4b3f0e53-46d7-4a8d-afed-244cd64aaf8f", "Name": "sample string 2" }, { "Identity": "4b3f0e53-46d7-4a8d-afed-244cd64aaf8f", "Name": "sample string 2" } ], "RunOnCreate": true, "RunOnUpdate": true, "RunOnDelete": true, "FailureMessage": "sample string 5" }
application/xml, text/xml
Sample:
<BookingRule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.API.Model"> <AppliesTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security"> <d2p1:NamedObject> <d2p1:Identity>4b3f0e53-46d7-4a8d-afed-244cd64aaf8f</d2p1:Identity> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:NamedObject> <d2p1:NamedObject> <d2p1:Identity>4b3f0e53-46d7-4a8d-afed-244cd64aaf8f</d2p1:Identity> <d2p1:Name>sample string 2</d2p1:Name> </d2p1:NamedObject> </AppliesTo> <FailureMessage>sample string 5</FailureMessage> <Identity>cc378a41-2c2e-43e7-ae06-c731010109e5</Identity> <Properties> <BookingRuleDatum> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">9c7a8287-72af-4cea-acfc-294d7fadf2b7</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 6</Name> <EndRange>true</EndRange> <StartRange>true</StartRange> <Value /> <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleDatum> <BookingRuleDatum> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">9c7a8287-72af-4cea-acfc-294d7fadf2b7</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 6</Name> <EndRange>true</EndRange> <StartRange>true</StartRange> <Value /> <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleDatum> </Properties> <RuleType> <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">376701a9-e34f-40a2-9e97-5bf2f7b1f6d4</Identity> <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name> <Properties> <BookingRuleTypeProperty> <EndRange>true</EndRange> <Identity>226491f2-af15-464f-95ae-b2f734ad4a53</Identity> <Name>sample string 1</Name> <StartRange>true</StartRange> <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleTypeProperty> <BookingRuleTypeProperty> <EndRange>true</EndRange> <Identity>226491f2-af15-464f-95ae-b2f734ad4a53</Identity> <Name>sample string 1</Name> <StartRange>true</StartRange> <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:string>sample string 1</d5p1:string> <d5p1:string>sample string 2</d5p1:string> </ValueChoices> <ValueType>sample string 2</ValueType> </BookingRuleTypeProperty> </Properties> <RunOnCreateType>Never</RunOnCreateType> <RunOnDeleteType>Never</RunOnDeleteType> <RunOnUpdateAsCreate>true</RunOnUpdateAsCreate> <RunOnUpdateType>Never</RunOnUpdateType> </RuleType> <RunOnCreate>true</RunOnCreate> <RunOnDelete>true</RunOnDelete> <RunOnUpdate>true</RunOnUpdate> </BookingRule>