PUT api/ResourceViews/SaveView
Allows a resource view object to be passed in the body, along with a second resource list object, if the view is valid it will be created/updated depending on if the ID passed within it exists in the database
Request Information
URI Parameters
None.
Body Parameters
The APIResourceView object in JSON or XML format to be created/updated.
APIResourceViewName | Description | Type | Additional information |
---|---|---|---|
ID | integer |
None. |
|
ViewName | string |
None. |
|
ResourceList | Collection of Object |
None. |
Request Formats
application/json, text/json
Sample:
{"ID":0,"ViewName":"","ResourceList":[{"ID":0,"Name":"","Date":"0001-01-01T00:00:00","StartTime":"","EndTime":"","AvailableFrom":"0001-01-01T00:00:00","AvailableTo":"0001-01-01T00:00:00","ResourceType":"","Adults":0,"Children":0,"Capacity":0,"TotalBooked":0,"ProductMapID":0,"AvailableDays":"","Notes":"","UpSellInfo":"","ProductList":[],"ResourceUDFs":null,"QuestionnaireID":0}]}
application/xml, text/xml
Sample:
<?xml version="1.0" encoding="utf-16"?> <ResourceView xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ID>0</ID> <ViewName /> <ResourceList> <APIResource> <ID>0</ID> <Name /> <Date>0001-01-01T00:00:00</Date> <StartTime /> <EndTime /> <AvailableFrom>0001-01-01T00:00:00</AvailableFrom> <AvailableTo>0001-01-01T00:00:00</AvailableTo> <ResourceType /> <Adults>0</Adults> <Children>0</Children> <Capacity>0</Capacity> <TotalBooked>0</TotalBooked> <ProductMapID>0</ProductMapID> <AvailableDays /> <Notes /> <UpSellInfo /> <ProductList /> <QuestionnaireID>0</QuestionnaireID> </APIResource> </ResourceList> </ResourceView>
Response Information
Resource Description
This will return an InformationResponse, informing of the success or failure of the request and any more information needed.
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |
Response Formats
application/json, text/json
Sample:
{"Result":"SUCCESS","Message":"The View: Test View has been saved under ID: 001"}
application/xml, text/xml
Sample:
<?xml version="1.0" encoding="utf-16"?> <InformationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Result>SUCCESS</Result> <Message>The View: Test View has been saved under ID: 001</Message> </InformationResponse>