openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 226 kB
JSON
{"openapi":"3.0.1","servers":[{"url":"https://sandbox-api.onsched.com/"}],"info":{"description":"Build secure and scalable custom apps for onboarding and setup. Our flexible API provides many options for configuration.\r\n<br><br>\r\nTake the API for a test drive. Just click on the Authorize button below and authenticate. \r\nYou can access our demo company profile if you are not a customer, or your own profile by using your assigned ClientId and Secret.\r\n<br><br>\r\nThe API has two interfaces, consumer and setup. \r\n<ul>\r\n<li>\r\nThe consumer interface provides all the endpoints required for implementing consumer booking flows.\r\n</li>\r\n<li>\r\nThe setup interface provides endpoints for profile configuration and setup.\r\n</li>\r\n</ul>\r\nToggle freely between the two interfaces using the swagger tool bar option labelled 'Select a definition'.\r\n","title":"OnSched Setup API","version":"v1","x-apisguru-categories":["collaboration"],"x-logo":{"url":"https://onsched.com/img/apple-touch-icon-57x57-precomposed.ico"},"x-origin":[{"format":"openapi","url":"https://sandbox-api.onsched.com/swagger/setup/swagger.json","version":"3.0"}],"x-providerName":"onsched.com","x-serviceName":"setup"},"security":[{"oauth2":["OnSchedApi"]}],"paths":{"/setup/v1/appointments":{"get":{"description":"<p>Use this endpoint to return a <b>List of Appointments</b>. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further. For more information: <a href=\"https://onsched.readme.io/docs/appointments-overview\">Appointments Overview</a></p>","parameters":[{"description":"id of business location, defaults to primary business location","in":"query","name":"locationId","schema":{"type":"string"}},{"description":"Filter appointments by email address","in":"query","name":"email","schema":{"type":"string"}},{"description":"Filter appointments by lastname or part of","in":"query","name":"lastname","schema":{"type":"string"}},{"description":"Filter appointments by service","in":"query","name":"serviceId","schema":{"type":"string"}},{"description":"Filter appointments by calendar","in":"query","name":"calendarId","schema":{"type":"string"}},{"description":"Filter appointments by resource","in":"query","name":"resourceId","schema":{"type":"string"}},{"description":"Filter appointments by customer","in":"query","name":"customerId","schema":{"type":"string"}},{"description":"Filter appointments by service allocation","in":"query","name":"serviceAllocationId","schema":{"type":"string"}},{"description":"Format YYYY-MM-DD: Filter appointments by on/after startDate","in":"query","name":"startDate","schema":{"format":"date-time","type":"string"}},{"description":"Format YYYY-MM-DD: Filter appointments on/before endDate","in":"query","name":"endDate","schema":{"format":"date-time","type":"string"}},{"description":"Filter appointments by status: IN, BK, CN, RE, RS","in":"query","name":"status","schema":{"type":"string"}},{"description":"Filter appointments by user email who booked","in":"query","name":"bookedBy","schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentListViewModel"}}},"description":"Success"}},"summary":"List Appointments","tags":["Appointments"]}},"/setup/v1/appointments/{id}":{"get":{"description":"<p>Use this endpoint to return an <b>Appointment</b> object. A valid <b>appointment id</b> is required. Find appointment id's by using the <i>GET/setup/v1/appointments</i> endpoint.</p>","parameters":[{"description":"id of appointment object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentViewModel"}}},"description":"Success"}},"summary":"Get Appointment","tags":["Appointments"]}},"/setup/v1/appointments/{id}/reassign/resource/{resourceId}":{"put":{"description":"<p>Use this endpoint to <b>Reassign</b> an appointment from one resource to another. The result returned is a single appointment that was reassigned to the target resource. A valid <b>appointment id</b> and <b>resource id</b> is required. Find appointment id's by using the <i>GET /setup/v1/appointments</i> endpoint, find resource id's by using the <i>GET /setup/v1/resources</i> endpoint.</p>","parameters":[{"description":"id of appointment object","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"id of target resource","in":"path","name":"resourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentViewModel"}}},"description":"Success"}},"summary":"Reassign Appointment","tags":["Appointments"]}},"/setup/v1/businessusers":{"get":{"description":"<p>Use this endpoint to return a <b>List of Business Users and their Roles</b>. The results are returned in pages. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further.</p>","parameters":[{"description":"id of business location, defaults to primary business location","in":"query","name":"locationId","schema":{"type":"string"}},{"description":"Filter by email address","in":"query","name":"email","schema":{"type":"string"}},{"description":"Filter user role","in":"query","name":"role","schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserListViewModel"}}},"description":"Success"}},"summary":"List Users","tags":["BusinessUsers"]},"post":{"description":"<p>Use this endpoint to <b>Create</b> a Business User. If not specified, the business location defaults to the primary business location. </p>\r\n<p>Required fields: <b>Name</b>, <b>Email</b> and <b>Role</b><b>Note:</b> If the businessUser is a bookable resource (bizresource) then a resourceId is required.</p>\r\n<p>For role, use one of the values listed. <b>Business Roles Include: bizowner</b> (Business Owner), <b>bizadmin</b> (Business Administrator), <b>bizresource</b> (Business User - Bookable Resource).</p>\r\n<p>The <b>sendRegistrationInvite</b> parameter is available to API consumers for their own use. It provides no added functionality in OnSched.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/BusinessUserInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/BusinessUserInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/BusinessUserInputModel"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserViewModel"}}},"description":"Success"}},"summary":"Create User","tags":["BusinessUsers"]}},"/setup/v1/businessusers/permissions":{"get":{"description":"<p>Use this endpoint to return a <b>List of Business User Permissions by Role</b>. Results are returned in pages. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further.</p>","parameters":[{"description":"Filter permissions by role","in":"query","name":"role","schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPermissionListViewModel"}}},"description":"Success"}},"summary":"List User Permissions","tags":["BusinessUsers"]}},"/setup/v1/businessusers/{email}/companies":{"get":{"description":"<p>Use this endpoint to return a <b>List of Companies</b> associated with the business users email requested. A business user <b>email</b> address is required. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further.</p>","parameters":[{"description":"Email of business user","in":"path","name":"email","required":true,"schema":{"type":"string"}},{"description":"All or partial company name","in":"query","name":"searchText","schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedCompanyListViewModel"}}},"description":"Success"}},"summary":"List User Companies","tags":["BusinessUsers"]}},"/setup/v1/businessusers/{id}":{"delete":{"description":"<p>Use this endpoint to permanently <b>Delete</b> a Business User. A valid <b>businessUser id</b> is required.</p>","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}},"summary":"Delete User","tags":["BusinessUsers"]},"get":{"description":"<p>Use this endpoint to return a <b>Business User</b> object. A valid <b>businessUser id</b> is required. Find businessUser id's using the <i>GET /setup/v1/businessusers</i> endpoint.</p>","parameters":[{"description":"id of businessUser object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserViewModel"}}},"description":"Success"}},"summary":"Get User","tags":["BusinessUsers"]},"put":{"description":"<p>Use this endpoint to <b>Update</b> a Business User. A valid <b>businessUser id</b> is required.</p>\r\n<p>\r\n <b>Business Roles Include: bizowner</b> (Business Owner), <b>bizadmin</b> (Business Administrator), <b>bizresource</b> (Business User - Bookable Resource).</p>","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/BusinessUserUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/BusinessUserUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/BusinessUserUpdateModel"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUserViewModel"}}},"description":"Success"}},"summary":"Update User","tags":["BusinessUsers"]}},"/setup/v1/calendars":{"get":{"description":"<p>Use this endpoint to return a <b>List of Calendars</b> from the requested location. If not specified, the business location defaults to the primary business location. </p>","parameters":[{"description":"id of business location, defaults to primary business location","in":"query","name":"locationId","schema":{"type":"string"}},{"description":"Filter by deleted status","in":"query","name":"deleted","schema":{"type":"boolean"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListViewModel"}}},"description":"Success"}},"summary":"List Calendars","tags":["Calendars"]},"post":{"description":"<p>\r\n <b>DEPRECATING:</b> Create Calendar</p>\r\n<p>We are no longer supporting Multiple Calendar Functionality as it is part of our Legacy Application and has no relevance in the API.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/ScheduleInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/ScheduleInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/ScheduleInputModel"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleViewModel"}}},"description":"Success"}},"summary":"DEPRECATING: Create","tags":["Calendars"]}},"/setup/v1/calendars/block/{id}":{"delete":{"description":"<p>Use this endpoint to permanently <b>Delete</b> a calendar block. A valid <b>calendarBlock id</b> is required.</p>","parameters":[{"description":"id of a calendarBlock object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockViewModel"}}},"description":"Success"}},"summary":"Delete Calendar Block","tags":["Calendars"]},"put":{"description":"<p>Use this endpoint to <b>Create</b> a Calendar Block. A valid <b>calendarBlock id</b> is required. Refer to the <i>POST /setup/v1/calendars/{id}/block</i> endpoint for fieldnames and details.</p>","parameters":[{"description":"id of calendarBlock object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CalendarBlockUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CalendarBlockUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockUpdateModel"}}},"description":"Resource Block input model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockViewModel"}}},"description":"Success"}},"summary":"Update Calendar Block","tags":["Calendars"]}},"/setup/v1/calendars/blocks/{id}":{"get":{"description":"<p>Use this endpoint to return a <b>Calendar Block</b>. A valid <b>calendarBlock id</b> is required. </p>","parameters":[{"description":"id of calendarBlock object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockViewModel"}}},"description":"Success"}},"summary":"Get Calendar Block","tags":["Calendars"]}},"/setup/v1/calendars/{id}":{"delete":{"description":"<p>Use this endpoint to <b>Delete</b> a calendar object. A valid <b>calendar id</b> is required. The calendar is not permanently deleted and can be recovered by using the <i>PUT /setup/v1/calendars/{id}/recover </i>endpoint.</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleViewModel"}}},"description":"Success"}},"summary":"Delete Calendar","tags":["Calendars"]},"get":{"description":"<p>Use this endpoint to return a <b>Calendar</b> object. A valid <b>calendar id</b> is required.</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleViewModel"}}},"description":"Success"}},"summary":"Get Calendar","tags":["Calendars"]},"put":{"description":"<p>Use this endpoint to <b>Update</b> a calendar object. A valid <b>calendar id</b> is required. When your company was created a calendar object was automatically created with 24-hour weekly availability. Its <b>name = Main</b>, the <b>type = resource</b> and by default the <b>interval = 30 mins</b>. We are currently supporting resource calendar type. Other types were part of our Legacy Application and has no relevance in the API product.</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdateModel"}}},"description":"Input model for the calendar object"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleViewModel"}}},"description":"Success"}},"summary":"Update Calendar","tags":["Calendars"]}},"/setup/v1/calendars/{id}/block":{"post":{"description":"<p>Use this endpoint to <b>Create</b> a Calendar Block. A valid <b>calendar id</b> is required.</p>\r\n<p>Required fields: <b>startDate, endDate, startTime, endTime</b> and <b>reason</b>.</p>\r\n<p>Calendar blocks can be set to specific time ranges or for the whole day. Th block a whole day set the startTime to 0 and endTime to 2400.</p>\r\n<p>Calendar blocks can be for a specific date range instance or set to repeat at a specified frequency.</p>\r\n<p>\r\n <b>Repeat object: (repeats = true)</b>\r\n</p>\r\n<p>The <b>frequency</b> can be set to a value of <b>D, W or M</b> for <b>Day, Week</b> or <b>Month</b> respectively.</p>\r\n<p>Use the <b>interval</b> property to specify the interval that the block repeats. For example, an interval of 2 for a weekly block means that the block will repeat every 2nd week beginning at the day specified. A daily block with an interval of 10 means the block will repeat every 10 days. The interval property applies to all repeat frequencies. <b>If using the repeat functionality an interval value is required</b>.</p>\r\n<p>\r\n <b>DAILY BLOCKS</b>: Will repeat for each day of the week for the date range specified for the interval specified. An interval value of “1” repeats every day, and an interval value of “3” is every 3rd day.</p>\r\n<p>\r\n <b>WEEKLY BLOCKS</b>: Will repeat only on the specified days of the week for the date range specified. For weekly the <b>frequency</b> is required and should be set to <b>“W”</b>. You must specify the <b>weekdays</b> parameter. Weekdays are expressed as a string of digits with each single digit in the string representing a day of the week. The possible values are <b>0,1,2,3,4,5,6</b> where <b>0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday</b>. For example, a weekly frequency with an interval of “1”, and an entry of weekdays = “24”, will repeat each week on Tuesday and Thursday for the duration of the block date range.</p>\r\n<p>\r\n <b>MONTHLY BLOCKS</b>: Will repeat either on the day of the month specified in the <b>monthDay</b> property or on the day of the week and week of the month specified by the <b>monthType</b> property. In both cases <b>frequency</b> is required and should be set to <b>“M”</b>, monthly, <b>monthDay</b> is the day of the month you want blocked. If monthDay=’15’ this means to block the 15th of every month in the date range requested. Using monthDay in conjunction with monthType addresses “day of the week and week of the month” scenario. There are two possible values for monthType: <b>D for Day of Month</b> or <b>W for Week of Month.</b> For <b>monthType D</b>, monthDay value must be between 1 and 31. It is the day of the month to repeat on. For <b>monthType M</b>, monthDay value contains 2 digits: day of week (0-6), (0,1,2,3,4,5,6 where 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday) and week of month (1-5). 1 being the first week, 2 being the second. The third Thursday of the month is depicted as a monthType=”M” and monthDay=”43”.</p>\r\n<p>\r\n <b>Repeats will end on the date specified by the end date.</b>\r\n</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CalendarBlockInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CalendarBlockInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockInputModel"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceBlockViewModel"}}},"description":"Success"}},"summary":"Create Calendar Block","tags":["Calendars"]}},"/setup/v1/calendars/{id}/blocks":{"get":{"description":"<p>Use this endpoint to return a <b>List of Calendar Blocks</b> for the requested calendar. A valid <b>calendar id</b> is required. </p>","parameters":[{"description":"id of calendar to list blocks","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarBlockListViewModel"}}},"description":"Valid response"},"400":{"description":"Missing or invalid values in the request"},"401":{"description":"Authorization error."},"404":{"description":"Resource was not found"}},"summary":"List Calendar Blocks","tags":["Calendars"]}},"/setup/v1/calendars/{id}/recover":{"put":{"description":"<p>Use this endpoint to <b>Recover</b> a previously deleted calendar object. A valid <b>calendar id</b> is required.</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleViewModel"}}},"description":"Success"}},"summary":"Recover Calendar","tags":["Calendars"]}},"/setup/v1/calendars/{id}/services":{"get":{"description":"<p>Use this endpoint to return a <b>List of Linked Services</b> of a calendar object. A valid <b>calendar id</b> is required. Find calendar id's by using the <i>GET /setup/v1/calendars</i> endpoint.</p>","parameters":[{"description":"id of calendar object","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListViewModel"}}},"description":"Success"}},"summary":"List Calendar Services","tags":["Calendars"]}},"/setup/v1/companies":{"get":{"description":"<p>Use this endpoint to return the <b>Authorized Company</b> information. The company is the main entity that oversees all business locations defined below it, hierarchically. </p>\r\n<p>Access to the company credentials gives you access to all business locations defined in the authorized company. Client credentials resolve to a single company and are purposely hidden from this endpoint.</p>","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyViewModel"}}},"description":"Success"}},"summary":"Get Company","tags":["Companies"]},"post":{"description":"<p>Use this endpoint to <b>Create</b> a new authorized company.</p>\r\n<p>\r\n <b>Note: Special API Partner credentials are required to access this endpoint.</b>\r\n</p>\r\n<p>The <b>name, registrationEmail, phone, country</b> and <b>timezoneName</b> are required fields. For <b>country</b> use the standard ISO 3166 2-character country code.</p>\r\n<p>The <b>timezoneName</b> must be expressed as an IANA Timezone e.g., <i>America/New_York</i>.</p>\r\n<p>For more information: <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">Timezone IANA Wiki</a></p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CompanyInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompanyInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompanyInputModel"}}},"description":"Company Input Model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyViewModel"}}},"description":"Success"}},"summary":"Create Company","tags":["Companies"]},"put":{"description":"<p>Use this endpoint to <b>Update</b> the authorized company information. Your client credentials resolve to a single company. The timezoneName must be expressed as an IANA Timezone, e.g., <i>America/New_York</i>. </p>\r\n<p>For more information: <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">Timezone IANA Wiki</a></p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CompanyUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompanyUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdateModel"}}},"description":"Company Update Model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyViewModel"}}},"description":"Success"}},"summary":"Update Company","tags":["Companies"]}},"/setup/v1/companies/domains":{"get":{"description":"<p>Use this endpoint to return a <b>List of Company Domains</b> for the authorized company. To share the OnSchedJS booking widget on your website or in your application your domain must be listed.</p>","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainListViewModel"}}},"description":"Success"}},"summary":"List Company Domains","tags":["Companies"]},"post":{"description":"<p>Use this endpoint to <b>Create</b> an OnSchedJs domain for your authorized company. To share the OnSchedJS booking widget on your website or in your application you must add the domain.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CompanyDomainInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompanyDomainInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainInputModel"}}},"description":"Company Domain Input Model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainViewModel"}}},"description":"Success"}},"summary":"Create Company Domain","tags":["Companies"]}},"/setup/v1/companies/domains/{id}":{"delete":{"description":"<p>Use this endpoint to <b>Delete</b> an OnSchedJs domain from your authorized company. A valid <b>companyDomain id</b> is required.</p>","parameters":[{"description":"id of companyDomain object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainViewModel"}}},"description":"Success"}},"summary":"Delete Company Domain","tags":["Companies"]},"get":{"description":"<p>Use this endpoint to return a <b>Company Domain</b> object. A valid <b>companyDomain id</b> is required. </p>","parameters":[{"description":"id of companyDomain object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainViewModel"}}},"description":"Success"}},"summary":"Get Company Domain","tags":["Companies"]},"put":{"description":"<p>Use this endpoint to <b>Update</b> an OnSchedJs domain for your authorized company. A valid <b>companyDomain id</b> is required.</p>","parameters":[{"description":"id of companyDomain object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/CompanyDomainUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompanyDomainUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainUpdateModel"}}},"description":"Company Domain Update Model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainViewModel"}}},"description":"Success"}},"summary":"Update Company Domain","tags":["Companies"]}},"/setup/v1/companies/email/templates":{"get":{"description":"<p>Use this endpoint to return a <b>List of Email Templates</b> that are provided and may be customized. If the template has been customized, the customized property is true. The scope parameter indicates if the email template has been customized at the Business Location level or Company level. This endpoint returns <b>only company level templates</b>, so the scope is always company.</p>","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateListViewModel"}}},"description":"Success"}},"summary":"List Email Templates","tags":["Companies"]}},"/setup/v1/companies/email/templates/master":{"delete":{"description":"<p>Use this endpoint to <b>Delete Custom Master Email Template Settings</b>. Deleting a custom master email template setting will reactivate the original default OnSched template settings.</p>","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterEmailTemplateSettingsViewModel"}}},"description":"Success"}},"summary":"Delete Master Template Settings","tags":["Companies"]},"get":{"description":"<p>Use this endpoint to return the <b>Master Email Template Settings</b>. Settings exist for showing or hiding email panels and for changing color schemes. </p>","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterEmailTemplateSettingsViewModel"}}},"description":"Success"}},"summary":"Get Master Template Settings","tags":["Companies"]},"post":{"description":"<p>Use this endpoint to <b>Create Custom Master Email Template Settings</b>. Settings exist for showing or hiding email panels and for changing color schemes. Use the <i>GET /setup/v1/companies/email/templates</i> endpoint to display the settings offered. Changes to the Master Template Settings will be reflected in all business locations associated with this company. </p>\r\n<p>The email template endpoints work a little differently than most. There are no endpoints to update the templates, we use the post endpoint to create a custom template instead. This endpoint creates a new custom Master Template Settings file that will be used instead. If you delete it you are deleting the custom template settings you created and the original default Master Template created by OnSched would be reactivated.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/MasterTemplateSettingsInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/MasterTemplateSettingsInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/MasterTemplateSettingsInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/MasterTemplateSettingsInputModel"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterEmailTemplateSettingsViewModel"}}},"description":"Success"}},"summary":"Create Master Template Settings","tags":["Companies"]}},"/setup/v1/companies/email/templates/{templateName}":{"get":{"description":"<p>Use this endpoint to return the requested <b>Email Template</b>. If it wasn't customized the default template is returned. The response content is in html format. A valid emailTemplate <b>name</b> is required. Find template names by using the: <i>GET /setup/v1/companies/email/templates</i> endpoint. Note: The master template cannot be accessed here. </p>\r\n<p>To create custom company email templates, go to the <i>POST /setup/v1/locations/{id}/email/templates</i> endpoint and create a template using the Primary Business Location Id.</p>","parameters":[{"description":"Email template name","in":"path","name":"templateName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResult"}}},"description":"Success"}},"summary":"Get Email Template","tags":["Companies"]}},"/setup/v1/companies/regions":{"get":{"description":"<p>Use this endpoint to return a list of <b>Regions</b> in the authorized company. The results are returned in pages. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further. </p>","parameters":[{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionListViewModel"}}},"description":"region object's"},"400":{"description":"Missing or invalid values in the request"},"401":{"description":"Authorization error."},"404":{"description":"Resource was not found"}},"summary":"List Regions","tags":["Companies"]},"post":{"description":"<p>Use this endpoint to <b>Create</b> a region object. Regions can be mapped to business locations. They can be used by the locations endpoints to filter locations by region id.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/RegionInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/RegionInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/RegionInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/RegionInputModel"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionViewModel"}}},"description":"Success"}},"summary":"Create Region","tags":["Companies"]}},"/setup/v1/companies/regions/{id}":{"delete":{"description":"<p>Use this endpoint to <b>Delete</b> a region object. A valid <b>region id</b> is required. If the region is related to any business locations it won't be deleted. You must first remove any references to region id from the business locations prior to deleting.</p>","parameters":[{"description":"id of Region","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionViewModel"}}},"description":"Success"}},"summary":"Delete Region","tags":["Companies"]},"get":{"description":"<p>Use this endpoint to return a <b>Region</b> object. A valid <b>region id</b> is required.</p>","parameters":[{"description":"id of a region object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionViewModel"}}},"description":"Success"}},"summary":"Get Region","tags":["Companies"]},"put":{"description":"<p>Use this endpoint to <b>Update</b> a region object. A valid <b>region id</b> is required.</p>","parameters":[{"description":"id of Region","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/RegionUpdateModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/RegionUpdateModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/RegionUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/RegionUpdateModel"}}},"description":"Region Update Model"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionViewModel"}}},"description":"Success"}},"summary":"Update Region","tags":["Companies"]}},"/setup/v1/companies/timezones/{date}":{"get":{"description":"<p>Use this endpoint to return a <b>List of timezone names, timezoneIana and tzOffset values</b> calculated for the date requested. Daylight Savings may or may not apply depending on the date specified.</p>","parameters":[{"description":"\"YYYY-MM-DD: Date for timezone info\"","in":"path","name":"date","required":true,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimezoneViewModel"}}},"description":"Success"}},"summary":"List Time Zones","tags":["Companies"]}},"/setup/v1/customers":{"get":{"description":"<p>Use this endpoint to return a <b>List of Customers</b>. The results are returned in pages. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further.</p>","parameters":[{"description":"id of business location, defaults to primary business location","in":"query","name":"locationId","schema":{"type":"string"}},{"description":"Filter by groupId","in":"query","name":"groupId","schema":{"type":"string"}},{"description":"Filter by email address.","in":"query","name":"email","schema":{"type":"string"}},{"description":"Search by lastname.","in":"query","name":"lastname","schema":{"type":"string"}},{"description":"Filter by deleted status.","in":"query","name":"deleted","schema":{"type":"boolean"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerListViewModel"}}},"description":"Success"}},"summary":"List Customers","tags":["Customers"]}},"/setup/v1/customers/{id}":{"get":{"description":"<p>Use this endpoint to return a <b>Customer</b> object. A valid <b>customer id</b> is required. Find customer id's by using the <i>GET /setup/v1/customers</i> endpoint.</p>","parameters":[{"description":"id of customer object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerViewModel"}}},"description":"Success"}},"summary":"Get Customer","tags":["Customers"]}},"/setup/v1/customers/{id}/privacy":{"get":{"description":"<p>Use this endpoint to return the <b>Customer</b> object. A valid <b>customer id</b> is required. Find customer id's using the <i>GET /setup/v1/customers</i> endpoint.</p>","parameters":[{"description":"id of customer object","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPrivacyViewModel"}}},"description":"Success"}},"summary":"Get Customer Data","tags":["Customers"]}},"/setup/v1/locations":{"get":{"description":"<p>Use this endpoint to <b>List Business Locations</b> associated with your company. The results are returned in pages. Use the offset and limit parameters to control the page start and number of results. Default offset is 0, limit is 20, max is 100. Use the query parameters to filter the results further.</p>\r\n<p>\r\n <b>IMPORTANT DEPRECATION NOTICE</b>: The following online settings parameters were intended for internal use in our Portal application only. They will be deprecated on <b>OCTOBER 15, 2022</b>. These fields are currently part of the <b>SETTINGS</b> object in all location endpoints: <b>businessId, enabled, familyMembersEnabled, serviceLabel, resourceLabel, resourceAnyLabel, resourceSelection, liveMode, formFlow, availabilityForm, showServiceGroups, showOnSchedLogo, showBusinessLogo, disableAuthorization, hideNavBar, hideLocationNav, hideServiceGroupsNav, hideServicesNav, hideContinueBooking, returnToService, returnToAvailability, hideBreadCrumbNav.</b> If you are using these fields, please adjust your code to handle the deprecation or let us know by submitting a ticket to: <b><i>support@onsched.com</i></b> as we do not want to interrupt your existing workflows.</p>","parameters":[{"description":"Location name(full or partial) to filter on","in":"query","name":"name","schema":{"type":"string"}},{"description":"Find locations that offer this service","in":"query","name":"serviceId","schema":{"type":"string"}},{"description":"friendlyId of location","in":"query","name":"friendlyId","schema":{"type":"string"}},{"description":"Filter locations on deleted status","in":"query","name":"deleted","schema":{"type":"boolean"}},{"description":"Starting row of page, default 0","in":"query","name":"offset","schema":{"format":"int32","type":"integer"}},{"description":"Page limit default 20, max 100","in":"query","name":"limit","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationListViewModel"}}},"description":"Success"}},"summary":"List Locations","tags":["Locations"]},"post":{"description":"<p>Use this endpoint to <b>Create</b> a new business location. The result is a business location object with a GUID assigned to the location.</p>\r\n<p>The <b>name</b> and <b>timezoneName</b> fields are required. The <b>timezoneName</b> must be expressed as an IANA Timezone e.g., <i>America/New_York</i>. Refer to: <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">Timezone Wiki</a> for a listing of IANA time zones.</p>\r\n<p>\r\n <b>Business hours</b> are set by defining the <b>startTime</b> and <b>endTime</b> values for each day available/open. All days of the week must be provided when setting availability. Days are defined as <b>sun, mon, tue, wed, thu, fri and sat</b>. Start and End Times are entered in <b>military format. e.g., 800 is 8:00am, 2230 is 10:30pm</b>. If there is no physical location and the business hours are irrelevant, set the hours to open 24 hours by setting startTime=0 and endTime=2400. To set a whole day as unavailable, set both the startTime and endTime to 0. </p>\r\n<p>\r\n <b>Settings</b> can be set here. Booking timer minutes, book ahead restrictions and customer bookings per day are all available here. Please read about the settings scope parameter before setting these values as it may simplify your process.</p>\r\n<p>\r\n <b>Settings Scope</b> can be set to the company or the business location level. You can have all locations use the same company level settings or individual business locations can define their own, business location scope. If you want to use the company settings throughout all locations, do not pass in <b>settings element</b>. To create business location scoped settings, pass in the <b>settings element</b> with the field values defined in the post body. </p>\r\n<p>\r\n <b>Appointment Reminders</b> Reminder values are used to define how many hours, days, or weeks (interval value) prior to the appointment to send the reminder. <b>Interval</b> values are used to define the reminder interval: <b>1 = Hours</b>, <b>2 = Days</b> and <b>3 = Weeks</b>. The reminder fields are numbers. If you are using the hours interval, use a number from 1 to 24.</p>\r\n<p>Example 1: <b>emailFirstReminder: 1, emailFirstReminderInterval: 2</b> - results in 1st reminder being sent <b>1 Day before</b> the appointment time.</p>\r\n<p>Example 2: <b>emailSecondReminder: 3, emailSecondReminderInterval: 1</b> - results in 2nd reminder being sent <b>3 Hours before</b> the appointment time.</p>\r\n<p>\r\n <b>IMPORTANT DEPRECATION NOTICE</b>: The following online settings parameters were intended for internal use in our Portal application only. They will be deprecated on <b>OCTOBER 15, 2022</b>. These fields are currently part of the <b>SETTINGS</b> object in all location endpoints: <b>businessId, enabled, familyMembersEnabled, serviceLabel, resourceLabel, resourceAnyLabel, resourceSelection, liveMode, formFlow, availabilityForm, showServiceGroups, showOnSchedLogo, showBusinessLogo, disableAuthorization, hideNavBar, hideLocationNav, hideServiceGroupsNav, hideServicesNav, hideContinueBooking, returnToService, returnToAvailability, hideBreadCrumbNav.</b> If you are using these fields, please adjust your code to handle the deprecation or let us know by submitting a ticket to: <b><i>support@onsched.com</i></b> as we do not want to interrupt your existing workflows.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/LocationInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/LocationInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/LocationInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/LocationInputModel"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationViewModel"}}},"description":"Success"}},"summary":"Create Location","tags":["Locations"]}},"/setup/v1/locations/bulk":{"post":{"description":"<p>Use this endpoint to <b>Create Bulk</b> business locations. The posted list of locations cannot exceed 100 location objects per transaction for performance purposes. The result is a list of new business location objects with a GUID assigned to each location.</p>\r\n<p>The <b>name</b> and <b>timezoneName</b> fields are required. The <b>timezoneName</b> must be expressed as an IANA Timezone e.g., <i>America/New_York</i>. Refer to: <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">Timezone Wiki</a> for a listing of IANA time zones.</p>\r\n<p>\r\n <b>Business hours</b> are set by defining the <b>startTime</b> and <b>endTime</b> values for each day available/open. All days of the week must be provided when setting availability. Days are defined as <b>sun, mon, tue, wed, thu, fri and sat</b>. Start and End Times are entered in <b>military format. e.g., 800 is 8:00am, 2230 is 10:30pm</b>. If there is no physical location and the business hours are irrelevant, set the hours to open 24 hours by setting startTime=0 and endTime=2400. To set a whole day as unavailable, set both the startTime and endTime to 0. </p>\r\n<p>\r\n <b>Settings</b> can be set here. Booking timer minutes, book ahead restrictions and customer bookings per day are all available here. Please read about the settings scope parameter before setting these values as it may simplify your process.</p>\r\n<p>\r\n <b>Settings Scope</b> can be set to the company or the business location level. You can have all locations use the same company level settings or individual business locations can define their own, business location scope. If you want to use the company settings throughout all locations, do not pass in <b>settings element</b>. To create business location scoped settings, pass in the <b>settings element</b> with the field values defined in the post body. </p>\r\n<p>\r\n <b>Appointment Reminders</b> Reminder values are used to define how many hours, days, or weeks (interval value) prior to the appointment to send the reminder. <b>Interval</b> values are used to define the reminder interval: <b>1 = Hours</b>, <b>2 = Days</b> and <b>3 = Weeks</b>. The reminder fields are numbers. If you are using the hours interval, use a number from 1 to 24.</p>\r\n<p>Example 1: <b>emailFirstReminder: 1, emailFirstReminderInterval: 2</b> - results in 1st reminder being sent <b>1 Day before</b> the appointment time.</p>\r\n<p>Example 2: <b>emailSecondReminder: 3, emailSecondReminderInterval: 1</b> - results in 2nd reminder being sent <b>3 Hours before</b> the appointment time.</p>\r\n<p>\r\n <b>IMPORTANT DEPRECATION NOTICE</b>: The following online settings parameters were intended for internal use in our Portal application only. They will be deprecated on <b>OCTOBER 15, 2022</b>. These fields are currently part of the <b>SETTINGS</b> object in all location endpoints: <b>businessId, enabled, familyMembersEnabled, serviceLabel, resourceLabel, resourceAnyLabel, resourceSelection, liveMode, formFlow, availabilityForm, showServiceGroups, showOnSchedLogo, showBusinessLogo, disableAuthorization, hideNavBar, hideLocationNav, hideServiceGroupsNav, hideServicesNav, hideContinueBooking, returnToService, returnToAvailability, hideBreadCrumbNav.</b> If you are using these fields, please adjust your code to handle the deprecation or let us know by submitting a ticket to: <b><i>support@onsched.com</i></b> as we do not want to interrupt your existing workflows.</p>","requestBody":{"content":{"application/*+json":{"schema":{"$ref":"#/components/schemas/LocationsInputModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/LocationsInputModel"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/LocationsInputModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/LocationsInputModel"}}}},"responses":{"200":{"content":{"application/js