Versions Compared

Key

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

...

Retrieves the existing business units/facilities

Hiddenfragment macro
groupVisibilitybrponly


BRP ONLY

I swingen på Anläggning så bestäms vilka som visas i /businessunits av "Visas i API" på internetfliken.

Om man känner till anläggningsID går det bra att skicka med den i alla andra requests. "Visas i API" används främst för att bestämma vilka anläggningar apparna ska visa.


Filter

Name

Value

Description

Date type

Default

showallshowall=trueDefault only businessunits with property "showOnApi" is returned in the response. With showall=true the response contains all businessunitsBooleanfalse

companyid

companyid=4

Only business units for current company

ID

All

Request

HTTP GET /businessunits

...

Code Block
APIURL/businessunits.xml?apikey=338934897438

Response

Tag

Format

Example

Description

businessunits

 


<businessunits>

businessunit-tag encloses business units

businessunit

 


<businessunit>

Represent a business unit/facility

id

ID

<id>12</id>

Unique ID

name

String

<name>Main Street Gym</name>

Name of business unit/facility

companyidID<companyid>12</companyid>The ID of the company the busines unit is owned by.
companynameString<companyname>Acme INC.</companyname>The name of the company the business unit is owned by.
regionidID<regionid>13</regionid>The ID of the region the busines unit belongs to.
regionnameString<regionname>East</regionname>The name of the region the business unit belongs to
mailaddress
 

<mailaddress><street>Storgatan 1</street><postalcode>12345</postalcode><city>Farsta</city><country>SE</country></mailaddress>The mailaddress of the businessunit
invoiceaddress
 

<invoiceaddress><street>Storgatan 2</street><postalcode>12345</postalcode><city>Farsta</city><country>SE</country></invoiceaddress>The invoiceaddress of the businessunit
settings
 

<settings><maxnrofnoshows>3</maxnrofnoshows></settings>

Settings returned (if set, otherwise null):

maxnrofnoshows: Maximum nr of noshows before the customer gets suspended. See NoShow

releasesuspensionproduct
 

<releasesuspensionproduct><id>32</id><name>Releaseproduct</name></releasesuspensionproduct>A product which a suspended customer has to pay for in order to release the suspension. See Konfigurera varningstexter, bokningsspärr och spärrprodukt


Code Block
<businessunits>
  <businessunit>
    <id>12</id> 
    <name>Main Street Gym</name>
    <companyid>12</companyid>
    <companyname>Acme INC.</companyname> 
	<regionid>13</regionid>
    <regionname>East</regionname> 
    <mailaddress>
		<street>Storgatan 1</street>
		<postalcode>12345</postalcode>
		<city>Farsta</city>
		<country>SE</country>
	</mailaddress>
	<invoiceaddress>
		<street>Storgatan 2</street>
		<postalcode>12345</postalcode>
		<city>Farsta</city>
		<country>SE</country>
	</invoiceaddress>
    <settings>
		<maxnrofnoshows>3</maxnrofnoshows>
	</settings>
    <releasesuspensionproduct>
		<id>23</id>
		<name>Release suspension product</name>
	 </releasesuspensionproduct>
  </businessunit>
</businessunits>

...