Use this endpoint to Create a new appointment. The appointment will be created with an "IN", Initial status. Posting an appointment with "IN" status requires minimal information and requires a "PUT book" call to complete the booking transaction, PUT /consumer/v1/appointments/{id}/book. Alternatively, you can post an appointment using the completeBooking option which completes the booking in one transaction, but it will require more data. The method you choose depends on your solutions workflow.
StartDateTime and EndDateTime are required. Use the ISO 8601 format for DateTime Timezone, e.g., 2016-10-30T09:00:00-5:00
A valid serviceId is required. The serviceId provided must be valid for the location being booked. A valid serviceId is one that is scoped to a Primary Company Location or is associated with a Business Location
OPTIONAL FIELDS INCLUDE:
locationId - if not supplied, the appointment will be posted to the primary business location. If you support multiple location, we recommend always supplying the locationId.
resourceId - not required when posting with an "IN" status but is required when the appointment is booked. Use GET /consumer/v1/resources for a list of resources.
customerId - if supplied the name and email will be retrieved from the customer record.
BookedBy - if not supplied the email address of the booked appointment is used or the ip address if no email address is provided. BookedBy is used in the Appointment Audit trail which can be viewed in the appointment object.
Location - is a string value representing the location of the appointment. It provides no added functionality in OnSched and should not be confused with locationId.
TimezoneName - if used timezoneName must be in IANA format, America/New_York. This is the timezone the appointment was booked in. Populating this information can help later in situations where appointments are booked before a Daylight Savings change. If no timezoneName is supplied, the Business Locations timezone will be used.
COMPLETE BOOKING: This parameter provides a mechanism for immediate booking with the POST appointment endpoint. To complete the booking in one transaction, populate the completeBooking parameter with a "BK", booked or an "RS", reserved status and provide an (email and name) or a customerId in the post body. Doing so will book the appointment and send notifications all in one transaction. Note: "IN" can also be used as a completeBooking option to support payment flows. With the "IN" option, notifications are NOT sent.
For more information: Appointments Overview