POST api/Product/CreateNewDraft

Request Information

URI Parameters

None.

Body Parameters

ProductViewModel
NameDescriptionTypeAdditional information
productId

integer

None.

draftId

integer

None.

lastModifiedBy

integer

None.

lastModifiedDate

date

None.

lastModified

LastModifiedViewModel

None.

draftStatusId

byte

None.

productName

string

Required

proprietor

string

None.

productTypeId

byte

Required

primaryContact

ContactViewModel

None.

primaryContactId

integer

Range: inclusive between 1 and 999999

email

string

None.

website

string

None.

phone

string

None.

phone2

string

None.

fax

string

None.

address

string

Required

address2

string

None.

address3

string

None.

province

string

Required

communityId

integer

Required

regionId

integer

None.

postalCode

string

None.

latitude

decimal number

None.

longitude

decimal number

None.

trailDistance

decimal number

None.

trailDuration

decimal number

None.

registryNumber

string

None.

webDescription

string

None.

periodOfOperationTypeId

All year, seasonal, date range

byte

None.

openMonth

numerical month

byte

None.

openDay

numerical day

byte

None.

closeMonth

numerical month

byte

None.

closeDay

numerical day

byte

None.

highRate

The highest rate available

decimal number

None.

extraPersonRate

The cost for an additional person in the room

decimal number

None.

printVersion

Container object for print version data

PrintVersionViewModel

None.

lowRate

REQUIRED FOR: Accommodations, campgrounds

decimal number

None.

rateTypeId

REQUIRED FOR: Accommodations, campgrounds Subject to change, Guaranteed

byte

None.

ratePeriodId

REQUIRED FOR: Accommodations, campgrounds Daily, Weekly, Monthly

byte

None.

cancellationPolicyId

REQUIRED FOR: Accommodations, Campgrounds ex. noon, 4pm, 48 hours

byte

None.

attributes

REQUIRED FOR: Accommodations product type, at least one of each of the folllowing... - ApprovedBy - Accommodation Amenities - Accommodation Services - Pet policy Attractions product type, at least one of each of the folllowing... - Product Category Campgrounds product type, at least one of each of the folllowing... - Approved by - Campground Ameneities - Outdoor Activities - pet policy Fine Arts product type, at least one of each of the folllowing... - Art product type - medium - exhibit type Outdoors product type no special validation Tour ops product type, at least one of each of the following... - Tour type /// Trails product type, at least one of each of the following... - Trail surface - Trail type Restaurant product type, at least one of each of the following... - Restaurant services - Restaurant type - Restaurant specialty

Collection of AttributeViewModel

None.

media

Collection of MediaViewModel

None.

unitTypes

REQUIRED FOR: Accommodations, Campgrounds At least one unit type must be supplied

Collection of UnitTypeViewModel

None.

links

REQUIRED FOR: Accommodations, Campgrounds At least one unit type must be supplied

Collection of LinkViewModel

None.

rateDescription

REQUIRED FOR: Attractions Detailed rate information

string

None.

dateDescription

REQUIRED FOR: Attractions, Fine Arts Detailed hours of operation

string

None.

caaRatingTypeId

byte

None.

caaRatingValue

byte

None.

canadaSelectRatings

Canada select ratings for Accommodations and campgrounds only

Collection of CanadaSelectRatingViewModel

None.

paymentTypes

The list of accepted payment types

Collection of byte

None.

regionsOfOperation

Collection of byte

None.

hasOffSeasonDates

Indicates whether the property will possibly open during the off season by reservation

boolean

None.

hasOffSeasonRates

Indicates whether the property has reduced offseason rates

boolean

None.

noTax

Indicates no additional tax

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "productId": 1,
  "draftId": 2,
  "lastModifiedBy": 3,
  "lastModifiedDate": "2017-12-14T05:44:25.7132208-04:00",
  "lastModified": {
    "userId": 1,
    "firstName": "sample string 2",
    "lastName": "sample string 3",
    "username": "sample string 4",
    "lastModifiedDate": "2017-12-14T05:44:25.7132208-04:00"
  },
  "draftStatusId": 64,
  "productName": "sample string 6",
  "proprietor": "sample string 7",
  "productTypeId": 64,
  "primaryContact": {
    "contactId": 1,
    "contactTypeId": 2,
    "firstName": "sample string 3",
    "lastName": "sample string 4",
    "email": "sample string 5",
    "primaryPhone": "sample string 6",
    "cellPhone": "sample string 7",
    "fax": "sample string 8",
    "addresses": [
      {
        "addressTypeId": 1,
        "address1": "sample string 2",
        "address2": "sample string 3",
        "address3": "sample string 4",
        "community": "sample string 5",
        "province": "sample string 6",
        "country": "sample string 7",
        "postalCode": "sample string 8"
      },
      {
        "addressTypeId": 1,
        "address1": "sample string 2",
        "address2": "sample string 3",
        "address3": "sample string 4",
        "community": "sample string 5",
        "province": "sample string 6",
        "country": "sample string 7",
        "postalCode": "sample string 8"
      }
    ]
  },
  "primaryContactId": 9,
  "email": "sample string 10",
  "website": "sample string 11",
  "phone": "sample string 12",
  "phone2": "sample string 13",
  "fax": "sample string 14",
  "address": "sample string 15",
  "address2": "sample string 16",
  "address3": "sample string 17",
  "province": "sample string 18",
  "communityId": 1,
  "regionId": 1,
  "postalCode": "sample string 19",
  "latitude": 1.0,
  "longitude": 1.0,
  "trailDistance": 1.0,
  "trailDuration": 1.0,
  "registryNumber": "sample string 20",
  "webDescription": "sample string 21",
  "periodOfOperationTypeId": 64,
  "openMonth": 64,
  "openDay": 64,
  "closeMonth": 64,
  "closeDay": 64,
  "highRate": 1.0,
  "extraPersonRate": 1.0,
  "printVersion": {
    "productId": 1,
    "periodOfOperationTypeId": 64,
    "openMonth": 64,
    "openDay": 64,
    "closeMonth": 64,
    "closeDay": 64,
    "lowRate": 1.0,
    "highRate": 1.0,
    "extraPersonRate": 1.0,
    "rateTypeId": 64,
    "ratePeriodId": 64,
    "hasOffseasonRates": true,
    "hasOffseasonDates": true,
    "cancellationPolicyId": 64,
    "noTax": true,
    "printDescription": "sample string 6",
    "dateDescription": "sample string 7",
    "rateDescription": "sample string 8"
  },
  "lowRate": 1.0,
  "rateTypeId": 64,
  "ratePeriodId": 64,
  "cancellationPolicyId": 64,
  "attributes": [
    {
      "attributeId": 1,
      "attributeName": "sample string 2",
      "attributeGroup": {
        "attributeGroupId": 1,
        "attributeGroupName": "sample string 2"
      }
    },
    {
      "attributeId": 1,
      "attributeName": "sample string 2",
      "attributeGroup": {
        "attributeGroupId": 1,
        "attributeGroupName": "sample string 2"
      }
    }
  ],
  "media": [
    {
      "mediaId": 1,
      "mediaTypeId": 64,
      "originalFileName": "sample string 3",
      "fileName": "sample string 4",
      "sortOrder": 1,
      "title": "sample string 5",
      "caption": "sample string 6",
      "url": "sample string 7",
      "externalMediaId": 1,
      "draftId": 8
    },
    {
      "mediaId": 1,
      "mediaTypeId": 64,
      "originalFileName": "sample string 3",
      "fileName": "sample string 4",
      "sortOrder": 1,
      "title": "sample string 5",
      "caption": "sample string 6",
      "url": "sample string 7",
      "externalMediaId": 1,
      "draftId": 8
    }
  ],
  "unitTypes": [
    {
      "unitTypeId": 64,
      "unitCount": 2
    },
    {
      "unitTypeId": 64,
      "unitCount": 2
    }
  ],
  "links": [
    {
      "linkId": 1,
      "url": "sample string 2",
      "linkTypeId": 64,
      "linkDescription": "sample string 4",
      "productId": 5,
      "linkTitle": "sample string 6",
      "distance": 1.0
    },
    {
      "linkId": 1,
      "url": "sample string 2",
      "linkTypeId": 64,
      "linkDescription": "sample string 4",
      "productId": 5,
      "linkTitle": "sample string 6",
      "distance": 1.0
    }
  ],
  "rateDescription": "sample string 23",
  "dateDescription": "sample string 24",
  "caaRatingTypeId": 64,
  "caaRatingValue": 64,
  "canadaSelectRatings": [
    {
      "canadaSelectRatingTypeId": 64,
      "rating": 64
    },
    {
      "canadaSelectRatingTypeId": 64,
      "rating": 64
    }
  ],
  "paymentTypes": [
    64,
    64
  ],
  "regionsOfOperation": [
    64,
    64
  ],
  "hasOffSeasonDates": true,
  "hasOffSeasonRates": true,
  "noTax": true
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.