POST adventures/activities

Request Information

URI Parameters

None.

Body Parameters

ActivityPOST
NameDescriptionTypeAdditional information
ActivityTypeId

integer

None.

Coordinates

Coordinates

None.

Days

integer

None.

Description

string

None.

DifficultyId

integer

None.

Distance

decimal number

None.

Elevation

integer

None.

LocationId

integer

None.

ModifiedBy

string

None.

Name

string

None.

Requirements

string

None.

SiteId

integer

None.

StartDate

date

None.

Request Formats

application/json, text/json

Sample:
{
  "activityTypeId": 1,
  "coordinates": null,
  "days": 1,
  "description": "sample string 2",
  "difficultyId": 3,
  "distance": 1.0,
  "elevation": 1,
  "locationId": 4,
  "modifiedBy": "sample string 5",
  "name": "sample string 6",
  "requirements": "sample string 7",
  "siteId": 8,
  "startDate": "2024-11-28T06:38:07.6892126+00:00"
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'myPortalApi.Models.Coordinates' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'myPortalApi.Models.Coordinates' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

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 'ActivityPOST'.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>