Documentatie

GET object/search

Gebruikt voor

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.

Authenticatie

Geen authenticatie vereist, publieke informatie.

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

*Voorbeeld parameter 'params':

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

De url moet encoded zijn. Dat betekent dat de lijst met params er zo uit kan komen te zien:

 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}]

Expansie

Geen expansie

Response codes

  • 200 OK
  • 412 Precondition failed
  • 404 Not found

Voorbeeld

Zoeken naar Object 1 met over meerdere dagen met nederlandse beschijvingen.

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"
    }],