Documentatie

GET object/search

Verwendet für

Search for available objects and returns slots.
The method is accepting both time mode objects as well as day mode objects, but not in one request. If multiple modes are needed, then split the request in two parts.

Authentifizierung

Keine Authentifizierung erforderlich, öffentliche Informationen.

Parameters

Parameter Description Required Default Example
ids IDs of the object, comma seperated Yes ?ids=1,2
lang Language No dutch &lang=english
DateFrom Start date No Today &DateFrom=2020-09-01
DateTill End date No Today &DateTill=2020-09-01
params Additional criteria, in JSON format No *see example directly beneath this table

*Beispiel Parameter 'params':

 params=[
  {
    "name": "region",
    "value": "zuidwest",
    "country_id": "73",
    "type": "hard"
  },
  {
    "name": "chk_custom29",
    "value": true,
    "type": "soft",
    "weight": "9"
  }
]

Die URL muss codiert sein. Das bedeutet, dass die Liste der Parameter so aussehen kann:

 params=[{%22name%22:%22region%22,%22value%22:%22zuidwest%22,%22country_id%22:%2273%22,%22type%22:%22hard%22},{%22name%22:%22chk_custom29%22,%22value%22:true,%22type%22:%22soft%22,%22weight%22:%229%22}]

Erweiterung

Keine Erweiterung

Response codes

  • 200 OK
  • 412 Precondition failed
  • 404 Not found

Beispiel

Suche nach Objekt 1 über mehrere Tage mit niederländischen Beschreibungen.

GET api/rest/object/search?ids=1&lang=dutch&DateFrom=2020-04-25&DateTill=2020-04-30
Response:
[{
  "id": 1,
  "desc": "Workshop",
  "long_desc": "Workshop i-Reserve",
  "slots": {
    "2020-04-27 00:00:00": [{
      "dayrequest": "",
      "request": "R",
      "Request": "R",
      "DateFrom": "2020-04-27 09:00:00",
      "DateTill": "2020-04-27 12:00:00",
      "Free": 1,
      "Booked": 0,
      "dayBooked": 0,
      "Price": 370,
      "Currency": "EUR"
    }, {
      "dayrequest": "",
      "request": "R",
      "Request": "R",
      "DateFrom": "2020-04-27 13:00:00",
      "DateTill": "2020-04-27 16:00:00",
      "Free": 1,
      "Booked": 0,
      "dayBooked": 0,
      "Price": 370,
      "Currency": "EUR"
    }],
    "2020-04-28 00:00:00": [{
      "dayrequest": "",
      "request": "O",
      "Request": "O",
      "DateFrom": "2020-04-28 09:00:00",
      "DateTill": "2020-04-28 12:00:00",
      "Free": 1,
      "Booked": 0,
      "dayBooked": 0,
      "Price": 370,
      "Currency": "EUR"
    }, {
      "dayrequest": "",
      "request": "O",
      "Request": "O",
      "DateFrom": "2020-04-28 13:00:00",
      "DateTill": "2020-04-28 16:00:00",
      "Free": 1,
      "Booked": 0,
      "dayBooked": 0,
      "Price": 370,
      "Currency": "EUR"
    }],