v1

latestOpenAPI 3.0.12026-07-133870165.8 KB
Appointments

Create Appointment

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

post/consumer/v1/appointments

Query parameters

completeBookingstring

Options are "BK", "RS" or "IN"

Request body

locationIdstring nullable
serviceIdstring nullable
calendarIdstring nullable
serviceAllocationIdstring nullable
resourceIdstring nullable
resourceIdsstring nullable
resourceGroupIdstring nullable
customerIdstring nullable
emailstring nullable
namestring nullable
phonestring nullable
phoneTypestring nullable
bookingWindowIdstring nullable
bookedBystring nullable
locationstring nullable
timezoneNamestring nullable
startDateTimestring date-time
endDateTimestring date-time
travelTimeMinsinteger
travelAppointmentIdstring nullable
customerMessagestring nullable
notesstring nullable
groupSizeinteger nullable

Response

Success

objectstring nullable
idstring nullable
locationIdstring nullable
businessNamestring nullable
calendarIdstring nullable
serviceIdstring nullable
serviceNamestring nullable
serviceImageUrlstring nullable
resourceIdstring nullable
resourceNamestring nullable
resourceGroupIdstring nullable
resourceGroupNamestring nullable
resourceImageUrlstring nullable
resourceEmailstring nullable
customerIdstring nullable
serviceAllocationIdstring nullable
rescheduledIdstring nullable
createDatestring nullable
startDateTimestring nullable
endDateTimestring nullable
dateInternationalstring nullable
datestring nullable
timeinteger
durationinteger
timezoneinteger nullable
timezoneIdstring nullable
timezoneIanastring nullable
ipAddressstring nullable
statusstring nullable
confirmationNumberstring nullable
downloadIcsUrlstring nullable
bookedBystring nullable
onlineBookingboolean nullable
confirmedboolean
emailstring nullable
namestring nullable
lastnamestring nullable
firstnamestring nullable
phonestring nullable
phoneTypestring nullable
phoneExtstring nullable
customerMessagestring nullable
notesstring nullable
groupSizeinteger nullable
lastModifiedOnstring nullable
lastModifiedBystring nullable
emailConfirmationSentstring nullable
emailReminderSentstring nullable
smsConfirmationSentstring nullable
smsReminderSentstring nullable
locationstring nullable
latitudestring nullable
longitudestring nullable
stripeChargeIdstring nullable
stripeRefundIdstring nullable
paymentStatusinteger
customFieldsobject nullable