Versions Compared

Key

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




Lista produkter

Listar produkt

...

List products

Lists products

Request

HTTP GET till to /products

Filter

namn

Name

exempelvärde

Value

förklaring

Värdemängd/Datatyp

Description

Data type

Default

businessunitids

businessunitids=4,54

Endast produkter på dessa anläggningar

Only products for specified business unit/facility

ID-

lista

list

Alla

producttype

producttype=groupActivity

Endast produkter av denna produkttyp

Produkttyp

 

Only products of specified product type

Product type


bookablefrominternet

bookablefrominternet=true

Endast produkter markerade som "Bokbar via Internet". Detta betyder även att produkten finns för försäljning på webben (abonnemang, vara, värdekort, tjänst, arrangemang)

Boolean

 

 

Only products available on the Internet. Have setting "Internet" activated.

Boolean


productlabel

productlabel=cafe

Filtrerar på produktetikett

Sträng

Filter using product lable. If the specified label is not found no resultst will be returned.

String


numbernumber=234Filter by product numberString

groupid

groupid=2

Filtrerar ut produkter som tillhör angiven produktgrupp

Filter products by product group.

ID

 


stockidstockid=2
Om angivet inkluderas lagerbalansen för angivet lagerställe på produkter av typen lagervara.ID 

...

If specified the amount in stock for the specified wharehouse location will be included. Valid only for stock items.ID
includeOnlyUsedAsPackagePartsincludeOnlyUsedAsPackageParts=trueIncludes products that may only be booked as part of a package deal. Is ignored when listing individual products by ID.Booleanfalse
includeassociatedbusinessunitsincludeassociatedbusinessunits=trueIncludes information about all businessunits that has the product.
NOTE: Default true due to backward compability. Set to false if the information is not used, since the response-size can be very large otherwise.
Booleantrue
languagelanguage=enIf supplied only returns the translations in the specific language for translatable fields (2 letter, ISO 639-1 language code)

Example:

Code Block
GET:APIURL/products.xml?apikey=338934897438&producttype=groupActivity

...

Response

Tag

Exempel

Example

Format

Förklaring

Description

description

<description>Produktbeskrivning<

<description>Product description</description>

Sträng

Beskrivning

String

Description

descriptiontranslations

See example at bottom


List of available translations with their respectinve language codes

name

<name>Spinn B45<

<name>Water bottle</name>

Sträng

Produktens namn

String

The name of the product

nametranslationsSee example at bottom
List of available translations with their respectinve language codes
number<number>23</number>
Nummer
Number
Produktnummer
Product number

lastupdate

<lastupdate>2013

<lastupdate>2014-11-19 12:42</lastupdate>

Tidpunkt

När produkten sparades senast

Time

When the product was last modified

businessunits(se businessunitsblock)
 Lista på de anläggningar som har produkten kopplad

A list of the business units/facilites the product is available for.

bookablefrominternet

<bookablefrominternet>true</bookablefrominternet>

Boolean

Bokbar via Internet

Activated for internet usage

productlabels

<productlabels>

 

Etikettlista


Product label

productlabel

<productlabel><id>3</

id><name>Spinning<

id><name>Bottles</name></productlabel>

 

Produktetikett


Product lable

standardprice<standardprice>
 Ej anläggningsspecifikt standardpris. Om standardpris saknas kommer priserna nedan vara 0

Standard price. If there is not standard price set the price will be 0.
priceincvat<priceincvat>20000</priceincvat>
NummerPris inklusive moms uttryckt i Pris exklusive moms uttryckt i
NumberPrice including VAT expressed in cents/ören
priceexvat<priceexvat>16000</priceexvat>
Nummer
NumberPrice excluding VAT expressed in cents/ören

cssclass

<cssclass>blue</cssclass>

 

 

group

<group><id>3</id><name>Gruppträning</name></group>

 

Produktgrupp

producttype

<producttype>service</producttype>

 

Produkttyp



group

<group><id>3</id><name>Reception</name>
<nametranslations>
<nametranslation>
<language>sv</language>
<translation>Conference</translation>
</nametranslation>
</nametranslations>
</group>


Product group

producttype

<producttype>Article</producttype>


Product type

stock<stock><id>2</id><name>L1</name><balance>3</balance></stock>
 

Inventory
Lagerbalans

Tag

Exempel

Format

Förklaring
onlyUseAsPackagePart
signupfeeproduct<signupfeeproduct><id>4</id><name>Inskrivningsavgift 2014</name></signupfeeproduct> Inskrivningsavgift

Produkttyper

NamnFörklaring
groupActivityGruppaktivitetsprodukt
subscriptionAbonnemangsprodukt (som abonnemang baseras på)
package

Paketprodukt

articleVara
serviceTjänst
eventArrangemang
stockProductLagervara
valueCardVärdekort
entryEntré

 

Fält som tillkommer i svaret om produkten är en tjänst

<onlyUseAsPackagePart>false</onlyUseAsPackagePart>BooleanThe product may only be booked as part of a package dealProdukttyper


NameDescription
groupActivityProduct for classes / group activities
subscriptionMembership product (subscription)
package

Package deals

articleArticle
serviceService
eventEvent
stockProductStock article
valueCardValue card
entryEntry

Fields that are included int he response if the product is a service

Tag

Example

Format

Description

timeresolution

<timeresolution>00:15</timeresolution>

 

Upplösning av tidsförslag


Increment for suggested times

timeresolutionfromschedulestart

<timeresolutionfromschedulestart>false</timeresolutionfromschedulestart>

Boolean

Om tidsförslagen ska räknas från början på schemat eller från slutet av tidigare bokning

If the suggested times are to calculated from the beginning of a schedule or from the end of the previous booking.

resourcerequirements

<resourcerequirements>

 

Lista med resurskrav när produkten är en tjänst


Lists the resource requirements.

resourcerequirement

<resourcerequirement><id>44</id><type>Lokal</type><resourcerequirement>

 

Resurskrav

...


Resource requirements

Fields that are included int he response if the product is a value card

Tag

Exempel

Example

Format

Förklaring

Tag

Exempel

Format

Förklaring

Description

isvaluecardproducttype

<isvaluecardproducttype>true</isvaluecardproducttype>

 Boolean

Om värdekort baserad på denna produkt blir klippkort

 

Fält som tillkommer i svaret om produkten är ett abonnemang

If the value card based on this product is a discount card

Fields that are included in the response if the product is a membership/subscription

Tag

Example

Format

Description

requiresautogiro

<requiresautogiro>true</requiresautogiro>

 Boolean

Om abonnemanget kräver autogiro

Boolean

If the membership requires Autogiro

requiresrecurringcardpayment<requiresrecurringcardpayment>false</requiresrecurringcardpayment>BooleanIf the membership requires recurring card payments
requiresmembership<requiresmembership>true</requiresmembership>Boolean
Kräver medlemskap
Requires a specific membership subscription.
givesmembership<givesmembership>true</givesmembership>Boolean
Ger medlemskap

Fält som tillkommer i svaret om produkten har ett anläggnings pris

Tag

Exempel

Format

Förklaring
Entitles membership
signupfeeproduct<signupfeeproduct><id>4</id><name>Registration fee</name></signupfeeproduct>
Product for sign-up fee
campaign<campaign><campaignstart>....</campaign>
Encloses campaign info (if the product is not configured for a campaign the contents are empty.
campaignstart<campaignstart>2014-10-01</campaignstart>DateDate for campaign start
campaignend<campaignend>2014-12-31</campaignend>DateDate for campaign end
campaignprice<campaignprice>19900</campaignprice>IntegerThe price during the campaign
campaignpriceend<campaignpriceend>2015-01-31</campaignpriceend>DateThe date the membership becomes regular priced.
campaignpricemonths<campaignpricemonths>3</campaignpricemonths>IntegerThe number of months from start until the price of the membership reverts to the standard price.
campaignnewproduct<campaignnewproduct><id>45</id><name>Monthly training membership</name></campaignnewproduct>
The product that the membership is tranferred to after the contract period expires.
subscriptionlength<subscriptionlength><unit>MONTH</unit><value>12</value></subscriptionlength>
The subscription length of the product.
"unit" can have value "MONTH" or "DAY"

Fields that are included in the response if the product has a price pertaining to a specific business unit/facility.

Tag

Example

Data type

Description

prices

<prices />

 Lista anläggningsp riser

List prices for the specific business unit/facility

price

<price>

 Anläggnings pris

Business unit/facility price

businessunitid

<businessunitid>134</businessunitid>

Id

Id på anläggningen

ID

Business unit/facility ID

priceincvat

<priceincvat>25000</priceincvat>

NummerPris inklusive moms uttryckt i ören
IntegerPrice including VAT in cents (ören)
priceexvat

<priceexvat>20000</priceexvat>

NummerPris exklusive moms uttryckt i ören

Fält som tillkommer i svaret om produkten är av typen lagervara och parametern "stockid" är angiven

Tag

Exempel

Format

Förklaring
IntegerPrice excluding VAT in cents (ören)

Fields that are included in the response if the product type is stock article and the "stockid" parameter is specified.

Tag

Example

Data type

Description

stock

<stock>

 Lagerbalans

Stock level

id

<id>2</id>

 IdLagerställets id
IDID of the storage facility

name

<name>Lager 1<

<name>Warehouse 13</name>

Sträng

Lagerställets namn

String

Name of the storage facility

balance

<balance>42</balance>

NummerAntal enheter i det aktuella lagerstället
IntegerNumber of units in the specified storage facility
businessunitid

<businessunitid>134</businessunitid>

IdId på anläggningen

ID

Business unit/facility ID

Fields that are included in the response if the product type is a package

Tag

Example

Data type

Description

packageparts<packageparts>
A list of the package parts

packagepart

<packagepart>


Package part

productid

<productid>2</productid>

IDProduct ID

productname

<name>Water bottle</name>

String

Product name

perpackage<perpackage>true</perpackage>BooleanOne per each package or one unit for the entire booking *
day<day>1</day>NumberThe day the package part is booked for (1 = starting day)
relativetime<relativetime>01:00</relativetime>TimeRelative start time from the start time of the package. Example: 01:00 would mean one hour after the package started. Have coffee served one hour after the conference starts.**
fixedtime<fixedtime>14:00</fixedtime>TimeFixed time for the package part. See above.**

* If set to true there should be any many units as there are packages, otherwise one for the entire booking. Example: 5 meal deals would entail five hamburgers where as 5 conference packages would still only require 1 conference room.

** Only one of these can be set.


Code Block
<product>
  <id>3</id>
  <description>Product <description>Produktbeskrivning</description>
  <name>Spinn B45</name>description</description>
  <descriptiontranslations>
	<descriptiontranslation>
		<language>sv</language>
		<translation>Produktbeskrivning</translation>
	</descriptiontranslation>
  </descriptiontranslations>
  <name>Core 45 min</name>
  <nametranslations/>
  <number>23</number>
  <lastupdate>2013-11-19 12:42</lastupdate>
  <businessunits>
    <businessunit>
      <id>1</id>
      <name>Main <name>AnläggningensStreet namn<Gym</name>
      <companyname>ACME Gym <companyname>Bolagsnamn<Company</companyname>
      <companyid>1</companyid>
    </businessunit>
  </businessunits>
  <bookablefrominternet>true</bookablefrominternet>
  <productlabels>
    <productlabel>
      <id>3</id>
      <name>Core 45 <name>Spinning<min</name>
    </productlabel>
    <productlabel>
      <id>8</id>
      <name>Mid <name>Medel<level</name>
    </productlabel>
  </productlabels>
  <standardprice>
    <priceincvat>12500</priceincvat>
    <priceexvat>10000</priceexvat>
  </standardprice>
  <prices>
    <price>
      <businessunitid>134</businessunitid>
      <priceincvat>25000</priceincvat>
      <priceexvat>20000</priceexvat>
    </price>
  </prices>
  <cssclass>blue</cssclass>
  <group>
    <id>45</id>
    <name>Gruppträning<<name>Class</name>
  </group>
  <producttype>service</producttype>
  <timeresolution>00:15</timeresolution>
  <timeresolutionfromschedulestart>false</timeresolutionfromschedulestart>
  <resourcerequirements>
    <resourcerequirement>
      <id>44</id>
      <type>Lokal<<type>Room</type>
    </resourcerequirement>
    <resourcerequirement>
      <id>45</id>
      <name>Personal<<name>Staff</type>
    </resourcerequirement>
  </resourcerequirements>
</product>

...