HSAPI Documentation Portal


Getting started

The HomeAway Software API (HSAPI) is a restful API that will allow channel partners and other users to book units, in either Escapia or V12, with a choice of additional packages and extras. At this time, HSAPI works alongside the existing ISILink and EscapiaNET APIs and provides new functionality not available in those systems.

Endpoints

HSAPI root url:

https://hsapi.escapia.com/dragomanadapter/hsapi/{operation}

Auth token creation endpoint:

https://hsapi.escapia.com/dragomanadapter/hsapi/auth/token

Usage

Any request to HSAPI must provide an Authentication header value that contains a Base64 encoded OAuth bearer auth token. More details about how to get a bearer auth token can be found in the Auth documentation. It must also provide the following custom headers to indicate which COID and End System it should be routed to:

x-homeaway-hasp-api-endsystem: EscapiaVRS
x-homeaway-hasp-api-pmcid: 1020

You'll need to replace the values with the correct ones for the end system and PMC you're working with. The end system value must be EscapiaVRS, or V12. The pmcid value must be the COID of the PMC whose data this request should be made against.

Note: The HSAPI operation listPmcs does not require the x-homeaway-hasp-api-pmcid header as it is a special call that returns the list of PMCs that have enabled you for access, and thus has no specific PMC scope.

The version of the api you wish to use must also be specified. HSAPI currently supports versions 9 and 10. It is strongly recommended to use the newest version of the API available, as it will have the most functionality and stability. HSAPI will always support one legacy version behind the newest to allow smooth migrations.

To specify the version, send the following header with all requests (using version 10 as an example):

x-homeaway-hasp-api-version: 10

Note that you do not need to send the version header when creating an OAuth bearer token; however, doing so will not affect the process.

Format

All requests to HSAPI must be sent in the JSON data format, and all responses will be returned in that format as well.

Property names should always be camel-cased. Example: myPropertyName: { }

When sending JSON data, you must include in the header of the request that you are doing so.

Content-Type: application/json

Frequently asked questions

When do oauth tokens expire?
There's an expiration field in the response to the authentication request that indicates the expiry date time of the token in ISO 8601 format.
{
	"$id": "1",
	"expiration": "2016-01-05T21:13:21.33Z",
	"id": "08606ce6-9519-4ad7-9d1f-e86908f0ff90",
	"encodedId": "MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw",
	"authorizationHeaderValue": "Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw"
}
What is the difference between an Extra, ExtraPricingSummary and ExtraSpecification?

An Extra is an additional service offered to a guest. Examples include ski lift tickets, a round of golf, or jet ski rental. The Extra object (also referred to as an Extra Definition) is a representation of an Extra in the system.

An ExtraSpecification is an object used to specify when and how many Extras are requested by the traveller on a quote or a reservation. An ExtraSpecification must reference an Extra Definition via the ExtraTypeNativePMSID field to point to the Extra being requested. An ExtraSpecification is sent by the client as a part of the QuoteSpecification or CustomizeReservationSpecification.

An ExtraPricingSummary is an object returned on suscessful Quote or Reservation that includes the price of the Extra based on the ExtraSpecification (quantity and date). The ExtraPricingSummary includes the corresponding Extra that is priced, in the Definition field.

Refer Examples on including Extras on a new or existing reservation.

AddOns and Packages also follow a similar paradigm.

Can I use an existing guest while creating reservations?
Yes. You'll need to specify the NativePmsId of the guest. For example here's a sample create reservation request body:
{
  "Guests": [
	{
		"NativePMSID": "568"
	}
  ],
  "MarketingCategory": {
	"NativePMSID": "3"
  },
  "MarketingSource": {
	"NativePMSID": "19"
  },
  "QuoteSpecification": {
	"StayDateRange": {
	  "StartDate": "2016-06-02",
	  "EndDate": "2016-06-07"
	},
	"UnitNativePMSID": "44",
	"Adults": 2,
	"Children": 0,
	"ReservationTypeNativePMSID": "R",
	"PMCID": "1234"
  },
  "PMCID": "1234"
}

V12 will lookup the guest and associate that guest with the reservation. It won't update any information on the guest.

Escapia will lookup the guest and associate that guest with the reservation, but will update the guest info as well. So you'll need to provide all the up-to-date information about the guest. The name and address fields are required. If no phone or emails are provided, Escapia will clear them from the guest record.

Authentication overview

HSAPI uses the OAuth2 authentication framework to ensure security. In order to make authorized requests, a partner must first request a bearer auth token from a special endpoint. After that has been done successfully, that bearer token must be passed along with each subsequent request. A bearer token is not permanent and should not be stored in your application; they will generally last for about 24 hours and must be recreated after that.

The steps described below represent the primary use cases for using the HomeAway Software API (HSAPI).

Important note

The examples provided use credentials for a fake channel partner and a fake PMC in the Mock End System. The PMC has an COID of 4321 and a HSAPI PMCID of 1234. In order to authenticate in a real setting, you'll need to use the client id and client secret that was provided to you.

Getting a token

The first thing a HSAPI user needs to do is request a bearer authorization token from the /hsapi/auth/token endpoint. This token will be used to authenticate and authorize you on all subsequent calls to the other endpoints of HSAPI. In this example we're using a fake clientId and secret, so remember to use your real credentials when doing this in production.

Starting point: You have your clientId (01234567-aabb-4c4c-def123456789) and secret (abcdabcd-0011-4e4e-00000badbeef).

Goal: You wish to obtain a valid Bearer auth token for access to the api's other protected endpoints.

Steps:

1. Construct a string with format clientId:secret and base64 encode it.

Formatted string:

01234567-aabb-4c4c-def123456789:abcdabcd-0011-4e4e-00000badbeef

After encoding:

MDEyMzQ1NjctYWFiYi00YzRjLWRlZjEyMzQ1Njc4OTphYmNkYWJjZC0wMDExLTRlNGUtMDAwMDBiYWRiZWVm

2. Supply this as basic auth credentials in the Authorization header in a call to /hsapi/auth/token

Sample request:

GET https://hsapi.escapia.com/dragomanadapter/hsapi/auth/token HTTP/1.1
Authorization: Basic MDEyMzQ1NjctYWFiYi00YzRjLWRlZjEyMzQ1Njc4OTphYmNkYWJjZC0wMDExLTRlNGUtMDAwMDBiYWRiZWVm
Host: hsapi.escapia.com

Sample response:

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 760
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
Set-Cookie: homeaway.hasp.api.dragomanadapter.userobject=; path=/
X-Powered-By: ASP.NET
Date: Wed, 23 Dec 2015 00:25:00 GMT
									
{"expiration":"2015-12-25T00:42:44.84Z","id":"7dc40fb1-2960-4825-aeac-02689db2e381","encodedId":"N2RjNDBmYjEtMjk2MC00ODI1LWFlYWMtMDI2ODlkYjJlMzgx","authorizationHeaderValue":"Bearer N2RjNDBmYjEtMjk2MC00ODI1LWFlYWMtMDI2ODlkYjJlMzgx"}

3. Use token in bearer Authorization header

The authorizationHeaderValue from the response JSON holds the value you'll need to pass with each request in an Authorization header. You may now use this to authenticate any subsequent api calls. The id is also provided raw, and base64 encoded.

Authorization header (with token):

Authorization: Bearer N2RjNDBmYjEtMjk2MC00ODI1LWFlYWMtMDI2ODlkYjJlMzgx

Permissions overview

HSAPI has two levels of permissions that affect incoming requests:

Enabling partner
In order to make any requests against a PMCs data through HSAPI, a partner must be explicitly enabled by that PMC. If a partner is not enabled for a PMC, all requests for their data will return 401: Unauthorized.
Method access control
Each PMC must explicitly whitelist the methods available to a given partner on a partber-by-partner basis. If a request is made to a method not allowed, a 403: Method not allowed response will be returned, with a reason phrase and content explaining the ACL rejection.

Getting enabled

In order to be enabled, you must contact the PMC you wish to be enabled for and ask them to enable you. This is a one-time task, and you will be enabled permanently or until they revoke access.

Method access control

If you need access to run requests against a method, contact the PMC and make sure they know the exact method name that you need to implement your code. They can whitelist you for that method.

Example requests

In preparation for subsequent API workflows, there are a number of API calls necessary to fetch PMCID/EndSystem-dependent lists of data that will be leveraged in booking calls.

Getting a list of Property Management Companies

To get a list of Property Management Companies that have enabled access to you on a per EndSystem basis, use the listPmcs endpoint

Sample Request
	GET https://hsapi.escapia.com/dragomanadapter/hsapi/ListPmcs HTTP/1.1
	Accept: application/json
	Authorization: Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw
	x-homeaway-hasp-api-version: 10
	x-homeaway-hasp-api-endsystem: EscapiaVRS
	
Sample Response
	HTTP/1.1 200 OK
	Cache-Control: no-cache
	Pragma: no-cache
	Content-Length: 749
	Content-Type: application/json; charset=utf-8
	Expires: -1
	Server: Microsoft-IIS/10.0
	X-AspNet-Version: 4.0.30319
	Set-Cookie: homeaway.hasp.api.dragomanadapter.userobject=; path=/
	X-Powered-By: ASP.NET
	Date: Thu, 31 Dec 2015 21:02:44 GMT
	[
		{"$id":"1","endSystem":6,"pmcid":"1020","name":"Big Bear Rentals","address":{"$id":"2","street1":"4009 Osceola St.","street2":null,"city":"Denver","state":"CO","province":null,"zip":"80212","country":"United States","addressContactTypeId":null,"isPrimary":true,"id":0,"pmcid":null,"nativePMSID":"1"},"email":{"$id":"3","address":"dbrown@homeaway.com","emailContactTypeId":null,"isPrimary":true,"id":0,"pmcid":null,"nativePMSID":"1"},"logoURL":"http://upload.wikimedia.org/wikipedia/en/thumb/2/24/WWF_logo.svg/263px-WWF_logo.svg.png","phone":{"$id":"4","countryCode":"1","areaCode":"303","number":"555-1020","extension":null,"phoneContactTypeId":null,"isPrimary":true,"id":0,"pmcid":null,"nativePMSID":"1"},"url":"http://www.bigbearvacations.com/"}
	]
	

Getting the list of Marketing Categories and Sources

To get a list of Marketing Categories and Sources for a PMC, use the listMarketingCategories endpoint

Sample Request
	GET https://hsapi.escapia.com/dragomanadapter/hsapi/ListMarketingCategories HTTP/1.1
	Accept: application/json
	Authorization: Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw
	x-homeaway-hasp-api-pmcid: 1020
	x-homeaway-hasp-api-version: 10
	x-homeaway-hasp-api-endsystem: EscapiaVRS
		
Sample Response
	HTTP/1.1 200 OK
	Cache-Control: no-cache
	Pragma: no-cache
	Content-Length: 5097
	Content-Type: application/json; charset=utf-8
	Expires: -1
	Server: Microsoft-IIS/10.0
	X-AspNet-Version: 4.0.30319
	Set-Cookie: homeaway.hasp.api.dragomanadapter.userobject=; path=/
	X-Powered-By: ASP.NET
	Date: Thu, 31 Dec 2015 21:53:10 GMT
	[{
		"$id": "1",
		"category": "Newspaper",
		"correspondingInquirySource": null,
		"marketingSources": [{
			"$id": "2",
			"source": "Denver Post",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "1"
		},
		{
			"$id": "3",
			"source": "Rocky Mountain News",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "2"
		},
		{
			"$id": "4",
			"source": "Tennyson Times",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "3"
		}],
		"id": 0,
		"pmcid": null,
		"nativePMSID": "1"
	},
	{
		"$id": "5",
		"category": "Internet",
		"correspondingInquirySource": 1,
		"marketingSources": [{
			"$id": "6",
			"source": "Craigslist",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "5"
		},
		{
			"$id": "7",
			"source": "Custom Website",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "6"
		},
		{
			"$id": "8",
			"source": "Perfect Places",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "38"
		},
		{
			"$id": "9",
			"source": "Perfect Places Vacation Rental N",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "40"
		}],
		"id": 0,
		"pmcid": null,
		"nativePMSID": "2"
	},
	{
		"$id": "10",
		"category": "Mail",
		"correspondingInquirySource": null,
		"marketingSources": [{
			"$id": "11",
			"source": "Flier",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "7"
		},
		{
			"$id": "12",
			"source": "Giveaway",
			"correspondingInquirySource": null,
			"id": 0,
			"pmcid": null,
			"nativePMSID": "8"
		}],
		"id": 0,
		"pmcid": null,
		"nativePMSID": "3"
	}]
	

Getting the lists of Address, Phone & Email Contact Types

To get the list of Address Contact Types defined by the PMCID, use the listAddressContactType endpoint. To get the list of Phone and Email contact types use the listPhoneContactTypes and listEmailContactTypes respectively. The NativePMSID of the phone contact type and email contact type are required to create new guests.

Sample Request
	GET https://hsapi.escapia.com/dragomanadapter/hsapi/ListAddressContactTypes HTTP/1.1
	Accept: application/json
	Authorization: Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw
	x-homeaway-hasp-api-pmcid: 1020
	x-homeaway-hasp-api-version: 10
	x-homeaway-hasp-api-endsystem: EscapiaVRS
		
Sample Response
	HTTP/1.1 200 OK
	Cache-Control: no-cache
	Pragma: no-cache
	Content-Length: 347
	Content-Type: application/json; charset=utf-8
	Expires: -1
	Server: Microsoft-IIS/10.0
	X-AspNet-Version: 4.0.30319
	Set-Cookie: homeaway.hasp.api.dragomanadapter.userobject=; path=/
	X-Powered-By: ASP.NET
	Date: Thu, 31 Dec 2015 22:09:27 GMT
	[{
	"$id": "1",
	"addressContactTypeName": "Home",
	"id": 0,
	"pmcid": "1020",
	"nativePMSID": "1"
	},
	{
	"$id": "2",
	"addressContactTypeName": "Apartment",
	"id": 0,
	"pmcid": "1020",
	"nativePMSID": "2"
	},
	{
	"$id": "3",
	"addressContactTypeName": "Vacation",
	"id": 0,
	"pmcid": "1020",
	"nativePMSID": "3"
	},
	{
	"$id": "4",
	"addressContactTypeName": "Other",
	"id": 0,
	"pmcid": "1020",
	"nativePMSID": "4"
	}]
	

To get a list of all avaialble Extras for a PMC use the ListExtras endpoint. You can also search for Extras using the SearchExtras endpoint by passing in a ExtraSearchSpecification.

Include Extra(s) on a new Reservation

To include an Extra on a new reservation, you'll need to include an ExtraSpecification in the QuoteSpecification object which is included in the ReservationSpecification object.

Sample Request (Note: some of the fields have been elimated from this sample for brevity)
	PUT https://hsapi.escapia.com/dragomanadapter/hsapi/CreateReservation HTTP/1.1
	Authorization: Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw
	x-homeaway-hasp-api-endsystem: EscapiaVRS
	x-homeaway-hasp-api-pmcid: 1020
	x-homeaway-hasp-api-version: 10
	Content-Type: application/json
	Content-Length: 1549
	{
	  "Guests": [{ }],
	  "Note": "This is a Test reservation.",
	  "MarketingCategory": { },
	  "MarketingSource": { },
	  "QuoteSpecification": {
		"StayDateRange": {
		  "StartDate": "2016-05-23",
		  "EndDate": "2016-05-28"
		},
		"UnitNativePMSID": "1",
		"Adults": 2,
		"Children": 0,
		"Pets": 0,
		"ReservationTypeNativePMSID": "1",
								
		"Extras": [
		  {
			"ExtraTypeNativePMSID": "3",
			"Quantity": 2,
			"Date": "2016-05-24",
		  }
		],
			
	  },
	  "PMCID": "1020"
	}
		
Sample Response (Note: some of the fields have been elimated from this sample for brevity)

The response includes a list of ExtraPricingSummary objects that have the price for each of the Extras in the request

{
  "failureDiagnosis": null,
  "reservationNumber": "4474ba76-0193-494b-808a-1e06c36b1f80",
  "stayDateRange": {
	"$id": "2",
	"startDate": "2016-05-23",
	"endDate": "2016-05-28"
  },
  "unitNativePMSID": "1",
  "guests": [{}],
  "adults": 2,
  "children": 0,
  "rent": 500.1,
  "tax": 62.91,
  "discounts": [],
  "total": 803.01,
  "reservationDetailURL": "http://dev.lms.web.ui.local/ReservationConfirmation?ReservationId=",
  "reservationTypeNativePMSID": "1",
  "extras": [
	{
	  "definition": {
		"$id": "13",
		"name": "Ski Lift Ticket",
		"categoryName": "",
		"quantity": 2,
		"description": "Adult Ski Lift Ticket",
		"price": 90,
		"appliesTo": {
		  "$id": "14",
		  "allUnits": true,
		  "id": 0,
		  "pmcid": null,
		  "nativePMSID": null
		},
		"bookDateRange": {
		  "$id": "15",
		  "startDate": "2014-12-15",
		  "endDate": "2016-12-15"
		},
		"stayDateRange": {
		  "$id": "16",
		  "startDate": "2014-12-15",
		  "endDate": "2016-12-15"
		},
		"quantityAvailable": 50,
		"isDateRequired": true,
		"minNights": 2,
		"minimumQuantity": 1,
		"maximumQuantity": 10,
		"appliesToReservationTypes": null,
		"scaledImages": [
		  {
			"$id": "17",
			"caption": "Extra Image 1",
			"displayOrder": 1,
			"options": [
			  {
				"$id": "18",
				"url": "http://imagesus.homeaway.com/mda01/6a83b4af-95ae-4617-b667-d95c7274d333.1.9",
				"scale": 0,
				"height": 227,
				"width": 303
			  }
			],
			"pmcid": "1020",
			"nativePMSID": "3"
		  }
		],
		"id": 1,
		"pmcid": "1020",
		"nativePMSID": "1"
	  },
	  "price": 90,
	  "quantity": 1,
	  "date": "2016-05-24",
	  "id": 1,
	  "pmcid": "1020",
	  "nativePMSID": "1"
	}
  ],
	
  "pmcid": "1020",
  "nativePMSID": "14009"
}
		

Add Extra(s) on an existing Reservation

To include an Extra on an existing Reservation, you'll need to include an ExtraSpecification in the CustomizeReservationSpecification object.

Sample Request (Note: some of the fields have been elimated from this sample for brevity)
	PUT https://hsapi.escapia.com/dragomanadapter/hsapi/CustomizeReservation HTTP/1.1
	Authorization: Bearer MDg2MDZjZTYtOTUxOS00YWQ3LTlkMWYtZTg2OTA4ZjBmZjkw
	x-homeaway-hasp-api-endsystem: EscapiaVRS
	x-homeaway-hasp-api-pmcid: 1020
	x-homeaway-hasp-api-version: 10
	Content-Type: application/json
			
	{
	  "ReservationNativePMSID": "14011",
	  "Extras": [
		{
		  "ExtraTypeNativePMSID": "1",
		  "Quantity": 1,
		  "Date": "2020-11-11",
		  "Id": 0
		}
	  ]
	
	}
		
Sample Response (Note: some of the fields have been elimated from this sample for brevity)

The response includes a list of ExtraPricingSummary objects that have the price for each of the Extras in the request

{
  "$id": "1",
  "failureDiagnosis": null,
  "reservationNumber": "a1160a9f-c1bb-4fa6-9795-cdedb8f6da96",
  "stayDateRange": {
	"$id": "2",
	"startDate": "2020-11-10",
	"endDate": "2020-11-15"
  },
  "unitNativePMSID": "1",
  "guests": [{}],
  "adults": 0,
  "children": 0,
  "rent": 500.1,
  "tax": 62.91,
  "discounts": [],
  "total": 803.01,
  "reservationDetailURL": "http://dev.lms.web.ui.local/ReservationConfirmation?ReservationId=",
  "reservationTypeNativePMSID": "1",
  "extras": [
	{
	  "$id": "12",
	  "definition": {
		"$id": "13",
		"name": "Ski Lift Ticket",
		"categoryName": "",
		"quantity": 2,
		"description": "Adult Ski Lift Ticket",
		"price": 90,
		"bookDateRange": {
		  "$id": "15",
		  "startDate": "2014-12-15",
		  "endDate": "2016-12-15"
		},
		"stayDateRange": {
		  "$id": "16",
		  "startDate": "2014-12-15",
		  "endDate": "2016-12-15"
		},
		"quantityAvailable": 50,
		"isDateRequired": true,
		"minNights": 2,
		"minimumQuantity": 1,
		"maximumQuantity": 10,
		"appliesToReservationTypes": null,
		"scaledImages": [
		  {
			"$id": "17",
			"caption": "Extra Image 1",
			"displayOrder": 1,
			"options": [
			  {
				"$id": "18",
				"url": "http://imagesus.homeaway.com/mda01/6a83b4af-95ae-4617-b667-d95c7274d333.1.9",
				"scale": 0,
				"height": 227,
				"width": 303
			  },,
		],
		"id": 1,
		"pmcid": "1020",
		"nativePMSID": "1"
	  },
	  "price": 90,
	  "quantity": 1,
	  "date": "2020-11-11",
	  "id": 1,
	  "pmcid": "1020",
	  "nativePMSID": "3"
	}
  ],

  "pmcid": "1020",
  "nativePMSID": "14011"
}
	

To create a reservation you'll need to specify atleast the following information

  • Guest

    To create new guest while creating a reservation you'll need to specify atleast 1 address, phone number and email address for the guest. The PhoneContactTypeId and EmailContactTypeId are required for phone and email address. Refer above for more information on getting a list of available phone and email contact types for a PMC.
  • MarketingCategory

    The NativePmsId of the MarketingCategory is required to create a reservation. Refer above for more information on getting a list of available marketing categories for a PMC.
  • MarketingSource

    The NativePmsId of the MarketingSource is required to create a reservation. Refer above for more information on getting a list of available marketing categories for a PMC.
  • PmcId

    The Pmc for which you like to create the reservation.
  • QuoteSpecification

    You'll need a QuoteSpecification to specify stay parameters. The required fields in a QuoteSpecification are
    • StayDateRange - starting and ending dates of your stay
    • Adults - number of adults
    • Children - number of children
    • PMCID
    • UnitNativePMSID - the nativePMSId of the unit you'd like to stay in
    • ReservationTypeNativePmsId - you can get a list of the available ReservationTypes for a pmc via the ListReservationTypes endpoint

Sample Request Body
{
  "Guests": [
	{
	  "FirstName": "Lester",
	  "LastName": "Tester",
	  "Addresses": [
		{
		  "Street1": "123 Fake St",
		  "City": "Denver",
		  "State": "CO",
		  "Zip": "80999",
		  "Country": "United States",
		  "IsPrimary": true,
		  "PMCID": "1020",
		}
	  ],
	  "Phones": [
		{
		  "CountryCode": "1",
		  "AreaCode": "333",
		  "Number": "123-4567",
		  "PhoneContactTypeId": "2",
		  "IsPrimary": true,
		}
	  ],
	  "Emails": [
		{
		  "Address": "lester@tester.test",
		  "EmailContactTypeId": "0",
		  "IsPrimary": true,
		}
	  ],
	  "IsPrimaryGuest": true,
	  "PMCID": "1020"
	}
  ],
  "MarketingCategory": {
	"NativePMSID": "2602"
  },
  "MarketingSource": {
	"NativePMSID": "35547"
  },
  "QuoteSpecification": {
	"StayDateRange": {
	  "StartDate": "2017-06-20",
	  "EndDate": "2017-06-25"
	},
	"UnitNativePMSID": "40067",
	"Adults": 2,
	"Children": 0,
	"ReservationTypeNativePMSID": "0",
	"PMCID": "1020"
  },
  "PMCID": "1020"
}

To get a list of all available add ons for a property, an AddOnSearchSepcification can be passed to the SearchAddOns endpoint. Alternatively, the ListAddOns endpoint can be used.

Sample Request(Note: some of the fields have been elimated from this sample for brevity)
POST http://dev.hasp.api.dragomanadapter.local/dragomanadapter/hsapi/SearchAddOns HTTP/1.1
Connection: keep-alive
Content-Length: 384
Authorization: Bearer ODQ5ZWM3YzgtYWRiNy00ZGQxLTg3YzktNGE5ZWQ4M2NkYTNk
x-homeaway-hasp-api-pmcid: 1020
x-homeaway-hasp-api-version: 10
Content-Type: application/json
Accept: application/json
x-homeaway-hasp-api-endsystem: EscapiaVRS
{
  "specification": {
    "returnOnlyTravelInsurance": false,
    "pmcid": "1020",
    "searchTerm": "",
    "stayDateRange": {
      "startDate": "2016-12-03",
      "endDate": "2016-12-10"
    },
    "unitNativePMSID": "1",
    "reservationTypeNativePMSID": "",
    "rateAdjustmentCategoryNativePMSID": "",
    "promoCodeNativePMSID": ""
  },
  "pageSize": 100,
  "pageNumber": 0
}
Sample Response
{
  "$id": "1",
  "results": [
    {
      "$id": "2",
      "name": "Administration Fee",
      "quantity": null,
      "description": "Standard Admin Fee",
      "inRent": true,
      "chargeType": "Standard",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "3",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "1"
    },
    {
      "$id": "4",
      "name": "Cleaning Fee",
      "quantity": null,
      "description": "Standard Cleaning Fee",
      "inRent": false,
      "chargeType": "Standard",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "5",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "2"
    },
    {
      "$id": "6",
      "name": "Grill Rental",
      "quantity": null,
      "description": "Add on for grill rental",
      "inRent": false,
      "chargeType": "Standard",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "7",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "3"
    },
    {
      "$id": "8",
      "name": "Standard Security Deposit",
      "quantity": null,
      "description": "Optional Security Deposit",
      "inRent": false,
      "chargeType": "RefundableDeposit",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "9",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "4"
    },
    {
      "$id": "10",
      "name": "Travel Insurance Option 1",
      "quantity": null,
      "description": "Travel Insurance Option 1",
      "inRent": false,
      "chargeType": "TravelInsurance",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "11",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "5"
    },
    {
      "$id": "12",
      "name": "Travel Insurance Option 2",
      "quantity": null,
      "description": "Travel Insurance Option 2",
      "inRent": false,
      "chargeType": "TravelInsurance",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "13",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "6"
    },
    {
      "$id": "14",
      "name": "Nightly Fee",
      "quantity": null,
      "description": "A $10 fee per night",
      "inRent": true,
      "chargeType": "Standard",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "15",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "7"
    },
    {
      "$id": "16",
      "name": "In-Rent Refundable Deposit",
      "quantity": null,
      "description": "In-Rent Refundable Deposit for good reasons",
      "inRent": true,
      "chargeType": "RefundableDeposit",
      "appliesToReservationTypes": null,
      "appliesTo": {
        "$id": "17",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "8"
    },
    {
      "$id": "18",
      "name": "Owner-only add-on",
      "quantity": null,
      "description": "Only applies to owners",
      "inRent": false,
      "chargeType": "Standard",
      "appliesToReservationTypes": [
        "2"
      ],
      "appliesTo": {
        "$id": "19",
        "allUnits": true,
        "id": 0,
        "pmcid": null,
        "nativePMSID": null
      },
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "9"
    }
  ],
  "totalCount": 9,
  "pageSize": 100,
  "pageNumber": 0,
  "fromIndex": -99,
  "toIndex": 0
}

When generating quotes, two fields of QuoteSpecification dictate how add ons are specified for the quote - includeDefaultAddOns and addOns.

Default Add Ons

When the includeDefaultAddOns field of the QuoteSpecification is set to true, the default add ons for the property will be included in the quote, and any add ons manually specified in the addOns field will be ignored. It is recommended to not include the addOns field when includeDefaultAddOns is true.

Sample Request (Note: some of the fields have been elimated from this sample for brevity)
POST http://dev.hasp.api.dragomanadapter.local/dragomanadapter/hsapi/GenerateQuote HTTP/1.1
Content-Length: 479
Authorization: Bearer ODQ5ZWM3YzgtYWRiNy00ZGQxLTg3YzktNGE5ZWQ4M2NkYTNk
x-homeaway-hasp-api-pmcid: 1020
x-homeaway-hasp-api-version: 10
Content-Type: application/json
Accept: application/json
x-homeaway-hasp-api-endsystem: EscapiaVRS
{
	"stayDateRange": {
		"startDate":"2016-12-03",
		"endDate":"2016-12-10"
		},
	"unitNativePMSID":"1",
	"promoCodeNativePMSID":"",
	"includeDefaultTravelInsurance":true,
	"includeDefaultRefundableDeposits":true,
	"includeDefaultAddOns":true,
	"adults":1,
	"children":0,
	"freeGuests":0,
	"pets":0,
	"reservationTypeNativePMSID":"",
	"discount":0,
	"discountType":"Dollar",
	"pricingPlanNativePMSID":"",
	"ignoreBookingRules":false,
	"id":0,
	"pmcid":"1020",
	"nativePMSID":""
}
		
Sample Response (Note: some of the fields have been elimated from this sample for brevity)

Note that the default add ons for the property in question are included.

{
  "$id": "1",
  "quoteSpecification": {
    "$id": "2",
    "stayDateRange": {
      "$id": "3",
      "startDate": "2016-12-03",
      "endDate": "2016-12-10"
    },
    "unitNativePMSID": "1",
    "promoCodeNativePMSID": "",
    "includeDefaultTravelInsurance": false,
    "includeDefaultRefundableDeposits": false,
    "includeDefaultAddOns": false,
    "adults": 1,
    "children": 0,
    "freeGuests": 0,
    "pets": 0,
    "reservationTypeNativePMSID": "1",
    "discount": 0,
    "discountType": "Dollar",
    "pricingPlanNativePMSID": "",
    "marketingCategoryNativePMSID": null,
    "marketingSourceNativePMSID": null,
    "ignoreBookingRules": false,
    "packages": null,
    "extras": null,
    "addOns": [
      {
        "$id": "4",
        "addOnTypeNativePMSID": "4",
        "name": "Standard Security Deposit",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "4"
      },
      {
        "$id": "5",
        "addOnTypeNativePMSID": "5",
        "name": "Travel Insurance Option 1",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "5"
      },
      {
        "$id": "6",
        "addOnTypeNativePMSID": "1",
        "name": "Administration Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "1"
      },
      {
        "$id": "7",
        "addOnTypeNativePMSID": "2",
        "name": "Cleaning Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "2"
      },
      {
        "$id": "8",
        "addOnTypeNativePMSID": "7",
        "name": "Nightly Fee",
        "quantity": 7,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "7"
      }
    ],
    "id": 0,
    "pmcid": "1020",
    "nativePMSID": ""
  },
  "failureDiagnosis": null,
  "rent": 700.1,
  "tax": 105.83,
  "discounts": [],
  "discount": 0,
  "total": 1350.93,
  "paymentSchedule": [
    {
      "$id": "9",
      "orderNumber": 1,
      "name": "First Deposit",
      "amount": 400,
      "paymentTotal": 0,
      "dueDate": "2016-11-28",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    },
    {
      "$id": "10",
      "orderNumber": 2,
      "name": "Middle Deposit",
      "amount": 600,
      "paymentTotal": 0,
      "dueDate": "2016-12-13",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    },
    {
      "$id": "11",
      "orderNumber": 3,
      "name": "Last Deposit",
      "amount": 47.5,
      "paymentTotal": 0,
      "dueDate": "2016-12-28",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    }
  ],
  "isUnitAvailable": false,
  "packages": null,
  "extras": null,
  "addOns": [
    {
      "$id": "12",
      "definition": {
        "$id": "13",
        "name": "Standard Security Deposit",
        "quantity": null,
        "description": "Optional Security Deposit",
        "inRent": false,
        "chargeType": "RefundableDeposit",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "14",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "4"
      },
      "price": 225,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "4"
    },
    {
      "$id": "15",
      "definition": {
        "$id": "16",
        "name": "Travel Insurance Option 1",
        "quantity": null,
        "description": "Travel Insurance Option 1",
        "inRent": false,
        "chargeType": "TravelInsurance",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "17",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "5"
      },
      "price": 150,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "5"
    },
    {
      "$id": "18",
      "definition": {
        "$id": "19",
        "name": "Administration Fee",
        "quantity": null,
        "description": "Standard Admin Fee",
        "inRent": true,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "20",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "1"
      },
      "price": 50,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "1"
    },
    {
      "$id": "21",
      "definition": {
        "$id": "22",
        "name": "Cleaning Fee",
        "quantity": null,
        "description": "Standard Cleaning Fee",
        "inRent": false,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "23",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "2"
      },
      "price": 50,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "2"
    },
    {
      "$id": "24",
      "definition": {
        "$id": "25",
        "name": "Nightly Fee",
        "quantity": null,
        "description": "A $10 fee per night",
        "inRent": true,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "26",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "7"
      },
      "price": 70,
      "quantity": 7,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "7"
    }
  ]
}
		

Explicitly specifying Add Ons

Any changes to the default Add Ons can be specified with a second call to GenerateQuote using the returned QuoteSpecification from the original call to GenerateQuote. The addOns object of the returned QuoteSpecificiation object can have additional add ons appended to it. Ensure that includeDefaultAddOns is set to false.

Here, we're adding the "Grill Rental" add on from the original call to SearchAddOns above.

Sample Request (Note: some of the fields have been elimated from this sample for brevity)
POST http://dev.hasp.api.dragomanadapter.local/dragomanadapter/hsapi/GenerateQuote HTTP/1.1
Content-Length: 1946
Authorization: Bearer ODQ5ZWM3YzgtYWRiNy00ZGQxLTg3YzktNGE5ZWQ4M2NkYTNk
x-homeaway-hasp-api-pmcid: 1020
x-homeaway-hasp-api-version: 10
Content-Type: application/json
Accept: application/json
x-homeaway-hasp-api-endsystem: EscapiaVRS
{
    "$id": "2",
    "stayDateRange": {
      "$id": "3",
      "startDate": "2016-12-03",
      "endDate": "2016-12-10"
    },
    "unitNativePMSID": "1",
    "promoCodeNativePMSID": "",
    "includeDefaultTravelInsurance": false,
    "includeDefaultRefundableDeposits": false,
    "includeDefaultAddOns": false,
    "adults": 1,
    "children": 0,
    "freeGuests": 0,
    "pets": 0,
    "reservationTypeNativePMSID": "1",
    "discount": 0,
    "discountType": "Dollar",
    "pricingPlanNativePMSID": "",
    "marketingCategoryNativePMSID": null,
    "marketingSourceNativePMSID": null,
    "ignoreBookingRules": false,
    "packages": null,
    "extras": null,
    "addOns": [
      {
        "$id": "4",
        "addOnTypeNativePMSID": "4",
        "name": "Standard Security Deposit",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "4"
      },
      {
        "$id": "5",
        "addOnTypeNativePMSID": "5",
        "name": "Travel Insurance Option 1",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "5"
      },
      {
        "$id": "6",
        "addOnTypeNativePMSID": "1",
        "name": "Administration Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "1"
      },
      {
        "$id": "7",
        "addOnTypeNativePMSID": "2",
        "name": "Cleaning Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "2"
      },
      {
        "$id": "8",
        "addOnTypeNativePMSID": "7",
        "name": "Nightly Fee",
        "quantity": 7,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "7"
      },
      {
        "addOnTypeNativePMSID": "3",
        "name": "Grill Rental",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "3"
      }
    ],
    "id": 0,
    "pmcid": "1020",
    "nativePMSID": ""
  }
		
Sample Response (Note: some of the fields have been elimated from this sample for brevity)

The returned quote now includes the "Grill Rental" add on. Note that the total price is changed by the additional add on.

{
  "$id": "1",
  "quoteSpecification": {
    "$id": "2",
    "stayDateRange": {
      "$id": "3",
      "startDate": "2016-12-03",
      "endDate": "2016-12-10"
    },
    "unitNativePMSID": "1",
    "promoCodeNativePMSID": "",
    "includeDefaultTravelInsurance": false,
    "includeDefaultRefundableDeposits": false,
    "includeDefaultAddOns": false,
    "adults": 1,
    "children": 0,
    "freeGuests": 0,
    "pets": 0,
    "reservationTypeNativePMSID": "1",
    "discount": 0,
    "discountType": "Dollar",
    "pricingPlanNativePMSID": "",
    "marketingCategoryNativePMSID": null,
    "marketingSourceNativePMSID": null,
    "ignoreBookingRules": false,
    "packages": null,
    "extras": null,
    "addOns": [
      {
        "$id": "4",
        "addOnTypeNativePMSID": "4",
        "name": "Standard Security Deposit",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "4"
      },
      {
        "$id": "5",
        "addOnTypeNativePMSID": "5",
        "name": "Travel Insurance Option 1",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "5"
      },
      {
        "$id": "6",
        "addOnTypeNativePMSID": "1",
        "name": "Administration Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "1"
      },
      {
        "$id": "7",
        "addOnTypeNativePMSID": "2",
        "name": "Cleaning Fee",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "2"
      },
      {
        "$id": "8",
        "addOnTypeNativePMSID": "7",
        "name": "Nightly Fee",
        "quantity": 7,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "7"
      },
      {
        "$id": "9",
        "addOnTypeNativePMSID": "3",
        "name": "Grill Rental",
        "quantity": 1,
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "3"
      }
    ],
    "id": 0,
    "pmcid": "1020",
    "nativePMSID": ""
  },
  "failureDiagnosis": null,
  "rent": 700.1,
  "tax": 110.08,
  "discounts": [],
  "discount": 0,
  "total": 1405.18,
  "paymentSchedule": [
    {
      "$id": "10",
      "orderNumber": 1,
      "name": "First Deposit",
      "amount": 400,
      "paymentTotal": 0,
      "dueDate": "2016-11-28",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    },
    {
      "$id": "11",
      "orderNumber": 2,
      "name": "Middle Deposit",
      "amount": 600,
      "paymentTotal": 0,
      "dueDate": "2016-12-13",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    },
    {
      "$id": "12",
      "orderNumber": 3,
      "name": "Last Deposit",
      "amount": 47.5,
      "paymentTotal": 0,
      "dueDate": "2016-12-28",
      "paymentStatus": "Unpaid",
      "id": 0,
      "pmcid": null,
      "nativePMSID": null
    }
  ],
  "isUnitAvailable": false,
  "packages": null,
  "extras": null,
  "addOns": [
    {
      "$id": "13",
      "definition": {
        "$id": "14",
        "name": "Standard Security Deposit",
        "quantity": null,
        "description": "Optional Security Deposit",
        "inRent": false,
        "chargeType": "RefundableDeposit",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "15",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "4"
      },
      "price": 225,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "4"
    },
    {
      "$id": "16",
      "definition": {
        "$id": "17",
        "name": "Travel Insurance Option 1",
        "quantity": null,
        "description": "Travel Insurance Option 1",
        "inRent": false,
        "chargeType": "TravelInsurance",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "18",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "5"
      },
      "price": 150,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "5"
    },
    {
      "$id": "19",
      "definition": {
        "$id": "20",
        "name": "Administration Fee",
        "quantity": null,
        "description": "Standard Admin Fee",
        "inRent": true,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "21",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "1"
      },
      "price": 50,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "1"
    },
    {
      "$id": "22",
      "definition": {
        "$id": "23",
        "name": "Cleaning Fee",
        "quantity": null,
        "description": "Standard Cleaning Fee",
        "inRent": false,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "24",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "2"
      },
      "price": 50,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "2"
    },
    {
      "$id": "25",
      "definition": {
        "$id": "26",
        "name": "Nightly Fee",
        "quantity": null,
        "description": "A $10 fee per night",
        "inRent": true,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "27",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "7"
      },
      "price": 70,
      "quantity": 7,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "7"
    },
    {
      "$id": "28",
      "definition": {
        "$id": "29",
        "name": "Grill Rental",
        "quantity": null,
        "description": "Add on for grill rental",
        "inRent": false,
        "chargeType": "Standard",
        "appliesToReservationTypes": null,
        "appliesTo": {
          "$id": "30",
          "allUnits": true,
          "id": 0,
          "pmcid": null,
          "nativePMSID": null
        },
        "id": 0,
        "pmcid": "1020",
        "nativePMSID": "3"
      },
      "price": 50,
      "quantity": 1,
      "id": 0,
      "pmcid": "1020",
      "nativePMSID": "3"
    }
  ]
}
	

Reports overview

HSAPI provides an open-ended reporting methodology that allows partners to run reports against end systems. By using a decoupled approach, the reports or parameters can be added or modified quickly. A report in this system must return a rectangular two-dimensional data set, and any number of data sets can be returned simultaneously.

Running reports

Reports can be run by executing a POST request against this endpoint:

{rootUrl}/RunReport

The content of the POST request must be a ReportSpecification object that specified which report to run, and provides any parameters expected by the report execution engine. If there is no content in the request, the method will return a 400: Bad Request.

ReportSpecification schema:

{
	"Name": "nameOfReportToExecute",
	"Parameters": {
		"parameterName1": "valueAsString",
		"parameterName2": "valueAsString",
		...
	}
}
	

The Name property must correspond to an existing report in the end system, and each parameter value in Parameters must match an expected parameter value or unexpected results may occur. The possible reports and expected parameters are documented below.

When a report is successfully run, a ReportResult object is returned containing both the report data (in one or more result sets) and the metadata for each result set.

ReportOutput schema:

{
	"Specification": {
		"Name": "",
		"Parameters": {
			"parameterName1": "valueAsString",
			"parameterName2": "valueAsString",
			...
		}
	},
	"ResultSets": [
		{
			"Metadata": {
				"ColumnInfo": [
					{
						"Name": "column1", "Type": "column1Type"
					},
					{
						"Name": "column2", "Type": "column2Type"
					},
					...
				]
			},
			"Rows": [
				{
					"Values": [
						"row1value1", "row1value2", ...
					]
				},
				{
					"Values": [
						"row2value1", "row2value2", ...
					]
				},
				...
			]
		}
	],
	...
}
	

Note that the Specification property will exactly match the ReportSpecification that was passed in. The metadata for each column is returned in the ColumnInfo property of the Metadata property on each ResultSet. All the data rows and their values are within the Rows property.

Available reports

Escapia:

V12

Swagger overview

Swagger is an open-source framework for describing a RESTful API. A Swagger definition is a JSON document that describes the API in its entirety, including methods and model object types. This definition can be used for reference when programming against the API, and can also be used in conjunction with other open-source projects to automatically generate API clients in a variety of languages. More information about these projects can be found here.

Swagger-ui explorer

We have provided an API explorer endpoint that allows browsing of the current Swagger definition and documentation for the method endpoints and model objects.