Hyvä Theme is Now Open Source: What This Means for Magento Community - Mageplaza
Hyvä is now Open Source and free. Discover what changed, what remains commercial, how it impacts the Magento ecosystem, and how to maximize its full potential.
Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy
Cookie PolicyThese cookies are strictly necessary for the site to work and may not be disabled.
InformationThese cookies are strictly necessary for the site to work and may not be disabled.
| Cookie name | Description | Lifetime | Provider |
|---|---|---|---|
| _ce.clock_data | Store the difference in time from the server's time and the current browser. | 1 day | Crazy Egg |
| _ce.clock_event | Prevent repeated requests to the Clock API. | 1 day | Crazy Egg |
| _ce.irv | Store isReturning value during the session | Session | Crazy Egg |
| _ce.s | Track a recording visitor session unique ID, tracking host and start time | 1 year | Crazy Egg |
| _hjSessionUser_2909345 | Store a unique user identifier to track user sessions and interactions for analytics purposes. | 1 year | HotJar |
| _hjSession_2909345 | Store session data to identify and analyze individual user sessions. | 1 day | HotJar |
| apt.uid | Store a unique user identifier for tracking and personalization. | 1 year | Mageplaza |
| cebs | Store user preferences and settings. | Session | Mageplaza |
| cf_clearance | Store a token that indicates a user has passed a Cloudflare security challenge. | 1 year | Cloudflare |
| crisp-client | The crisp-client/session cookie is used to identify and maintain a user session within the Crisp platform. It allows the live chat system to recognize returning users, maintain chat history, and ensure continuity in customer service interactions. | Session | Crisp |
| _ga | Store a unique client identifier (Client ID) for tracking user interactions on the | 2 years | |
| _ga_7B0PZZW26Z | Store session state information for Google Analytics 4. | 2 years | |
| _ga_JTRV42NV3L | Store session state information for Google Analytics 4. | 2 years | |
| _ga_R3HWQ50MM4 | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 2 years | |
| _gid | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 1 day | |
| _gat_UA-76130628-1 | Throttle the request rate to Google Analytics servers. | 1 day |
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
InformationAdvertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
| Cookie name | Description | Lifetime | Provider |
|---|---|---|---|
| _gcl_au | The cookie is used by Google to track and store conversions. | 1 day | |
| __Secure-3PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
| HSID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
| __Secure-1PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
| SID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
| APISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
| __Secure-1PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
| __Secure-3PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
| SSID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
| SAPISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
| __Secure-3PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
| __Secure-1PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
| SIDCC | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data, and protect visitor data from unauthorized access. | 3 months | |
| __Secure-1PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
| __Secure-3PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
| 1P_JAR | This cookie is a Google Analytics Cookie created by Google DoubleClick and used to show personalized advertisements (ads) based on previous visits to the website. | 1 month | |
| NID | Show Google ads in Google services for signed-out users. | 6 months |
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
InformationAnalytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
| Cookie name | Description | Lifetime | Provider |
|---|---|---|---|
| _dc_gtm | Manage and deploy marketing tags through Google Tag Manager. | 1 year | |
| 1P_JAR | Gather website statistics and track conversion rates for Google AdWords campaigns. | 1 month | |
| AEC | 1 month | ||
| ar_debug | Debugging purposes related to augmented reality (AR) functionalities. | 1 month | Doubleclick |
| IDE | The IDE cookie is used by Google DoubleClick to register and report the user's actions after viewing or clicking on one of the advertiser's ads with the purpose of measuring the effectiveness of an ad and to present targeted ads to the user. | 1 year | Doubleclick |
| ad_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to advertising. | 1 year | |
| ad_user_data | Sets consent for sending user data to Google for online advertising purposes. | 1 year | |
| ad_personalization | Sets consent for personalized advertising. | 1 year | |
| analytics_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration. | 1 year |
Vinh Jacker | 03-17-2025
In Magento 2, you can call API to get all products with ease. Several REST calls return thousands or even hundreds of parameters. And parsing through all this data can sometimes be cumbersome.
Moreover, mobile app developers may find the bandwidth is necessary to process an unreasonable request. To handle these issues, a query parameter-based syntax for REST requests is provided, that returns partial responses.
<host>/rest/<store_code> can be replaced by your website.
The searchCriteria query parameter enables you to search across multiple objects which are in a collection. The fields query parameter can be used in conjunction with searchCriteria to limit the output. The question mark (?) which precedes fields in all examples in this document will be replaced with an ampersand (&).
Get All Products, Orders, Categories
Only the sku and name parameters for product items whose category_gear attribute includes the value 86 are returned by the following query.
GET <host>/rest/<store_code>/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=category_gear&searchCriteria[filter_groups][0][filters][0][value]=86&searchCriteria[filter_groups][0][filters][0][condition_type]=finset&fields=items[sku,name]
{
"items":
{
"sku": "24-MG04"
"name": "Aim Analog Watch"
}
{
"sku": "24-MG01"
"name": "Endurance Watch"
}
{
"sku": "24-MG03"
"name": "Summit Watch"
}
{
"sku": "24-MG05"
"name": "Cruise Dual Analog Watch"
}
{
"sku": "24-MG02"
"name": "Dash Digital Watch"
}
{
"sku": "24-WG09"
"name": "Luma Analog Watch"
}
{
"sku": "24-WG01"
"name": "Bolo Sport Watch"
}
{
"sku": "24-WG03"
"name": "Clamber Watch"
}
{
"sku": "24-WG02"
"name": "Didi Sport Watch"
}
}
Limit 20 items per page: /V1/products?searchCriteria[pageSize]=20
You can view more about catalog API in here
GET <host>/rest/<store_code>/V1/products/MT12?fields=name,sku,extension_attributes[category_links,stock_item[item_id,qty]]
{
"sku": "MT12"
"name": "Cassius Sparring Tank"
"extension_attributes": {
"category_links": {
"position": 1
"category_id": "18"
}
"stock_item": {
"item_id": 732
"qty": 0
}
}
}
The above example returns the following results:
sku and name of the productcategory_links object. This is defined in extension_attributesstock_item object’s item_id and qty fields. These are also defined in extension_attributesGET <host>/rest/<store_code>/V1/orders/2?fields=billing_address,customer_firstname,customer_lastname
{
"customer_firstname": "Veronica"
"customer_lastname": "Costello"
"billing_address": {
"address_type": "billing"
"city": "Calder"
"country_id": "US"
"customer_address_id": 1
"email": "[email protected]"
"entity_id": 4
"firstname": "Veronica"
"lastname": "Costello"
"parent_id": 2
"postcode": "49628-7978"
"region": "Michigan"
"region_code": "MI"
"region_id": 33
"street": "6146 Honey Bluff Parkway"
"telephone": "(555) 229-3326"
}
}
The above example returns the first name and last name of customer as well as the entire billing_address object from a specified order.
When you want all contents of the object to be returned, do not add brackets [] after an object name.
POST <host>/rest/<store_code>/V1/categories?fields=id,parent_id,name
Payload
{
"category": {
"name": "New Category",
"is_active": true
}
}
Response
{
"id": 43,
"parent_id": 2,
"name": "New Category"
}
The above POST operation and payload is for creating a catalog category named New Category. In here only the id, parent_id, and name attributes are returned.
In today post, I have just guided you on how to call API to get All Products, Orders, and Categories in Magento 2. I hope it would be helpful. In case you have any questions or new ideas, feel free to leave a comment below.
Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.
Related Post
Hyvä Theme is Now Open Source: What This Means for Magento Community - Mageplaza
Hyvä is now Open Source and free. Discover what changed, what remains commercial, how it impacts the Magento ecosystem, and how to maximize its full potential.
Holiday Marketing Hacks 2025 - How to Boost Sales for Magento 2 Stores? - Mageplaza
Discover the best 2025 holiday marketing strategies for Magento 2. Learn key trends, creative campaign ideas, and expert tips to increase seasonal sales.
Hyvä Theme is Now Open Source: What This Means for Magento Community - Mageplaza
Hyvä is now Open Source and free. Discover what changed, what remains commercial, how it impacts the Magento ecosystem, and how to maximize its full potential.
Holiday Marketing Hacks 2025 - How to Boost Sales for Magento 2 Stores? - Mageplaza
Discover the best 2025 holiday marketing strategies for Magento 2. Learn key trends, creative campaign ideas, and expert tips to increase seasonal sales.