Create or update booking closing schedules

patch

/rest/ofscCapacity/v1/bookingClosingSchedule

This operation creates or updates the booking closing schedules for one or more capacity areas.

Request

Body ()
This section describes the request body parameters for this operation.
Root Schema : bookingClosingScheduleList
Type: object
The collection of closing schedules for bookings.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Booking Closing Schedule
Type: object
Title: Booking Closing Schedule
Show Source
  • Title: Area
    Minimum Length: 1
    Maximum Length: 40
    The label of the area from which the booking is closed.
  • Title: Category
    The label of the capacity category for which the booking is closed. If this field is not returned, then the bookings for all categories are closed.
  • Title: Close Time
    The time at which the booking is closed. This time corresponds to the timezone of the capacity area.
  • Title: Day Offset
    Minimum Value: 1
    Maximum Value: 255
    The offset determines the day on which the booking is closed. For example, if "1" is returned, then the booking for tomorrow is closed today.
  • Title: End Time
    The end time of the booking closing schedule. [:] Valid values for hours: [0 to 48]. The dash sign after 24, for example, 24 - represents overnight work. Minutes are optional. Valid values for minutes: [0 to 59].
  • Title: Start Time
    The start time of the booking closing schedule. If Start Time and End Time values are not returned, then it means that the bookings are closed for the entire day. This operation checks if a specified time interval is supported or configured for the area. The intervals that are not currently configured are not returned, even if the database contains such records.
  • Title: Work Zone
    The label of the work zone from which the booking is closed. If this field is not returned, then the bookings are closed for all work zones (even if a particular work zone does not have its own close time).
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : ResultObject
Type: object
Show Source
Nested Schema : results
Type: object
Show Source
Nested Schema : errors
Type: array
The array of failed operations.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : errorDetail
Type: object
The details of the error.
Show Source
Nested Schema : operation
Type: object
The operation that caused the error.
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 update a booking closing schedule by submitting a PATCH request on the REST resource.

Example of Request Header

The following shows an example of the request header.

PATCH /rest/ofscCapacity/v1/bookingClosingSchedule 
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 Request Body

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

{"items": [
      {
      "area": "CapacityArea",
      "category": "TC",
      "dayOffset": 1,
      "startTime": "12:00",
      "endTime": "18:00",
      "closeTime": "12:00:00"
   },
      {
      "area": "CapacityArea",
      "category": "DI",
      "closeTime": "22:00:00"
   },
      {
      "area": "CapacityArea",
      "dayOffset": 1,
      "category": "TC",
      "startTime": "8:00",
      "endTime": "12:00",
      "closeTime": "10:00:00"
   }
]}

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:44:47 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.

{
    "results": {
        "updatedFieldCount": 3,
        "notChangedFieldCount": 0,
        "errors": []
    }
}
Back to Top