Versions Compared

Key

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

Infört från och med version 25.585

Lista priser

Listar priser för angiven produkt. Vid produkter av typ paket så listas delarnas priser individuellt. Resurser tas ej i beaktande.

Anrop

...

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

namn

Name

obligatorisk
Required
exempelvärde

Example value

förklaring

Description

Värdemängd

Value /

Datatyp

Data type

Default

productid
ja
Yesproductid=14
obligatorisk
RequiredID-

businessunitids

nej
No

businessunitids=1,2,3

endast priser som gäller för dessa anläggningar

Only prices for specified business units

ID-

lista

list

Alla

All

pricelistid
nejdateja/nej (se förklaring
Nopricelistid=3
enbart för personer som har denna prislista. Om pricelistid=0 så erhålls enbart standardpriset i svaret.IDAlla prislistorja/nej (se förklaring
Only for people with specified price list. When pricelistid=0 the default price will be 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-13
priser som gäller denna dag. Om date anges så måste även time anges.DatumIdagtime
The prices valid for the specified date. If the date is specified the time must also be specified.DateToday
timeYes/No (see description)time=12:00
priser som gäller denna tid. Om time anges så måste även date anges.TidNu

 

...

The 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

Exempel

Example

Förklaring

Description

prices
  prices-taggen omsluter priser


The prices tag encloses the prices.
price
  representerar ett pris


Represents a price.
pricelistidID
<pricelistid>7</pricelistid>
priset avser personer med denna prislista
The price is valid for persons with specified price list.
businessunitidID
<businessunitid>1</businessunitid>
priset gäller för denna anläggning
The price is valid for this business unit.
priceincvat
Nummer
Integer
<priceincvat>25000</priceincvat>
belopp inkl moms
Price including VAT in cents
priceexvat
Nummer
Integer
<priceexvat>20000</priceexvat>
belopp exkl moms
Price excluding VAT in cents.
starttime
Tidpunkt tidpunkt då priset är giltigt frånendtimeTidpunkt tidpunkt då priset är giltigt till
Time
Time from when the price is valid.
endtimeTime
Time from when the price no longer is valid.
forinternetBoolean
<forinternet>true</forinternet>
priset gäller endast internetbokningar

The price is only valid for Internet bookings

schedule
 

<schedule><id>3</
id><name>efter
id><name>after lunch</name></schedule>
Representerar ett schema. Priset gäller vissa tider på dagen
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.

** Endast en av dessa är satta.

...


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>

 

...