Booking

A booking [Booking] is the allocation of an employee's (or resource's) time to a work package (project or project task).

Review the Usage Guidelines for the Booking object.

XML

SOAP

REST

Database table

Object

Booking

oaBooking

booking

Supported Commands

Add, Read, Modify, ModifyOnCondition, Delete, Submit, Approve, Reject, Unapprove

add(), read(), modify(), upsert(), delete(), submit(), approve(), reject(), unapprove()

The Booking object has the following standard properties:

Note:

Booking object properties may also include custom fields. The object type supports the custom equal to read method and the enable_custom read attribute.

XML / SOAP

Database

Description

approval_status

approval_status

A one-character string indicating the approval status of the booking request. Possible values:

  • O - Open

  • S - Submitted

  • A - Approved

  • R - Rejected

as_percentage

as_percentage

A 1/0 field indicating which of the fields (hours or percentage) are actual, and which is derived.

  • 1 = percentage is actual and hours is derived.

  • 0 = hours in actual and percentage is derived.

booking_typeid

booking_type_id

The ID of the associated booking_type.

created

created

[Read-only] Time the record was created.

See Date Fields

customerid

customer_id

[Required] The ID of the associated customer.

date_approved

date_approved

The date the booking request was approved.

See Date Fields

date_submitted

date_submitted

The date the booking_request was submitted.

See Date Fields

enddate

enddate

[Required] The end date of the booking.

See Date Fields

endtime

endtime

End time.

See Date Fields

externalid

external_id

If the record was imported from an external system you store the unique external record ID here.

hours

hours

The number of hours booked to this project during this date range. This is either the actual booked hours or derived from the percentage.

id

id

[Read-only] Unique ID. Automatically assigned by OpenAir.

job_codeid

job_code_id

The ID of the associated job code.

locationid

location_id

The location ID for this booking.

notes

notes

Booking notes.

notify_owner

notify_owner

A 1/0 field indicating whether to send email to the requestor when the booking is modified.

ownerid

owner_id

The ID of the associated user creating the booking. Can be specified when adding an object. If specified, the user must exist, must not be marked as deleted and must be active.

percentage

percentage

The percentage of time booked to this project during this date range. This is either the actual booked percentage or derived from the hours.

project_assignment_profileid

project_assignment_profile_id

The ID of the associated project assignment profile.

project_taskid

project_task_id

The ID of the task within the associated project.

projectid

project_id

[Required] The ID of the associated project.

repeatid

repeat_id

The ID of the associated repeating event.

resource_request_queue_id

resource_request_queue_id

The ID of the associated resource request queue.

source_booking_id

source_booking_id

ID of the booking used to create this booking.

startdate

startdate

[Required] The start date of the booking.

See Date Fields

starttime

starttime

Start time.

See Date Fields

updated

updated

[Read-only] Time the record was last updated or modified.

See Date Fields

userid

user_id

[Required] The ID of the associated user. The user must exist, must not be marked as deleted and must be active.

Usage Guidelines

Review the following guidelines:

  • Some object properties are required depending on the as_percentage property value:

    • percentage is required if as_percentage is set to 1.

    • hours is required otherwise.

  • The date range defined by start_date and end_date must be valid. start_date must be before end_date.

  • approval_status is set automatically, if empty or not already set when adding or modifying a Booking object. It is set to O if booking approvals are enabled for your company's OpenAir account, or to A otherwise.

  • A booking_typeid is required if the Require booking type when booking resources [rm_booking_require_type] box is checked in Administration > Application Settings > Resources > Other Settings for your company's account.

  • Depending on your company's account configuration, booking_typeid may be set automatically, if empty or not already set when adding or modifying a Booking object. It is set to the default booking type associated with the approval_status, if one is set. See Booking Types.

  • A booking cannot be deleted if it is a source booking [source_booking_id] for another booking. Delete any other bookings referencing the booking as source booking before you can delete a Booking object.

  • Deleting a booking deletes the booking and all its attachments, all references to this booking in project task assignments, all related approvals, and all related alerts.