prices
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 |
---|---|---|---|---|---|
productid | Yes | productid=14 | Required | ID | - |
businessunitids | No | businessunitids=1,2,3 | Only prices for specified business units | ID-list | All |
pricelistid | No | pricelistid=3 | 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. | ID | All price lists |
date | Yes/No (see description) | date=2014-11-13 | The prices valid for the specified date. If the date is specified the time must also be specified. | Date | Today |
time | Yes/No (see description) | time=12:00 | The prices valid for the specified time. If the time is specfied the date must also be specified. | Time | Now |
Example:
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. | ||
pricelistid | ID | <pricelistid>7</pricelistid> | The price is valid for persons with specified price list. |
businessunitid | ID | <businessunitid>1</businessunitid> | The price is valid for this business unit. |
priceincvat | Integer | <priceincvat>25000</priceincvat> | Price including VAT in cents |
priceexvat | Integer | <priceexvat>20000</priceexvat> | Price excluding VAT in cents. |
starttime | Time | Time from when the price is valid. | |
endtime | Time | Time from when the price no longer is valid. | |
forinternet | Boolean | <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. |
<prices> <price> <pricelistid>7</pricelistid> <businessunitid>134</businessunitid> <priceincvat>25000</priceincvat> <priceexvat>20000</priceexvat> <schedule> <id>3</id> <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 | Example | Format | Description |
---|---|---|---|
packageparts | <packageparts> | Lista individual items | |
packagepart | <packagepart> | Part of package | |
productid | <id>2</id> | Â Id | Product ID |
productname | <name>Package 1</name> | Sträng | Product name |
perpackage | <perpackage>true</perpackage> | Boolean | One item for each or one item for the entire booking. * |
day | <day>1</day> | Nummer | The specified day that the individual item is scheduled on (1 = start day) |
relativetime | <relativetime>01:00</relativetime> | Tid | Relative start time form the start of the package ** |
fixedtime | <fixedtime>14:00</fixedtime> | Tid | Fixed time for the individual item ** |
prices | se ovan | 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.
<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>