Many friends were already very proficient in the business they were doing when they first became product managers, but they still inevitably heard complaints from developers: "Why are there so many demands lined up and so many interfaces can't be completed!" The product manager only said Can you express with a confused look: Interface? What it is? Haven't I already written down my page functions in detail in the document?
In fact, at the system level, in addition to visible content such as copywriting and buttons, there are also many logical chains hidden under the content - interfaces, which we often call APIs . This article will help you better understand and use APIs based on the basic knowledge of APIs and the specific business scenarios of product managers, so that you can cooperate more efficiently with developers.
What is API?
API, or Application Program Interface, is a set of defined rules that enable different applications to communicate with each other. It acts as a middle layer that handles data transfer between systems, enabling companies to open their application data and functionality to external third-party developers, business partners, and internal company departments.
Image source: CSDN@tbprice
How the API works is actually easy to understand. We can easily understand how the API works by explaining it through WeChat payment. When we order takeout, the system will prompt us to "use WeChat payment" or other types of third-party payment methods. This payment function relies on API to complete. When we click on the payment button, an API call is made to retrieve the information (also called a request). The request is handled from the application to the Web server via the API's Uniform Resource Identifier (URI), which includes the request verb, headers, and sometimes the request body.
After receiving a valid request from the product web page, the API calls an external program or web server, that is, a third-party payment system. The server sends a response to the API containing the requested information. The API transfers data to the initial requesting application, in this case the product website. Although the data transfer varies depending on the web service used, requests and responses all occur through the API. These transfers are not visible to the user interface, which means that the API exchanges data within the computer or application and appears to the user to be a silky, seamless connection.
How are APIs classified?
As the communication scenarios change, the classification dimensions of APIs will also be different:
- Divided according to API providers: self-owned API, third-party API (for example: identity authentication , SMS service , payment service , AI large model , etc.).
- Divided according to API technical attributes: system API (for example: caching, timing, notification, monitoring, etc.), business API (membership API, product API, content API, transaction API, etc.), platform API (individual login API, search API, AI customer service) API, etc.).
- Divided according to API calling methods: synchronous API, asynchronous API.
- Divided according to API granularity: service APIs (for example: Meituan Takeaway API , Taobao Mall API, JD Express API, etc.), functional APIs (for example: short chain API , location API , enterprise authentication API , etc.).
- Divided according to whether the API is open to the outside world: internal API, open API.
In what scenarios do product managers need to design APIs?
- When developing Internet-based applications (SPA applications, APP applications, small programs, smart device applications, etc.), the technical architecture is basically a client-server model. At this time, the server is basically an API, and the product manager only needs to describe the business. Can.
- When providing technical interfaces to upstream and downstream users, they are basically provided in the form of APIs. At this time, product managers need to design and define APIs.
- When enterprise services are monetized and provided as APIs, product managers need to design APIs, define APIs, price APIs, etc.
In what scenarios will product managers use third-party APIs?
Due to cost factors, data or resource holding factors, technical capability factors, etc., when enterprises develop digital systems, it is impossible for all services to be developed by themselves, nor will they be built using open source code. Extensive use of third-party APIs has become an inevitable choice.
Common basic scenarios, such as login: When designing an application, the most basic function is the user’s login function. Users do not need to register separate accounts in each software, but can use WeChat, QQ, Alipay and other accounts to log in to the application. program. Similar scenarios include KYC authentication , single sign-on, security management, fund collection and payment, social sharing, user communication, etc.
Scenarios using platform resources, such as travel reservations : The basic function of major travel platform software is to aggregate flight and hotel information and display different prices on different dates. Usually this data comes from thousands of websites and homepages, and this service is also completed through API. Similar scenarios include express delivery and logistics , takeout platforms, several major e-commerce platforms, etc. Enterprises must use third-party APIs.
Scenarios using third-party technical capabilities, such as AI large models : AI large models are a new favorite in 24 years. Most companies cannot develop them themselves and will mainly use them. Similar scenarios also include cloud computing technology, blockchain technology , big data technology, storage technology, etc.
Use enterprise SaaS applications such as CRM : Platforms such as CRM (customer relationship management tools) often include many built-in APIs that allow companies to integrate with the applications they already use, such as messaging, social media, and email applications. This significantly reduces the time spent switching between different applications to perform sales and marketing tasks. Similar scenarios include financial SaaS, human SaaS, office SaaS, marketing SaaS, etc.
How does a product manager write good API product documentation?
The main readers of product PRD are back-end development (RD), front-end development (FE), interaction designers (UI, UE), and testing (QA). They will obtain the work goals they need to complete in the PRD, and use them to Design the basic plan.
In the previous article, we learned API knowledge and had a language to communicate with developers. Now we need to transform this knowledge into a description of our needs so that developers can understand our needs.
The following is a specific case: Suppose we are the product manager of an e-commerce platform and now need to design a new API to implement the function of creating user orders. When writing API product documentation, we need to consider the following aspects.
- Interface function description : First, we need to clarify what the function of this API is, that is, the creation of user orders. Describe the function in detail in the document, including input parameters, output results, etc.
- Parameter description : For the order creation function, parameters such as user information, product information, payment information, etc. may be involved. List all possible parameters in the document, and explain the meaning, type, and whether each parameter is required.
- Request examples : Provide several specific request examples to show how developers call the API to implement the order creation function. Examples should cover parameter combinations in different situations to ensure clear understanding by developers.
- Return result : Describes what kind of return result will be obtained after calling the API, including success and failure. In the case of success, the returned order information should be described in detail; in the case of failure, the reason for the failure should be explained.
- Error code definition : Define possible error codes and their meanings so that developers can quickly locate problems based on the error codes when calling APIs.
- Security considerations : For APIs that involve sensitive information such as user privacy or payment, security needs to be considered. Explain in the document how to ensure the security of user information, such as using the HTTPS protocol, parameter encryption, etc.
Through the above detailed description, product managers can write clear and complete API product documentation, effectively communicate requirements to developers, and ensure that they can correctly implement the required functions.
How to communicate with the development team about API?
Uniform standards
Communication is a must for the project. Before connecting with development partners, product managers should pay attention to unifying standards and methods for better modification and follow-up.
unified platform
With the help of modern platforms such as iPaaS platform and API gateway, enterprises first establish implementation consistency at the underlying technical level, leverage platform capabilities, ignore technical complexity, and focus on the business itself.
unified tool
When technical personnel carry out API design, they can use API design tools to enable product managers, developers, and testers to communicate, program, upgrade, and maintain on a common view.
The pirated resources of "Qing Yu Nian 2" were uploaded to npm, causing npmmirror to have to suspend the unpkg service. Zhou Hongyi: There is not much time left for Google. I suggest that all products be open source. Please tell me, time.sleep(6) here plays a role. What does it do? Linus is the most active in "eating dog food"! The new iPad Pro uses 12GB of memory chips, but claims to have 8GB of memory. People’s Daily Online reviews office software’s matryoshka-style charging: Only by actively solving the “set” can we have a future. Flutter 3.22 and Dart 3.4 release a new development paradigm for Vue3, without the need for `ref/reactive `, no need for `ref.value` MySQL 8.4 LTS Chinese manual released: Help you master the new realm of database management Tongyi Qianwen GPT-4 level main model price reduced by 97%, 1 yuan and 2 million tokens