GET api/Timeslot?productId={productId}&from={from}&to={to}
Allows you to retrieve list of timeslots in given period
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| productId |
Id of product for which you want to retrieve timeslots, e.g. 121531 (Icebar) |
string |
Required |
| from |
Start of the period for which you want to retrieve timeslots, e.g. 2016-02-20 8:00 |
date |
Required |
| to |
End of the period for which you want to retrieve timeslots, e.g. 2016-02-21 8:00 |
date |
Required |
Body Parameters
None.
Response Information
Resource Description
Collection of Timeslot| Name | Description | Type | Additional information |
|---|---|---|---|
| TimeslotId |
Identifier of the timeslot |
integer |
None. |
| IsForOpenTicket |
Whether timeslot is for open ticket. the timeslot has limited capacitiesThe Time property will be '00:00:01' |
boolean |
None. |
| ProductId |
Identifier of the product |
string |
None. |
| Time |
Time of availability for the given non-capacity product or package |
date |
None. |
| EndTime | string |
None. |
|
| TotalCapacity |
Total capacity available for the timeslot. E.g. total number of seats in the bus. |
integer |
None. |
| AvailableCapacity |
Capacity that is still available for given timeslot. E.g. number of seats still available in the bus. |
integer |
None. |
| PackageTimeslotDetails | Collection of Timeslot |
None. |
Response Formats
application/json, text/json
[
{
"timeslotId": 6325,
"productId": "121531",
"time": "2016-02-20T20:00:00+01:00",
"totalCapacity": 30,
"availableCapacity": 1
},
{
"timeslotId": 6487,
"productId": "121531",
"time": "2016-02-20T20:20:00+01:00",
"totalCapacity": 30,
"availableCapacity": 20
},
{
"productId": "P111",
"time": "2016-02-20T20:20:00+01:00"
}
]
Not Successful Http Statuses
Bad Request (400) is returned when product does not exist, is not capacity product or you enter invalid dates