Page tree
Skip to end of metadata
Go to start of metadata

This command is deprecated. Please use bookingtimesuggestions instead.

List available times

Retrieves a list of suggested times that a resource may be booked. All suggestions must be with specified interval. The end time is the limit for when the booking must end by. The first suggested time is defined by the parameter starttime or the opening time for the resource, which ever comes last. The last suggested time is defined by the endtime from the search or when the resources closes, the entire booking may not extend past the endtime. The interval for the suggested times is specified from the product's settings for resource requirements, however no shorter than 5 minutes.

Request

HTTP GET till /timeslotsuggestions

Filter

Name

Required

Example

Description

Value

Default

productid

Yes

productid=23

Only suggestions for the specified product

Id

 

resourceids

No

resourceids=3,66

Only suggestions for these resources

Id-List

 

resourcetypeid

No

resourcetypeid=2

Only suggestions for resources of this type. If any of the resources from resourceids is not of this type they won't be returned.

Id

 

businessunitid

Yes

businessunitid=2

Only this business unit/faciltiy

Id

 

startdate

No

startdate=2012-11-31

Start day. Please note that the interval between the start and end day may be no longer than one week.

Date

Today

starttime

No

starttime=10:00

Start time

Time

Now; rounded up to nearest previous 5 minutes

enddate

No

enddate=2012-12-01

End day. Please note that the interval between the start and end day may be no longer than one week.

Date

Tomorrow

endtime

No

endtime=20:00

End time

Time

23:59

includepriceNotrueIf true the product's price for each suggested time is included. The price can vary due to scheduling and price lists. Please note that the size of the response will increase significantly.  Booleanfalse
pricelistidNo1Id för den prislista som priset ska hämtas ifrån. Parametern ignoreras om inte includeprice skickas in.Id 

Exempel:

APIURL/timeslotsuggestions.xml?productid=23&businessunitid=2&resourceids=3,66

Response

Tag

Format

Example

Description

timeslotsuggestions

 

<timeslotsuggestions>

timeslotsuggestions-tag encloses the suggested times

product

 

<product>

Selected product

id

ID

<id>47</id>

Product ID

name

Sträng

<name>Massage 60 min</name>

Name of product

timeresolution

 

<timeresolution>01:00</timeresolution/>

Products time resolution for booking

timeresolutionfromschedulestart

Boolean

<timeresolutionfromschedulestart>false</timeresolutionfromschedulestart>

If the suggested time should be calculated from the beginning of the resource's schedule or from the end of the previous booking.

start

Tidpunkt

<start>2012-11-19 20:00</start>

The start of the selected interval

end

Tidpunkt

<end>2012-12-01 21:00</end>

The end of the selected interval

resources

 

<resources>

 

resource

 

<resource>

Encloses the suggested times for a specific resource

id

ID

<id>3</id>

Resource ID

name

Sträng

<name>Room 3</name>

Naem of resource

resourcerequirementid

ID

<resourcerequirementid>508</resourcerequirementid>

The products resource requirement that is fullfilled by the resource

times

 

<times>

Encloses the suggested times

time

 

<time>

Represents a particular suggested time

start

Tidpunkt

<start><timepoint><timestamp>1332442800</timestamp><datetime>2012-03-22 20:00</datetime><date>2012-03-22</date><time>20:00</time></timepoint></start>

Start time

endTidpunkt<end><timepoint><timestamp>1332442800</timestamp><datetime>2012-03-22 21:00</datetime><date>2012-03-22</date><time>21:00</time></timepoint></end>End time. Only displayed if the specified product has a predefined length.

connectedresource

 

<connectedresource><id>70</id><name>Anders Eriksson</name></connectedresource>

Other resources that the suggested time requires. Is null if not applicable.

priceincvat <priceincvat>12500</priceincvat> 
priceexvat <priceexvat>10000</priceexvat> 
<timeslotssuggestions>
  <product>
    <id>47</id>
    <name>Massage 60 min</name>
    <timeresolution>01:00</timeresolution/>
    <timeresolutionfromschedulestart>false</timeresolutionfromschedulestart>
  </product>
  <start>2012-04-17 19:40</start>
  <end>2012-04-18 07:15</end>
  <resources>
    <resource>
      <id>3</id>
      <name>Room 3</name>
      <resourcerequirementid>508</resourcerequirementid>
      <times>
        <time>
          <start>
            <timepoint>
              <timestamp>1332442800</timestamp>
              <datetime>2012-03-22 20:00</datetime>
              <date>2012-03-22</date>
              <time>20:00</time>
            </timepoint>
          </start>
		  <end>
            <timepoint>
              <timestamp>1332442800</timestamp>
              <datetime>2012-03-22 21:00</datetime>
              <date>2012-03-22</date>
              <time>21:00</time>
            </timepoint>
          </end>
	      <priceincvat>12500</priceincvat>
		  <priceexvat>10000</priceexvat>
          <connectedresource>
            <id>70</id>
            <name>Anders Eriksson</name>
          </connectedresource>
        </time>
        <time>
        ...
        </time>
      </times>
    </resource>
    ...
    <resource>
      <id>2</id>
      <name>Henrik</name>
      <resourcerequirementid>15</resourcerequirementid>
      <times>
        <time>
          <start>
            <timepoint>
              <timestamp>1332442800</timestamp>
              <datetime>2012-03-22 20:00</datetime>
              <date>2012-03-22</date>
              <time>20:00</time>
            </timepoint>
          </start>
		  <end>
            <timepoint>
              <timestamp>1332442800</timestamp>
              <datetime>2012-03-22 21:00</datetime>
              <date>2012-03-22</date>
              <time>21:00</time>
            </timepoint>
          </end>
          <connectedresource/>
        </time>
        <time>
        ...
        </time>
      </times>
    </resource>
  </resources>
</timeslotssuggestions>
  • No labels