API Model for Uber Service

Understand the endpoints and message format for the Uber API.

In this lesson, we’ll learn about the most interesting part of our design: defining the API endpoints for our functional requirements. Moreover, we’ll familiarize ourselves with the request–response structure of the Uber API calls.

Let's start by defining the base URL for our Uber API.

Base URL and API endpoints

The base URL for the Uber API comprises the protocol (https), domain (api.uber.com), and version (v1.0) as depicted in the following illustration. We have a placeholder for services towards the end of the path, which can be changed according to our functional requirements.

Press + to interact
The base URL for Uber API
The base URL for Uber API

Each Uber service contains multiple functionalities, and each function is identified by its path. The following diagram lists the endpoints and methods available through the Uber service:

API URIs for different features of Uber service

We have already covered the message format for payments and chat in different chapters of this course. We'll discuss the message formats for the rides and trips services since they are unique to this design problem.

Message format for API endpoints

In this section, we’ll discuss the data entities and the request–response structures for the ...

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.