June 15, 2024

What Is an API Endpoint and How Does It Work?

Unlock the power of APIs by understanding API endpoints—crucial for integrating applications seamlessly. Learn how OnSched's API endpoints, including setup and consumer endpoints, facilitate complex tasks like booking appointments, managing schedules, and onboarding users. Discover the difference between setup and consumer API endpoints and how they work to perform specific actions in OnSched’s scheduling system. Start your journey with OnSched today by booking an intro call to get your sandbox API keys and explore the full API reference for seamless integration.

Productivity

2 Min Read

Application Program Interfaces (APIs) allow different applications to communicate with each other, and with API usage on the rise, it’s important to understand the fundamental and basic dynamics of this technology. One of the surest points of entry into the world of APIs is to understand “endpoints”, which we will cover in this article.

What is an API endpoint?

An API endpoint is a specific “point of entry” in an API and is the most crucial part of an API’s documentation. Endpoints are the web addresses developers use to make API requests. The address or “/path/” is appended to the base URL of an API.

In the case with OnSched, the base URL is https://sandbox-api.onsched.com/ for the sandbox server and https://api.onsched.com/ for the production server. 

An example of an API endpoint would be https://api.onsched.com/consumer/v1/appointments, which creates an appointment in OnSched’s database. Sending a request to this endpoint would require a data payload containing the following information:  

  • Business for which the appointment is being booked; 

  • Customer information;

  • Service type;

  • Time; 

  • Location; 

And various other data points. The API will then respond confirming a successful booking or reporting on an error.

How does an API endpoint work?

A full-featured scheduling system is a very complex application, so OnSched has multiple API endpoints each designed to perform a specific task, like booking an appointment, creating a new customer or updating business hours. You can find the full list of OnSched API endpoints in the API reference

Behind every endpoint is a function that will be executed with the parameters passed by the application and based on the pre-configured actions it will update the database, trigger an email to the customer, make changes to the appointment status or return specific data points. Every API endpoint is expected to return a response back to the web app, even if it’s just an error message.

Difference between Setup and Consumer API endpoints

OnSched endpoints are split into two groups. 

Setup API endpoints are designed for initial account configuration and user onboarding. For example, creating a business location, setting up business hours, physical address and would require using POST ​/setup​/v1​/locations endpoint. 

Consumer API endpoints are designed for availability checks, bookings, cancellations and rescheduling. For example booking an appointment, would require using POST /consumer​/v1​/appointments endpoint and cancelation would be handled by  PUT /consumer​/v1​/appointments​/{id}​/cancel.

Conclusion

The OnSched API endpoints are used by developers to integrate the scheduling system with other applications. Different types of endpoints can be used to access data, create reports, book, reschedule and cancel appointments, check availability and perform a variety of other tasks. Endpoints are like a navigation map for API, and in the case with our scheduling API, we have lots of them - you can find full OnSched API reference here.

How to get access to the OnSched API?

We love to guide our customers through the platform the first time they sign up. So: in order to gain free trial access to the OnSched API, book an intro call with our specialist. We promise it’s pressure-free 😉

  1. Book an intro call & get your sandbox API keys.

  2. Thoughtfully test the API for all of your user flows.

  3. Request production server API keys when ready to go live.

If you have any questions about the OnSched API, we encourage you to book an intro call even if it’s not on your immediate roadmap - let's plan for the future!

Similar Blogs

Stay Informed, Subscribe to Our Newsletter

Learn more about scheduling challenges and why we've been trusted to book over 22M appointments

Learn how to solve complex scheduling solutions

Stay Informed, Subscribe to Our Newsletter

Learn more about scheduling challenges and why we've been trusted to book over 22M appointments

Learn how to solve complex scheduling solutions

Stay Informed, Subscribe to Our Newsletter

Learn more about scheduling challenges and why we've been trusted to book over 22M appointments

Learn how to solve complex scheduling solutions

Home
Logo

Developers

Sign in
Logo
Home
Logo

Developers

Sign in