bookingtimesuggestions

List available times

Retrieves a list of suggested times that a resource may be booked. All suggestions must be within the 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.

Notice that only future times will be suggested. For example: If you set startdate to todays date and starttime to 05:00 and the call is made 07:00, times before 07:00 on todays date will not be suggested.

This command replaces the deprecated timeslotsuggestions command.

Request

HTTP GET /bookingtimesuggestions

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

 

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. If startdate is set to before today, todays date will be used instead.

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. All suggestions will end before this timepoint.

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/bookingtimesuggestions.xml?apikey=338934897438&productid=23&businessunitid=2&resourceids=3,66

Response

Tag

Format

Example

Description

bookingtimesuggestions

 

<bookingtimesuggestions>

bookingtimesuggestions-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

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

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.
resourcerequirements <resourcerequirements>List of resource requirements and their possible resource selections
resourcerequirement <resourcereqirement>A resource reqirement
idID<id>9</id>ID of the resource requirement
startTidpunkt<start>
<timepoint>
<timestamp>1423465200</timestamp>
<datetime>2015-02-09 08:00</datetime>
<date>2015-02-09</date>
<time>08:00</time>
</timepoint>
</start>
The start time of the part of the booking (resource allocation) that the current resource requirement is responsible for. Note that this time can be different from the start time of the booking.
endTidpunkt<end>
<timepoint>
<timestamp>1423468800</timestamp>
<datetime>2015-02-09 09:00</datetime>
<date>2015-02-09</date>
<time>09:00</time>
</timepoint>
</end>
The end time of the part of the booking (resource allocation) that the current resource requirement is responsible for. Note that this time can be different from the end time of the booking.
 resources

 

<resources>

 List of available resource options for the current resource requirement at the specific time

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

<bookingtimesuggestions>
	<product>
		<id>34</id>
		<name>Lokal</name>
		<timeresolution>00:05</timeresolution>
	</product>
	<start>2015-02-09 08:00</start>
	<end>2015-02-11 00:00</end>
	<times>
		<time>
			<start>
				<timepoint>
					<timestamp>1423465200</timestamp>
					<datetime>2015-02-09 08:00</datetime>
					<date>2015-02-09</date>
					<time>08:00</time>
				</timepoint>
			</start>
			<end>
				<timepoint>
					<timestamp>1423468800</timestamp>
					<datetime>2015-02-09 09:00</datetime>
					<date>2015-02-09</date>
					<time>09:00</time>
				</timepoint>
			</end>
			<resourcerequirements>
				<resourcerequirement>
					<id>9</id>
					<start>
						<timepoint>
							<timestamp>1423465200</timestamp>
							<datetime>2015-02-09 08:00</datetime>
							<date>2015-02-09</date>
							<time>08:00</time>
						</timepoint>
					</start>
					<end>
						<timepoint>
							<timestamp>1423468800</timestamp>
							<datetime>2015-02-09 09:00</datetime>
							<date>2015-02-09</date>
							<time>09:00</time>
						</timepoint>
					</end>
					<resources>
						<resource>
							<id>3</id>
							<name>Lokal1</name>
						</resource>
					</resources>
				</resourcerequirement>
			</resourcerequirements>
		</time>
		<time>
			<start>
				<timepoint>
					<timestamp>1423465500</timestamp>
					<datetime>2015-02-09 08:05</datetime>
					<date>2015-02-09</date>
					<time>08:05</time>
				</timepoint>
			</start>
			<end>
				<timepoint>
					<timestamp>1423469100</timestamp>
					<datetime>2015-02-09 09:05</datetime>
					<date>2015-02-09</date>
					<time>09:05</time>
				</timepoint>
			</end>
			<resourcerequirements>
				<resourcerequirement>
					<id>9</id>
					<start>
						<timepoint>
							<timestamp>1423465500</timestamp>
							<datetime>2015-02-09 08:05</datetime>
							<date>2015-02-09</date>
							<time>08:05</time>
						</timepoint>
					</start>
					<end>
						<timepoint>
							<timestamp>1423469100</timestamp>
							<datetime>2015-02-09 09:05</datetime>
							<date>2015-02-09</date>
							<time>09:05</time>
						</timepoint>
					</end>
					<resources>
						<resource>
							<id>3</id>
							<name>Lokal1</name>
						</resource>
					</resources>
				</resourcerequirement>
			</resourcerequirements>
		</time>...</times>
</bookingtimesuggestions>