Get booking statuses

get

/rest/ofscCapacity/v1/bookingStatuses

This operation retrieves a collection of booking statuses for the specified dates and capacity areas.

Request

Query Parameters
  • Collection Format: csv
    The label of the capacity area.
  • The dates for which the booking statuses must be retrieved. The date is specified in YYYY-MM-DD format.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Booking Status List
Type: object
Title: Booking Status List
The collection of booking statuses.
Show Source
Nested Schema : Items
Type: array
Title: Items
The list of booking statuses.
Show Source
Nested Schema : Booking Status
Type: object
Title: Booking Status
An array of booking statuses.
Show Source
Nested Schema : Statuses
Type: array
Title: Statuses
The list of statuses.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : Booking Status
Type: object
Title: Booking Status
The booking status of an item.
Show Source

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to get the booking statuses by submitting a GET request on the REST resource.

Example of Request Header

The following shows an example of the request header.

GET /rest/ofscCapacity/v1/bookingStatuses?dates=2017-08-23&areas=CapacityArea
Connection: close
Accept-Encoding: gzip,deflate
Authorization: Basic bXlyb290QHFhNTUwMzox
Host: <instance_name>.etadirect.com
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 23 Aug 2017 12:51:13 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Credentials: true
Strict-Transport-Security: max-age=31536000; includeSubDomains;

Example of Response Body

The following example shows the contents of the response body in JSON format.

{"items": [{
   "date": "2017-08-23",
   "area": "CapacityArea",
   "statuses":    [
      {"bookingStatus": {"state": "open"}},
            {
         "category": "IN",
         "bookingStatus": {"state": "open"}
      },
            {
         "category": "TC",
         "bookingStatus":          {
            "state": "closed",
            "closedAt": "2017-08-23 09:00:47"
         }
      },
            {
         "category": "DI",
         "bookingStatus":          {
            "state": "closed",
            "closedAt": "2017-08-16 05:29:01"
         }
      },
            {
         "bookingStatus": {"state": "open"},
         "timeFrom": "12:00",
         "timeTo": "18:00"
      },
            {
         "bookingStatus": {"state": "open"},
         "timeFrom": "08:00",
         "timeTo": "12:00"
      },
            {
         "category": "IN",
         "bookingStatus": {"state": "open"},
         "timeFrom": "12:00",
         "timeTo": "18:00"
      },
            {
         "category": "IN",
         "bookingStatus": {"state": "open"},
         "timeFrom": "08:00",
         "timeTo": "12:00"
      },
            {
         "category": "TC",
         "bookingStatus": {"state": "open"},
         "timeFrom": "12:00",
         "timeTo": "18:00"
      },
            {
         "category": "TC",
         "bookingStatus": {"state": "open"},
         "timeFrom": "08:00",
         "timeTo": "12:00"
      },
            {
         "category": "DI",
         "bookingStatus": {"state": "open"},
         "timeFrom": "12:00",
         "timeTo": "18:00"
      },
            {
         "category": "DI",
         "bookingStatus": {"state": "open"},
         "timeFrom": "08:00",
         "timeTo": "12:00"
      }
   ]
}]}
Back to Top