.. _product_availability: Products-Availability (Producten-Beschikbaarheid) ================================================= Current version: 1.0.0 Read ---- .. http:get:: /api2/producten/(int:product_id)/beschikbaarheid Get a list of start times (`startmomenten`) and availabilities (`beschikbaarheden`) per possible location for the product with id `product_id`. Only available for products with the setting `mag_api = true` (may_use_api = true). :query date eind: **Required** an ISO8601 date indicating the end (`eind`) of the date range. The specified date is inclusive. :query date begin: Default: _today_ (`vandaag`) an ISO8601 date indicating the start (`begin`) of the desired date range. The specified date is exclusive. :query boolean cache: Options: `force_on`, `force_off`. Default: `force_on`. Override the default setting for usage cache in Recras. :statuscode 200: OK :statuscode 400: Error in parameters (`Fout in de parameters`) :header Link: When a partial result is returned, a Link header with link-relation *next* is present. This contains a URI pointing to the next (partial) result. It is possible that the next partial result contains some results that were already returned. **Example request**: .. sourcecode:: http GET /api2/producten/7/beschikbaarheid?begin=2037-04-01&eind=2037-04-02 HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "startmoment":"2037-04-01T16:00:00+02:00", // (start_time) "locaties":[ // (locations) { "locatie_id":null, // (location_id) "beschikbaarheid":99999 // (availability) }, { "locatie_id":1, // (location_id) "beschikbaarheid":16 // (availability) }, { "locatie_id":2, // (location_id) "beschikbaarheid":99999 // (availability) }, { "locatie_id":3, // (location_id) "beschikbaarheid":99999 // (availability) } ] }, { "startmoment":"2037-04-01T17:00:00+02:00", // (start_time) "locaties":[ // (locations) { "locatie_id":null, // (location_id) "beschikbaarheid":99999 // (availability) }, { "locatie_id":1, // (location_id) "beschikbaarheid":16 // (availability) }, { "locatie_id":2, // (location_id) "beschikbaarheid":99999 // (availability) }, { "locatie_id":3, // (location_id) "beschikbaarheid":99999 // (availability) } ] } ] :json string startmoment: ISO8601 start time (`startmoment`) of product :json array locaties: List of locations (`locaties`) where the product can take place with corresponding availability (`beschikbaarheid`) :json int locaties.locatie_id: id of location (`locatie_id`), `null` is also added if this product can also be booked without a location :json int locaties.beschikbaarheid: The availability (`beschikbaarheid`) of the product at this start time and location. 99999 is used as a value for unlimited capacity.