Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Implemented in version 25.585

List prices

Lists prices for specified product. For packages the price is listed individually per item. Resources are not used. When possible, consider using API3 instead, which has better support for calculating prices for an individual customer.

Call

HTTP GET to /prices

Filter

Name

Required

Example value

Description

Value / Data type

Default

productidYesproductid=14RequiredID-

businessunitids

No

businessunitids=1,2,3

Only prices for specified business units

ID-list

All

pricelistidNopricelistid=3Only for people with specified price list. When pricelistid=0 the default price will be
returnd
returned. Note that when setting pricelist, only that pricelist and the product's package pricelist is used. This may or may not include the default pricelist, which might be required to check with an additional request.
IDAll price lists
dateYes/No (see description)date=2014-11-13The prices valid for the specified date. If the date is specified the time must also be specified.DateToday
timeYes/No (see description)time=12:00The prices valid for the specified time. If the time is specfied the date must also be specified.TimeNow

 


Example:

Code Block
GET:APIURL/prices.xml?apikey=338934897438&productid=14&date=2014-11-13&time=12:00

Responses for alla product types except packages

Tag

Format

Example

Description

prices
  


The prices tag encloses the prices.
price
 
 


Represents a price.
pricelistidID
<pricelistid>7</pricelistid>
The price is valid for persons with specified price list.
businessunitidID
<businessunitid>1</businessunitid>
The price is valid for this business unit.
priceincvatInteger
<priceincvat>25000</priceincvat>
Price including VAT
.
in cents
priceexvatInteger
<priceexvat>20000</priceexvat>
Price excluding VAT in cents.
starttimeTime
 

Time from when the price is valid.
endtimeTime
 

Time from when the price no longer is valid.
forinternetBoolean
<forinternet>true</forinternet>

The price is only valid for Internet bookings

schedule
 

<schedule><id>3</id><name>after lunch</name></schedule>
Represents a schedule. The price is only valid during certain times throughout the day.


Code Block
languagexml
<prices>
	<price>
		<pricelistid>7</pricelistid>			
		<businessunitid>134</businessunitid>
		<priceincvat>25000</priceincvat>
		<priceexvat>20000</priceexvat>
		<schedule>
			<id>3</id>
			<name>efter<name>after lunch</name>
		</schedule>
		<starttime>
			<timepoint>
        		<timestamp>1102082400</timestamp>
        		<datetime>2012-05-18 12:00</datetime>
        		<date>2012-05-18</date>
        		<time>12:00</time>
      		</timepoint>
		</starttime>
		<endtime>
			<timepoint>
        		<timestamp>1102082400</timestamp>
        		<datetime>2012-06-18 12:00</datetime>
        		<date>2012-06-18</date>
        		<time>12:00</time>
      		</timepoint>
		</endtime>
		<forinternet>true</forinternet>
	</price>
	<price>
		<pricelistid>8</pricelistid>			
		<businessunitid>134</businessunitid>
		<priceincvat>25000</priceincvat>
		<priceexvat>20000</priceexvat>
		<starttime>
			<timepoint>
        		<timestamp>1102082400</timestamp>
        		<datetime>2007-01-01 00:00</datetime>
        		<date>2007-01-01</date>
        		<time>00:00</time>
      		</timepoint>
		</starttime>
		<starttime><timepoint><date>2007-01-01</date><time>00:00</time></timepoint></starttime>
		<forinternet>true</forinternet>
	</price>
	
	<price>	
		<businessunitid>134</businessunitid>
		<priceincvat>25000</priceincvat>
		<priceexvat>20000</priceexvat>
		<forinternet>true</forinternet>		
	</price>
</prices>

...

Responses if product type is package

Tag

Exempel

Example

Format

Förklaring

Description

packageparts<packageparts>
 

Lista
av paketdelar
individual items

packagepart

<packagepart>

 

Part of package
Paketdel

productid

<id>2</id>

 Id
Produktens id
Product ID

productname

<name>Lager

<name>Package 1</name>

Sträng

Produktens namn

Product name

perpackage<perpackage>true</perpackage>Boolean
En per antal eller en för hela bokningen
One item for each or one item for the entire booking. *
day<day>1</day>Nummer
Vilken dag paketdelen infaller på
The specified day that the individual item is scheduled on (1 =
startdagen
start day)
relativetime<relativetime>01:00</relativetime>Tid
Relativ startid utifrån paketets start
Relative start time form the start of the package **
fixedtime<fixedtime>14:00</fixedtime>Tid
Fast tid för paketdelen
Fixed time for the individual item **
pricesse ovan
 prices-taggen omsluter priser. Som ovanstående för icke-paket-produkter

* Om true så ska det vara lika många av paketdelen som av paketet annars endast 1 för hela paketet.

...


The prices tag encloses the actual price. As per above for non package product types.

* If set to true there must be as many individual items as there are packages. If false only one item is used irregardless of number of packages. (i.e. one conference room is booked but 15 mugs of coffee)

** Only one of these may be set.

Code Block
languagexml
<packageparts>
	<packagepart>
		<productid>32</productid>
		<productname>Massage</productname>
		<perpackage>true</perpackage>
		<day>1</day>
		<relativetime>00:00</relativetime>
		<fixedtime></fixedtime>
		<prices>
			<price>
				<priceincvat>425,00</priceincvat>
				<priceexvat>340,00</priceexvat>
				<forinternet>true</forinternet>
				<pricelistid>1</pricelistid>
				<starttime><timepoint><timestamp>1167606000</timestamp><datetime>2007-01-01 00:00</datetime><date>2007-01-01</date><time>00:00</time></timepoint></starttime>
			</price>
		</prices>
	</packagepart>


	<packagepart>
		<productid>32</productid>
		<productname>Massage</productname>
		<perpackage>true</perpackage>
		<day>1</day>
		<relativetime>01:00</relativetime>
		<fixedtime></fixedtime>
		<prices>
			<price>
				<priceincvat>425,00</priceincvat>
				<priceexvat>340,00</priceexvat>
				<forinternet>true</forinternet>
				<pricelistid>1</pricelistid>
				<starttime><timepoint><timestamp>1167606000</timestamp><datetime>2007-01-01 00:00</datetime><date>2007-01-01</date><time>00:00</time></timepoint></starttime>
			</price>
		</prices>
	</packagepart>
</packageparts>

 

...