6. Static

The Static Flow

In addition to the real-time inventory, there is also a possibility to set up your account to receive the event rate information as a static file every time there is a change in the rates.
In order to enable this, please contact your account manager.

The flow can work in 2 ways:
1. Innstant will initiate a call to tell you when a new file is ready for you, calling a URL you specify. for example:
http://yourdomain.com/notify?product=events&filename=http%3A%2F%2Fexample.com%2Fevents%2Fsomefilename.xml.zip

2. You can send an XML request using your regular Mishor credentials and get the latest available file:
Request:
<request version="4.0">
   <auth>
    <username>example</username>
    <password>example</password>
    <agent>example</agent>
    <language>en</language>
   </auth>
   <get-cache-files />
</request>

Response:

<?xml version="1.0"?>
<response success="1" time="2015-01-21 10:06:05" session="xx.1234567">
  <get-cache-files>
    <files product="events">
      <file>http://example2.com/events/somefile.xml.zip</file>
    </files>
  </get-cache-files>
</response>

for each service opened on your account for static handling, you will get a node with a url to download a zip file containing an XML with the static data.


Static file structure


<
?xml version="1.0"?>
<response success="1" time="2015-06-24 10:37:23" session="dv.12694382431037">
  <cache-items product="events" version="20150624103723" total="10931">
    <cache-item id="54412" provider="someProvider" billable="1" commissionAble="1" pricingPerDay="1" pricingPerPax="1">
      <departureRemark>
        <![CDATA[Grounds open from 10am- 5pm<br>House open from 11am- 4pm]]>
      </departureRemark>
      <age-options>
        <age-option type="Infant" ageFrom="0" ageTo="4" />
        <age-option type="Child" ageFrom="5" ageTo="16" />
        <age-option type="Adult" ageFrom="17" ageTo="59" />
        <age-option type="Senior" ageFrom="60" ageTo="99" />
      </age-options>
      <blocked-dates>
        <blocked-date blockDateFrom="2015-11-23" blockDateTo="2015-11-24"/>
      </blocked-dates>
      <pricing-options>
        <pricing-option>
          <title>
            <![CDATA[Castelton Castle Entrance Ticket]]>
          </title>
          <description>
            <![CDATA[Castelton Castle Entrance Ticket]]>
          </description>
          <daysInAdvance>
            <![CDATA[2]]>
          </daysInAdvance>
          <date-ranges>
            <date-range fromDate="2015-03-21" toDate="2015-11-01" type="Infant">
              <price amount="0" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-03-21" toDate="2015-11-01" type="Child">
              <price amount="27.2345058" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-03-21" toDate="2015-11-01" type="Adult">
              <price amount="60.5914974" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-03-21" toDate="2015-11-01" type="Senior">
              <price amount="54.539385" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-11-21" toDate="2015-12-20" type="Infant">
              <price amount="0" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-11-21" toDate="2015-12-20" type="Child">
              <price amount="27.2345058" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-11-21" toDate="2015-12-20" type="Adult">
              <price amount="60.5914974" currency="ILS" />
            </date-range>
            <date-range fromDate="2015-11-21" toDate="2015-12-20" type="Senior">
              <price amount="54.539385" currency="ILS" />
            </date-range>
          </date-ranges>
        </pricing-option>
        ...
      </pricing-options>
    </cache-item>
    ...
  </cache-items>
</response>

 Parameter Type Comments
cache-item @pricingPerDaybooleanWhether the given price is per day or total
cache-item @pricingPerPaxbooleanWhether the given price is per pax or total
cache-item/departureRemarkstringmandatory remark
cache-item/age-optionsnodehow the age is treated for this specific event
cache-item/blocked-datesnodedate ranges that CANNOT be booked
pricing-option/titlestringthe title of this specific pricing option
pricing-option/descriptionstringthe description of this specific pricing option
pricing-option/daysInAdvanceintnumber of days before the start date the booking can be made
pricing-option/date-range @fromdatedate YYYY-MM-DDthe start date of the date range
pricing-option/date-range @toDatedate YYYY-MM-DDthe end date of the date range
pricing-option/date-range @typestringtaken from the age-options
pricing-option/date-range/price @amountfloatthe cost of the event for that specific date range

 pricing-option/date-range/price @currencycurrency 3 letter ISO code of the currency related to the price attribute 

Comments