19/06/2023  •   6 min read  

In-Depth Analysis of Lazada API Data Sets: Understanding Types and Practical Applications

banner

Technology has transformed almost every sector of the global economy. And it's made our lives more convenient and enjoyable in countless ways. But what's the reality of life behind these flashy interfaces on the backend?

This article will examine data sets from Lazada API, giving a detailed overview of how different types are used and how they could be applied to new technologies. With all this information about API data types available, we hope to help programmers better understand how to build their user-facing applications with minimal code!

Understanding Lazada

Lazada is a popular online shopping platform that became the third largest in Southeast Asia (after eBay and Amazon). It has a user base of over 35 million and last year processed over US$9.8 billion worth of sales.

Lazada API is used to access these services through an API. It allows users to search, browse and shop directly from their applications. In addition to delivering the information they want, it enables them to stay up-to-date with deals and offers available on the platform.

Lazada API

banner

The Lazada API is built on REST architecture. It exposes all the methods that can be used to query, update and edit data in the system. It defines the available endpoints and their corresponding return types and specifies how to combine requests and connect responses.

It uses an XML schema to interpret request types sent by the application. This schema is used by all clients on our side (both local and remote). The schema contains all the information about a request type, including the relationship between elements in an individual field, so we can provide correct sorting criteria when searching data sets.

Lazada APIs are well-documented with clear and descriptive endpoints. They are used as examples for other APIs on the platform. This means that developers can understand what they will be working with when building their applications, especially given the wide variety of data types available on a single request.

Basic Data Types

This article will look at two data types available on Lazada API: User and Item. They can both contain hyperlinks to more extensive fields, and the links allow developers to access additional information related to a product or user.

1. User is a generic field.

This means it can contain any information about the user (zip code, phone number, email, etc., in a long list). It can also contain more specific data like the last time they visited the platform (only to track how often they return to it).

All items in a search result can be linked to user profiles. This means we can retrieve the user's details, item history, and related transactions from this primary field. In addition, we could query for specific users and items. In this case, we would have an item's ID instead of a user's ID since items comprise multiple user orders.

2. Item

It is also a flexible field but has different uses than Users. On the Lazada Data Scraping , an item represents an individual product from any category (from clothing accessories to furniture).

Apart from delivery and price details, the item field can contain a product ID and a link to the product page of its official Marketplace website. This means we could get more information about products without leaving our application.

There are two other fields in this category: Item Location and Item Image. These fields can be considered child fields, accessing the item's primary location (Country, Province, City) and its primary image, respectively.

3. Item Location:

This is currently a test field on Lazada API, but it can be linked to the Item field just like a child pointer field in Microsoft Excel (a drop-down menu for users to select their country, for example).

4. Item Image:

This field is used to access images of the product. The Marketplace website contains the most recent image (two variants are available) when a product is searched from a category or after it has been linked to an item in the solution. In both cases, the image will be displayed on the application's interface, and we can access additional information about it in our code.

5. Hyperlinked Data Sets

In addition to these fields, there are other data types as well. These are covered in depth in another article, but they should be mentioned here as they appear more than once in any request. They can be broken down into object identifiers and resource pointers.

6. Object Identifiers:

They are used to define different types of objects that Lazada API returns. The most common is the identifier for each item (an id field in any request). We could get information about an individual product's delivery and price details using the Item IDs. In addition, there are other identifiers for data fields like Item Image and Item Location.

7. Resource Pointers:

These fields reference other resources accessed through relative URLs (relative to a request URL). We will look at two resource pointers in this article: User and Marketplace Image. These will both refer to the same information on an entirely different server but will have unique ID values attached to them on a single request. These values enable us to track the items we are interested in and related user details.

Types of Lazada API Data Sets

The data source we will work with today is called Secure Ordering Data. It contains the list of orders, their individual items, and the various information related to them. We could use this data source to retrieve the list of user orders and check how many were successful or failed.

Since a Data set may be regarded as a table in a database, items on it can be considered rows (tuples) containing different fields. Similarly, rows can contain objects used in related requests, like item IDs or image links used to retrieve additional information about items on an order.

Most fields can contain either text or numbers, but other fields like User ID, Shipping Address, and Credit Card Numbers may contain sensitive data. For this reason, it is mandatory to use SSL (Secure Sockets Layer) to connect to the database. Since Lazada API uses HTTPS (as well as HTTPS in requests) for all endpoints by default, the application will automatically use SSL for all connections to the API.

Types of Datasets

1. User Order Data:

The first dataset we will look at is the User Order Data set. It is a data set containing user orders with their item information (e.g., title, images, description, and price). This dataset can be accessed through two different methods: one for retrieving orders and another for accepting new orders (adding them to the platform).

2. Item Data:

This data source is used to retrieve product information from the Marketplace website through several requests like Item Details or Item Category Lists. The platform provides a wide variety of resources on this field, such as more detailed item information, its category, and price, etc., which we will not discuss in any detail here.

3. Marketplace Data:

This data set contains all the information displayed on a seller's user profile, such as his/her name, image, address, etc. This dataset can be used to see where the seller is located and how many orders he/she has placed on Lazada.

Lazada API uses Secure Ordering Data for most requests, but if you want to store information on your own database (not through the platform), you will need to use the Community Data set or your own credentials instead.

4. Community Data:

This data set contains all user and item information the developer may require, but the platform does not use it in any of its requests. It can be used to build an application that focuses on user details, payment accounts, and even those that deal with products outside of Lazada.

5. CVV Numbers:

CVV numbers are credit card security codes that block and approve credit card-based orders.

They can be retrieved through the Card Verification Service (CVS) Data set using a trick we will discuss in another article. You should not use this field since it is not safe to store credit card information on any platform (even more so if you are a third-party developer).

6. Shipping Address:

This data source contains any address information needed for delivery, so the Marketplace platform can collect it for the seller. This information is optional for orders, but sellers may use them to ship their products to buyers (especially on business-to-business transactions).

7. Orders:

This data set represents the complete list of orders placed by users. Since it is an unsecured data set, we will not discuss it any further in this article.

8. Marketplace Orders:

This data source contains a list of all the orders placed on the Lazada website, including their details and images. It can be used to see which items are more popular among users and how much they have been sold over time (e.g., information about limited-edition products).

Conclusion:

Lazada API provides us with various services we can integrate into our application. These are used by the platform and sellers to store data, provide new features, and manage orders. In this article, we briefly looked at the structure of the data sets and how they can be accessed using Requests. We also covered each type of data set in detail and its usage for building applications on top of them.


Web Scraping

Get A Quote