Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Translated to English

...

Book

PassbokningBook a class, kräver requires Basic HTTP-autentiseringAuth.

...

Request

...

Parameters

namnName

obligatoriskRequired

exempelvärdeValue

förklaringDescription

VärdemängdData type

typeType

jaYes

type=ordinaryFiltrera på typ av bokning.

Filter by type of booking

ordinary, waitinglist

activityidActivityid

jaYes

activityid=34

Gruppaktivitetens idClass ID

 

ExempelExample:

Code Block
POST:APIURL/activitybookings.xml
apikey=338934897438
type=ordinary
activityid=34

Svar

...

Response

The same responses as in GET, see below

Lista bokningar tillhörande autentiserad person

Hämta bokningar tillhörande den inloggade användaren. Detta anrop kräver Basic HTTP-autentisering

Anrop

HTTP GET till /activitybookings

Filter

namnName

exempelvärdeValue

förklaring

Värdemängd/DatatypDescription

Date type

Default

type

type=ordinaryFiltrera på typ av bokning.

Filter by type of booking

ordinary eller or waitinglist

ordinary

startdate

startdate=20122015-02-02

Returnera endast bokningar som startar efter angivet datum

Datum

idagWill only return bookings that start after the specified date

Date

today

enddate

enddate=20122015-02-02

Returnera endast bokningar som startar innan angivet datum

DatumWill only return bookings that start before the specified date

Date

Om 14 dagar

ExempelExample:

Code Block
GET:APIURL/activitybookings.xml?apikey=338934897438&type=ordinary

...

Response

Tag

Format

ExempelExample

FörklaringDescription

activitybookings

 

<activitybookings>Bookings-tagen omsluter bokningar.

activitynbookings tag encloses the bookings

startdate

DatumDate

<startdate>2012<startdate>2015-12-24</startdate>

Anger vilken dag tidigaste bokningen i listan startarSpecifies the day the first booking starts

enddate

Datumdate

<enddate>2012<enddate>2015-12-24</enddate>

Anger vilken dag senaste bokningen i listan startarSpecifies the day the last booking starts

activitybooking

 

 Representerar en bokning

Represents a booking

id

ID

<id>12</id>

Unikt idUnique ID

activityid

ID

<activityid>16083</activityid>Id på den gruppaktivet som bokningen är inbokad på

The ID of the class that a booking is booked in

activity <activity># se gruppaktiviteter<see groupactivities</activity>Bokningens gruppaktivitet. För detaljer, se gruppaktiviteterThe bookings class. See classes for more details.

type

 Typ av bokning

Type of booking

businessunit

 

<businessunit><id>11</id><name>Centrum<id><name>Main Street Gym</name></businessunit>

Bokningens anläggningThe facility/business unit that owns the booking

start

TidpunktTime

<start><timepoint><timestamp>1332442800</timestamp><datetime>2012timestamp><datetime>2015-03-22 20:00</datetime><date>2012datetime><date>2015-03-22</date><time>20:00</time></timepoint></start>

Bokningens starttidStart time for the booking

end

TidpunktTime

<end><timepoint><timestamp>1332446400</timestamp><datetime>2012timestamp><datetime>2015-03-22 21:00</datetime><date>2012datetime><date>2015-03-22</date><time>21:00</time></timepoint></end>

Bokningens sluttidEnd time for the booking

resources

 

<resources>Resurser

kopplade till bokningenConnected resources

resource

 

<resource>

ResursResource

id

ID

<id>6</id>

Resursens idResource ID

name

SträngString

<name>Malin<<name>Marge Simpson</name>

Resursens namnResource name

type

SträngString

<type>Personal<<type>Staff</type>

Resursens typResource type

employee

 

<employee><id>3851</id><name>Malin Andersson<id><name>Marge Simpson</name></employee>

Personal kopplad till resursen om sådan finnsIf a staff member is connected to the resource

issubstituteBoolean

<issubstitute>true</issubstitute>

Om personalresursen är vikarie på passet
If the staff resource is a subsitute

product

 

<product>#se produkter#<<product>#see products#</product>

Bokningens produkt. För detaljer, se produkterThe product used for the booking. For more details see products.

personidIdID<personid>7567</personid>Bokningens beställares idThe ID of the booked customer
orderidIdID<orderid>555</orderid>Bokningens beställningsidThe order ID for that the booking belongs to

waitinglistsize

HeltalInteger

<waitinglistsize>3</waitinglistsize>

Hur många personer som står i kö, kölistan kan bli hur lång som helst. Den har ingen begränsningThe number of people on the waiting list, no size limit.

waitinglistpositionHeltalInteger

<waitinglistposition>2</waitinglistposition>

Min egen plats i kölistan
A specific place in the waiting list
Code Block
<activitybookings>
   <startdate>2012<startdate>2015-12-24</startdate>
   <enddate>2012<enddate>2015-12-24</enddate>
   <activitybooking>
      <id>24353</id>
      <activityid>16083</activityid>
      <activity>#se<activity>#see gruppaktiviteter#<groupactivities#</activity>
      <businessunit>
          <id>11</id>
          <name>Main Street <name>Centrum<Gym</name>
      </businessunit>
      <type>ordinary</type>
      <start>
      <timepoint>
        <timestamp>1332442800</timestamp>
        <datetime>2012<datetime>2015-03-22 20:00</datetime>
        <date>2012<date>2015-03-22</date>
        <time>20:00</time>
      </timepoint>
    </start>
    <end>
      <timepoint>
        <timestamp>1332446400</timestamp>
        <datetime>2012<datetime>2015-03-22 21:00</datetime>
        <date>2012<date>2015-03-22</date>
        <time>21:00</time>
      </timepoint>
    </end>
    <resources>
      <resource>
        <id>6</id>
        <name>Marge <name>Malin<Simpson</name>
        <type>Personal<<type>Staff</type>
        <employee>
          <id>3851</id>
          <name>Malin<name>Marge Andersson<Simpson</name>
        </employee>
		<issubstitute>true</issubstitute>
      </resource>
    </resources>
    <product>#se<product>#see produkter#<products#</product>
    <personid>7567</personid>
    <waitinglistsize>3</waitinglistsize>
    <waitinglistposition>2</waitinglistposition>
  </activitybooking>
   ...
</activitybookings>

Lista bokningar för flera personer 

Hämta bokningar för flera personer. Detta anrop kräver api-nyckel av nivå 3. Notera att svaret innehåller mindre information än vid listning för en inloggad person. 

Anrop

...

List bookings for multiple people

Retrieve bookings for several people simultaneously. This request requires API level 3. Please note that the response contains less information than a similar response for a logged on user.

Request

HTTP GET to /activitybookings

Filter

namnName

exempelvärdeValue

förklaring

Värdemängd/DatatypDescription

Data type

Default

type

type=ordinaryFiltrera på typ av bokning.

Filter by type of booking

ordinary eller or waitinglist

ordinary

startdate

startdate=20122015-02-02

Returnera endast bokningar som startar efter angivet datum. Max 14 dagar innan enddate.

Datum

idagReturns only bookings that start after a specified date. A maximum of 14 days before the end date.

Date

today

enddate

enddate=20122015-02-02

Returnera endast bokningar som startar innan angivet datum. Max 14 dagar efter startdate.

Datum

Om 14 dagarReturns only bookings that start prior to a specified date. No more than 14 days after start date.

Date

In 14 days

personidspersonids=1,2,3Returnera bokningar för dessa personerReturn bookings for the specified peopleID-listalist 

ExempelExample:

Code Block
GET:APIURL/activitybookings.xml?apikey=338934897438&type=ordinary&personids=1,2,3

...

Response

Tag

Format

ExempelExample

FörklaringDescription

activitybookings

 

<activitybookings>

Bookings -tagen omsluter bokningar.tag encloses the bookings

startdate

DatumDate

<startdate>2012<startdate>2015-12-24</startdate>Anger vilken dag tidigaste bokningen i listan startar

Specifies the date that the first booking in the list starts on

enddate

DatumDate

<enddate>2012<enddate>2015-12-24</enddate>Anger vilken dag senaste bokningen i listan startar

Specifies the date the last booking in the list starts on

activitybooking

 

 Representerar en bokning

Represents a booking

id

ID

<id>12</id>

Unikt idUnique ID

activityid

ID

<activityid>16083</activityid>Id på den gruppaktivet som bokningen är inbokad på

The ID of the class that the person is booked in

type

 Typ av bokning

Type of booking

businessunit

 

<businessunit><id>11</id><name>Centrum<id><name>Main Street Gym</name></businessunit>

Bokningens anläggningThe facility/business unit that the booking belongs to

start

TidpunktTime

<start><timepoint><timestamp>1332442800</timestamp><datetime>2012timestamp><datetime>2015-03-22 20:00</datetime><date>2012datetime><date>2015-03-22</date><time>20:00</time></timepoint></start>

Bokningens starttidThe start time of the booking

end

Tidpunkt

<end><timepoint><timestamp>1332446400</timestamp><datetime>2012timestamp><datetime>2015-03-22 21:00</datetime><date>2012datetime><date>2015-03-22</date><time>21:00</time></timepoint></end>

Bokningens sluttidThe end time of the booking

personidIdID<personid>7567</personid>Bokningens beställares idThe ID of the customer
orderidIdID<orderid>555</orderid>Bokningens beställningsidThe ID of the order that the booking belongs to

waitinglistsize

HeltalInteger

<waitinglistsize>3</waitinglistsize>

Hur många personer som står i kö, kölistan kan bli hur lång som helst. Den har ingen begränsningThe number of people on the waiting list, no size limit.

waitinglistpositionHeltal

<waitinglistposition>2</waitinglistposition>

Min egen plats i kölistan
A specific place in the waiting list
Code Block
<activitybookings>
   <startdate>2012<startdate>2015-12-24</startdate>
   <enddate>2012<enddate>2015-12-24</enddate>
   <activitybooking>
      <id>24353</id>
      <activityid>16083</activityid>
      <businessunit>
          <id>11</id>
          <name>Main Street <name>Centrum<Gym</name>
      </businessunit>
      <type>ordinary</type>
      <start>
      <timepoint>
        <timestamp>1332442800</timestamp>
        <datetime>2012<datetime>2015-03-22 20:00</datetime>
        <date>2012<date>2015-03-22</date>
        <time>20:00</time>
      </timepoint>
    </start>
    <end>
      <timepoint>
        <timestamp>1332446400</timestamp>
        <datetime>2012<datetime>2015-03-22 21:00</datetime>
        <date>2012<date>2015-03-22</date>
        <time>21:00</time>
      </timepoint>
    </end>
    <personid>7567</personid>
    <waitinglistsize>3</waitinglistsize>
    <waitinglistposition>2</waitinglistposition>
  </activitybooking>
   ...
</activitybookings>

...

Cancel

...

Request,

...

requires HTTP-

...

auth

HTTP DELETE till to /activitybookings/{id}

...

Parameters

namnName

obligatoriskRequired

exempelvärdeValue

förklaringDescription

VärdemängdData type

type

jaYes

type=ordinaryTyp av bokning som skall avbokas

The type of booking to be cancelled.

ordinary, waitinglist

ExempelExample:

Code Block
DELETE:APIURL/activitybookings/25345.xml?apikey=338934897438&type=ordinary

...

Response

HTTP 204
Tomt innehållNo content.

Sidoeffekter

...

Side effects

If the current class from which a cancellation is made has a active waiting list, customers from the waiting list will automatically be booked on the class until the class is full again, or the waiting list is empty. These customers are automatically notified by e-mail and/or SMS pending current configuration.