POST api/CampusLife/AddNewServiceInformation

Request Information

URI Parameters

None.

Body Parameters

ServiceInputViewModel
NameDescriptionTypeAdditional information
Title

string

None.

Description

string

None.

ShortDescription

string

None.

ContactNumber

string

None.

Email

string

None.

Address

string

None.

OpeningTime

date

None.

ClosingTime

date

None.

ImageUrl

string

None.

ServiceLinkUrl

string

None.

IsServiceCategoryNeedToBeCreated

boolean

None.

ServiceCategoryID

Collection of globally unique identifier

None.

ServiceCategory

ServiceCategoryViewModel

None.

GpsCoordinates

GpsCoordinate

None.

Request Formats

application/json, text/json

Sample:
{
  "Title": "sample string 1",
  "Description": "sample string 2",
  "ShortDescription": "sample string 3",
  "ContactNumber": "sample string 4",
  "Email": "sample string 5",
  "Address": "sample string 6",
  "OpeningTime": "2024-05-03T06:29:30.7568875+02:00",
  "ClosingTime": "2024-05-03T06:29:30.7568875+02:00",
  "ImageUrl": "sample string 7",
  "ServiceLinkUrl": "sample string 8",
  "IsServiceCategoryNeedToBeCreated": true,
  "ServiceCategoryID": [
    "b9a70145-e917-4100-a83e-a3d5e8fbe24c",
    "60d32695-fca9-4411-9d9f-52d386b4ee5d"
  ],
  "ServiceCategory": {
    "Title": "sample string 1",
    "Description": "sample string 2"
  },
  "GpsCoordinates": {
    "ID": "492a9a62-c941-4a54-ac5a-985a0f366b6c",
    "Longitude": 2.0,
    "Latitude": 3.0
  }
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'API.Models.CalendarEvent' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'API.Models.CalendarEvent' contains cycles and cannot be serialized if reference tracking is disabled.

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ServiceInputViewModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.