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": "99584d79-15b7-4ed1-b9b7-102fef69488e",
"RuleType": {
"Properties": [
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "ea444b61-9a7e-40fa-860e-aa189a240dfb",
"StartRange": true,
"EndRange": true
},
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "ea444b61-9a7e-40fa-860e-aa189a240dfb",
"StartRange": true,
"EndRange": true
}
],
"RunOnUpdateAsCreate": true,
"RunOnCreateType": 0,
"RunOnUpdateType": 0,
"RunOnDeleteType": 0,
"Identity": "1a2a9dfc-2936-4072-a7cd-a29b6662d2d3",
"Name": "sample string 3"
},
"Properties": [
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "0a173c86-b48e-4a8c-b1dd-21b739dac484",
"Name": "sample string 6"
},
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "0a173c86-b48e-4a8c-b1dd-21b739dac484",
"Name": "sample string 6"
}
],
"AppliesTo": [
{
"Identity": "bdd2301b-55ce-47c9-b06b-3a10ccadb46d",
"Name": "sample string 2"
},
{
"Identity": "bdd2301b-55ce-47c9-b06b-3a10ccadb46d",
"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>bdd2301b-55ce-47c9-b06b-3a10ccadb46d</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
<d2p1:NamedObject>
<d2p1:Identity>bdd2301b-55ce-47c9-b06b-3a10ccadb46d</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
</AppliesTo>
<FailureMessage>sample string 5</FailureMessage>
<Identity>99584d79-15b7-4ed1-b9b7-102fef69488e</Identity>
<Properties>
<BookingRuleDatum>
<Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">0a173c86-b48e-4a8c-b1dd-21b739dac484</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">0a173c86-b48e-4a8c-b1dd-21b739dac484</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">1a2a9dfc-2936-4072-a7cd-a29b6662d2d3</Identity>
<Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name>
<Properties>
<BookingRuleTypeProperty>
<EndRange>true</EndRange>
<Identity>ea444b61-9a7e-40fa-860e-aa189a240dfb</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>ea444b61-9a7e-40fa-860e-aa189a240dfb</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": "079e28bf-4a71-4627-b1a8-56bf9ff6b918",
"RuleType": {
"Properties": [
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "85d3e958-48f4-4361-ac57-b2633d1f6d95",
"StartRange": true,
"EndRange": true
},
{
"Name": "sample string 1",
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"Identity": "85d3e958-48f4-4361-ac57-b2633d1f6d95",
"StartRange": true,
"EndRange": true
}
],
"RunOnUpdateAsCreate": true,
"RunOnCreateType": 0,
"RunOnUpdateType": 0,
"RunOnDeleteType": 0,
"Identity": "932141cd-4646-4541-a43e-f4a291fe2b94",
"Name": "sample string 3"
},
"Properties": [
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "c0144d7d-70e9-460c-863e-5207caf06110",
"Name": "sample string 6"
},
{
"Value": {},
"ValueType": "sample string 2",
"ValueChoices": [
"sample string 1",
"sample string 2"
],
"StartRange": true,
"EndRange": true,
"Identity": "c0144d7d-70e9-460c-863e-5207caf06110",
"Name": "sample string 6"
}
],
"AppliesTo": [
{
"Identity": "cc2c2b18-e71c-4188-9736-d2061b23ddce",
"Name": "sample string 2"
},
{
"Identity": "cc2c2b18-e71c-4188-9736-d2061b23ddce",
"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>cc2c2b18-e71c-4188-9736-d2061b23ddce</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
<d2p1:NamedObject>
<d2p1:Identity>cc2c2b18-e71c-4188-9736-d2061b23ddce</d2p1:Identity>
<d2p1:Name>sample string 2</d2p1:Name>
</d2p1:NamedObject>
</AppliesTo>
<FailureMessage>sample string 5</FailureMessage>
<Identity>079e28bf-4a71-4627-b1a8-56bf9ff6b918</Identity>
<Properties>
<BookingRuleDatum>
<Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">c0144d7d-70e9-460c-863e-5207caf06110</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">c0144d7d-70e9-460c-863e-5207caf06110</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">932141cd-4646-4541-a43e-f4a291fe2b94</Identity>
<Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 3</Name>
<Properties>
<BookingRuleTypeProperty>
<EndRange>true</EndRange>
<Identity>85d3e958-48f4-4361-ac57-b2633d1f6d95</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>85d3e958-48f4-4361-ac57-b2633d1f6d95</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>