POST api/BookingTypes/{bookingTypeIdentity}/Rules
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| bookingTypeIdentity | string |
Required |
Body Parameters
BookingRule| Name | 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": "62a37c0e-0f21-48bf-85b7-d7de4bc41f6e",
"RuleType": {
"Properties": [
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "0a753362-3074-486e-8528-d4483c02ffc8",
"StartRange": true,
"EndRange": true
},
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "0a753362-3074-486e-8528-d4483c02ffc8",
"StartRange": true,
"EndRange": true
}
],
"RunOnUpdateAsCreate": true,
"RunOnCreateType": 0,
"RunOnUpdateType": 0,
"RunOnDeleteType": 0,
"Identity": "21e57894-38f5-4733-a6d7-b16b59e286cc",
"Name": "sample string 3"
},
"Properties": [
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "26ad22de-e3af-4d0a-9e9c-a85c509e5781",
"Name": "sample string 6"
},
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "26ad22de-e3af-4d0a-9e9c-a85c509e5781",
"Name": "sample string 6"
}
],
"AppliesTo": [
{
"Identity": "dc55519d-a764-4dad-b0d4-c24407bda2cb",
"Name": "sample string 2"
},
{
"Identity": "dc55519d-a764-4dad-b0d4-c24407bda2cb",
"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>dc55519d-a764-4dad-b0d4-c24407bda2cb</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
<d2p1:NamedObject>
<d2p1:Identity>dc55519d-a764-4dad-b0d4-c24407bda2cb</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
</AppliesTo>
<FailureMessage>sample string 5</FailureMessage>
<Identity>62a37c0e-0f21-48bf-85b7-d7de4bc41f6e</Identity>
<Properties>
<BookingRuleDatum>
<Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">26ad22de-e3af-4d0a-9e9c-a85c509e5781</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">26ad22de-e3af-4d0a-9e9c-a85c509e5781</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">21e57894-38f5-4733-a6d7-b16b59e286cc</Identity>
<Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name>
<Properties>
<BookingRuleTypeProperty>
<EndRange>true</EndRange>
<Identity>0a753362-3074-486e-8528-d4483c02ffc8</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>0a753362-3074-486e-8528-d4483c02ffc8</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
BookingRule| Name | 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": "ff9dd389-a730-4e88-96fa-00265b73cb20",
"RuleType": {
"Properties": [
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "d144c603-8e56-4e4c-b46f-d27c855322d2",
"StartRange": true,
"EndRange": true
},
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "d144c603-8e56-4e4c-b46f-d27c855322d2",
"StartRange": true,
"EndRange": true
}
],
"RunOnUpdateAsCreate": true,
"RunOnCreateType": 0,
"RunOnUpdateType": 0,
"RunOnDeleteType": 0,
"Identity": "cc81cb14-c06b-4264-998a-9e6ba315143d",
"Name": "sample string 3"
},
"Properties": [
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "2f7672b5-6b1a-43bb-b2ad-5848faca6f6a",
"Name": "sample string 6"
},
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "2f7672b5-6b1a-43bb-b2ad-5848faca6f6a",
"Name": "sample string 6"
}
],
"AppliesTo": [
{
"Identity": "f6820c5d-5790-4f8a-8cb8-d45d7d531fca",
"Name": "sample string 2"
},
{
"Identity": "f6820c5d-5790-4f8a-8cb8-d45d7d531fca",
"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>f6820c5d-5790-4f8a-8cb8-d45d7d531fca</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
<d2p1:NamedObject>
<d2p1:Identity>f6820c5d-5790-4f8a-8cb8-d45d7d531fca</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
</AppliesTo>
<FailureMessage>sample string 5</FailureMessage>
<Identity>ff9dd389-a730-4e88-96fa-00265b73cb20</Identity>
<Properties>
<BookingRuleDatum>
<Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">2f7672b5-6b1a-43bb-b2ad-5848faca6f6a</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">2f7672b5-6b1a-43bb-b2ad-5848faca6f6a</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">cc81cb14-c06b-4264-998a-9e6ba315143d</Identity>
<Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name>
<Properties>
<BookingRuleTypeProperty>
<EndRange>true</EndRange>
<Identity>d144c603-8e56-4e4c-b46f-d27c855322d2</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>d144c603-8e56-4e4c-b46f-d27c855322d2</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>