API integration

Oprettet af Robert Holm, Ændret den Wed, 8 Nov, 2023 kl. 4:17 AM af Robert Holm

Creating an API key for your endpoint

First step is to creat an API KEY for your endpoint.

Go to Administration and the tab System. Find the modul API Keys at buttom of the page.


Create a key


Type key name and expirery date, and click create

Copy the key and add it to your endpoint

This endpoint returns a list of houses that are associated with a specific user ID. The URL for this endpoint is:

https://api.example.com/api/overview/houselist?locale=da&userId=99999&apikey=8773ce40-95fa-4174-ac87-1f07e7e16c78

Endpoint 1: Houselist

This endpoint returns a list of houses that are associated with a specific user ID. The URL for this endpoint is:

https://api.example.com/api/overview/houselist?locale=da&userId=99999&apikey=5bb73ef7-fe82-454b-9757-708f14991739

Just make sure to replace api.example.com with your actual domain name or the domain name of your API. And replace UserID with the UserID of the person with admin rights.

For testing purpose please use:

https://sport.bookhus.dk/api/overview/houselist?locale=da&userId=1861464&apikey=5bb73ef7-fe82-454b-9757-708f14991739

UserID 1861464 is user with admin rights.

The response for this endpoint will be in XML format, and it will contain an array of OverviewController.HouseListing objects. Each object represents a house and contains the following properties:

  • CompanyName: The name of the company associated with the house.
  • Domain: The domain of the company associated with the house.
  • EncryptedData: This property is currently set to nil.
  • Id: The ID of the house.
  • Name: The name of the house.

Endpoint 2: Calendar

This endpoint returns a list of booking for a specific house between two given dates. The URL for this endpoint is:

https://api.example.dk/api/calendar?houseId=3704&startdate=2023-04-27&enddate=2023-05-28&apikey=[your key]

Just make sure to replace api.example.com with your actual domain name or the domain name of your API. 

To call this endpoint, you need to replace the houseId, startdate, and enddate parameters with the actual values you want to retrieve the periods for. 

(Additionally, you will need to provide an API key to access this endpoint, which will be provided to you by the API module. )

The response for this endpoint will also be in XML format, and it will contain an array of Period objects. Each object represents a period and contains the following properties:

  • BookingId: 0
  • CompanyId: The ID of the company associated with the period.
  • Email: The email associated with the period. 
  • Enddate: The end date of the period.
  • EventName: The name of the event associated with the period. 
  • Id: The ID of the booking associated with the period. 
  • Mobilenumber: The mobile number associated with the period. 
  • OrderId: The ID of the order associated with the period.
  • PeriodDescription: The description of the period.
  • Relationship: The relationship associated with the period. 
  • Startdate: The start date of the period.
  • SysMaxDateGælderIkkeForLodtrækninger: This property is currently set to false.
  • TilladBrugerAtSeBookingerIPerioden: This property is currently set to false.
  • Type: The type of the period.
  • UserFullname: The full name of the user associated with the period. 
  • UserId: The ID of the user associated with the period.

For testing purposes please call


https://sport.bookhus.dk/api/calendar?houseId=3691&startdate=2023-04-27&enddate=2023-12-28&apikey=5bb73ef7-fe82-454b-9757-708f14991739

Var denne artikel nyttig?

Fantastisk!

Tak for din feedback

Beklager, at vi ikke var nyttige

Tak for din feedback

Fortæl os, hvordan vi kan forbedre denne artikel!

Vælg mindst én af grundene
Captcha-bekræftelse er påkrævet.

Feedback sendt

Vi sætter pris på din indsats og vil forsøge at rette artiklen