# IQ API Documentation
## **API BASE URL**
https://ole.iq2u.net/API/
## **AUTHENTICATION**
?key=[API-KEY]
#
Example:
https://ole.iq2u.net/API/GetCamps/?key=2A!wGvhrVA!W47-aFx-
EDQixywhCtM@LAfYJN8BmaU4Zc934oaZmjRY!wvo8FD7dpVHfu9J.VcpzVLrdLDpomomfWBwNHvj3PrU
## **METHODS**
>1. GetCamps
>2. GetLocations
>3. GetSubcamps
### 1. GetCamps
Fetch Camp Dates
https://ole.iq2u.net/API/GetCamps/
Fetches all camp dates
#### Result
```json
{
"Camps": [
{
"CampName": "",
"OskarId": "C21HAXX01",
"Year": 2021,
"Season": "Summer",
"WeekNo": 1,
"Start": "2021-06-07T00:00:00",
"End": "2021-06-13T00:00:00",
"Price": 250.0,
"Discount": {
"Title": "Geschwisterabatt",
"Price": 25.0
}
},
{
"CampName": "",
[...]
}
]
}
```
#### Arguments
**year**
Fetch all Dates of a defined year
<span style="color:green;">Optional</span> (if not specified the current year will be used)
`https://ole.iq2u.net/API/GetCamps/?year=2021`
**id**
Fetch all Dates of a defined subcamp
<span style="color:green;">Optional</span> (if not specified all camps will be returned)
`https://ole.iq2u.net/API/GetCamps/?id=C21HAXX01`
**location**
Fetch all Dates of a defined location
<span style="color:green;">Optional</span> (if not specified dates of all locations will be returned)
`https://ole.iq2u.net/API/GetCamps/?location=Schloss%20Boitzenburg`
### 2. GetLocations
https://ole.iq2u.net/API/GetLocations/
Fetches all locations
#### Result
```json
{
"Locations": [
{
"Name": "Burg Rieneck",
"OskarId": "LOC-ID",
"Region": "Bayern",
[fields have to be defined]
},
[...]
]
}
```
### 3. GetSubcamps
https://ole.iq2u.net/API/GetSubcamps/
Fetches all subcamps
#### Result
```json=
{
"subCamps": [
{
"Name": "FilmCamp Burg Rieneck",
"OskarId": "CAMP-ID",
"Location": "LOC-ID"
},
]
}
```
___
## **BOOKING**
Send booking to IQ and receive a validated response.
https://ole.iq2u.net/API/Booking/
**The booking process:**
1. The user collects camps in his/ her shopping cart
2. On the checkout page, the user enters his/ her personal, payment and insurance information and adds the travel and participants information.
3. By clicking on "continue" the [booking information will be send to IQ](#Data-sent-to-be-validated-by-IQ).
```https://ole.iq2u.net/API/Booking/validate/```
4. IQ responds with a validation state (success || error) and a validated response, which contains the [complete summary of the booking](#Validated-response-from-IQ).
5. By clicking on "Book Now" the form will finally send the booking to IQ
```https://ole.iq2u.net/API/Booking/complete/```
#### Data sent to be validated by IQ
[](https://cloud.seitenmacher.media/index.php/s/j67j44WcPCBRr9E)
```json=
{
"booking": {
"customer": {
"firstName": "Wolfgang",
"lastName": "Beims",
"birthDate": "1976-07-12",
"street": "Lauterstraße",
"streetnumber": "21",
"zipcode": "12159",
"addressLine2": "",
"city": "Berlin",
"country": "DE",
"type": "[parent,family,...???]",
"email": "w.beims@oskar-lernt-englisch.de",
"phone": "030-33937940",
"mobile": "0178-9509108"
},
"payment": {
"accountHolder": "Wolfgang Beims",
"iban": "DE09500105172407868623"
},
"camps": [
{
"campId": "C20ALF01",
"name": "FilmCamp Schloss Boitzenburg",
"arrival": "2022-04-09",
"departure": "2022-04-15",
"collectionTransfer": {
"name": "Berlin",
"one-way": "no"
},
"insurance": {
"id": "1",
"name": "Reiserücktrittkostenversicherung"
},
"participants": [
{
"firstName": "Max",
"lastName": "Beims",
"birthDate": "2011-07-12",
"gender": "m",
"sibling": "no"
},
{
"firstName": "Maxime",
"lastName": "Beims",
"birthDate": "2014-07-12",
"gender": "f",
"sibling": "yes"
},
{...more participants... }
]
},
{
"campId": "C20AGL02",
"name": "Reitcamp Born",
"arrival": "2022-04-09",
"departure": "2022-04-15",
"collectionTransfer": "no",
"insurance": {
"id": "2",
"name": "Reiserücktrittkosten- und Reiseabbruchversicherung"
},
"participants": [
{
"firstName": "Hugo",
"lastName": "Montoya",
"birthDate": "20011-07-12",
"gender": "m",
"sibling": "no"
},
{
"firstName": "Felix",
"lastName": "Bergles",
"birthDate": "2009-08-19",
"gender": "m",
"sibling": "no",
}
{...more participants... }
]
},
{...more camps... }
]
}
}
```
#### Validated response from IQ
[](https://cloud.seitenmacher.media/index.php/s/cAQs3rsbZCgfBMd)
```json=
{
"booking": {
"customer": {
"firstName": "Wolfgang",
"lastName": "Beims",
"birthDate": "1976-07-12",
"street": "Lauterstraße",
"streetnumber": "21",
"zipcode": "12159",
"addressLine2": "",
"city": "Berlin",
"country": "DE",
"type": "[parent,family,...???]",
"email": "w.beims@oskar-lernt-englisch.de",
"phone": "030-33937940",
"mobile": "0178-9509108"
},
"payment": {
"accountHolder": "Wolfgang Beims",
"iban": "DE09500105172407868623"
},
"priceTotal": "2154.80",
"camps": [
{
"campId": "C20ALF01",
"arrival": "2022-04-09",
"departure": "2022-04-15",
"collectionTransfer": {
"name": "Berlin",
"price": "59.00"
},
"price": "599.00",
"priceTotal": "1350.80",
"participants": [
{
"firstName": "Max",
"lastName": "Beims",
"birthDate": "2011-07-12",
"gender": "m",
"sibling": "no",
"price": "687.90",
"discount": "no",
"insurance": {
"id": "1",
"name": "Reiserücktrittkostenversicherung",
"price": "29.90"
},
},
{
"firstName": "Maxime",
"lastName": "Beims",
"birthDate": "20014-07-12",
"gender": "f",
"sibling": "yes",
"price": "662.90",
"discount": {
"name": "Geschwisterrabatt",
"price": "25.00"
},
"insurance": {
"id": "1",
"name": "Reiserücktrittkostenversicherung",
"price": "29.90"
},
}
]
},
{
"campId": "C20AGL02",
"arrival": "2022-04-09",
"departure": "2022-04-15",
"collectionTransfer": "no",
"price": "399.00",
"priceTotal": "857.80",
"participants": [
{
"firstName": "Max",
"lastName": "Beims",
"birthDate": "20011-07-12",
"gender": "m",
"sibling": "no",
"price": "428.90",
"discount": "no",
"insurance": {
"id": "1",
"name": "Reiserücktrittkostenversicherung",
"price": "29.90"
},
},
{
"firstName": "Felix",
"lastName": "Bergles",
"birthDate": "2009-08-19",
"gender": "m",
"sibling": "no",
"price": "428.90",
"discount": "no",
"insurance": {
"id": "1",
"name": "Reiserücktrittkostenversicherung",
"price": "29.90"
},
}
]
}
]
}
}
```