POST api/v7/Restriction
Adds a new Restriction
Tables Impacted
Restriction, RestrictionDesc
Request Information
URI Parameters
None.
Body Parameters
The new Restriction information
RestrictionDtoName | Description | Type | Required? | Additional information |
---|---|---|---|---|
RestrictionCode * | string |
Yes |
String length: between 1 and 24, inclusive |
|
startDate |
Start date |
date |
No |
None. |
endDate |
End date |
date |
No |
None. |
startDay |
Day of the week |
integer |
No |
None. |
startHour |
Hour |
integer |
No |
None. |
startMinute |
Minute |
integer |
No |
None. |
endDay |
End day of the week |
integer |
No |
None. |
endHour |
Hour |
integer |
No |
None. |
endMinute |
Minute |
integer |
No |
None. |
customerAuditDate |
Audit information |
date |
No |
None. |
culture * |
Culture Code. For example: en-US, fr, fr-CA, es, ja-JP etc. |
string |
Conditional |
Conditionally required: Required if you wish to associate description with culture. If not provided, in most cases 'Organizational Culture' is taken String length: between 1 and 10, inclusive |
description * |
Description Text (Culture specific) |
string |
Yes |
String length: between 1 and 30, inclusive |
Request Formats
application/json, text/json
{ "RestrictionCode": "11", "startDate": "2014-07-15T15:35:34.132994-04:00", "endDate": "2014-07-15T15:35:34.132994-04:00", "startDay": 1, "startHour": 10, "startMinute": 15, "endDay": 5, "endHour": 12, "endMinute": 30, "customerAuditDate": "2018-01-01T00:00:00", "culture": "en-US", "description": "Test Restriction" }
application/xml, text/xml
<Restriction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <culture>en-US</culture> <description>Test Restriction</description> <customerAuditDate>2018-01-01T00:00:00</customerAuditDate> <startDate>2014-07-15T15:35:34.132994-04:00</startDate> <endDate>2014-07-15T15:35:34.132994-04:00</endDate> <startDay>1</startDay> <startHour>10</startHour> <startMinute>15</startMinute> <endDay>5</endDay> <endHour>12</endHour> <endMinute>30</endMinute> <RestrictionCode>11</RestrictionCode> </Restriction>
Response Information
Resource Description
Returns a HTTPResponse Message stating the success/failure of API Action
HttpResponseMessageName | Description | Type |
---|---|---|
Version | Version | |
Content | HttpContent | |
StatusCode | HttpStatusCode | |
ReasonPhrase | string | |
Headers | Collection of Object | |
RequestMessage | HttpRequestMessage | |
IsSuccessStatusCode | boolean |
Response Formats
application/json, text/json
{ "message": "Record successfully saved.", "propertyName": "Success" }
application/xml, text/xml
<ApiValidationMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <message>Record successfully saved.</message> <propertyName>Success</propertyName> </ApiValidationMessage>