Introduction
Our Product API allows you to retrieve our current inventory positions and related information; please note that this article will soon be moved to The Qogita Developer Hub.
Key functionalities
Some of the key functionalities are listed below.
-
Retrieve all products currently on sale—to reduce server load, results are paginated in lists of 50
-
Search for a single product by its GTIN
-
Filter products by characteristics, such as the below list
-
Brand
-
Category
-
Prices
-
Margins
-
Discounts
-
Dimensions
-
Popularity
-
You must provide your JWT Access Token for all requests sent to our servers.
Retrieve product details
get https://api.qogita.com/product/:gtin
Code examples
Retrieving information for a single product
Pass the GTIN as a path parameter to return a single product.
Python
import requests as rq
url = "https://api.qogita.com/product/3600523760381"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
response = rq.get(url, headers=headers)
Retrieving information for all products
Retrieve all products at once—results will be paginated by default.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
response = rq.get(url, headers=headers)
Getting data from a specific page (if paginated)
Iterate over pages to retrieve additional information.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"} params = {"page": "2"} # Get results from 2nd page
response = rq.get(url, headers=headers, params=params)
Filtering on brand and category
It is possible to combine filters—for example, if you are only interested in toothpaste from Brand Alpha1, you could input the below example.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
params = {
"brand": "Brand Alpha1", # Works with partial words like "alpha" too
"category": "Toothpaste", # Works with partial words like "paste" too }
response = rq.get(url, headers=headers, params=params)
Filtering on product dimensions
It is possible to provide dimensional ranges - for example, if you are only interested in products that can fit in mailbox parcels, you could implement the below example.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
params = {
"mass_min": "0", # 0 grams minimum
"mass_max": "2000", # 2,000 grams maximum
"height_max": "0.38", # 38cm maximum height
"width_max": "0.265", # 26.5cm maximum width
"depth_max": "0.032", # 3.2cm maximum depth
}
response = rq.get(url, headers=headers, params=params)
Filtering on margin and B2B price
It is possible to filter on margins and B2B purchase price. For example, if you are only interested in buying products cheaper than €15, with at least a 35% margin and a margin of at least €3.25, the example below could help.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
params = {
"b2b_price_max": "15", # €15 maximum b2b price
"margin_min": "0.35", # 35% minimum margin
"margin_value_min": "3.25", # €3.25 minimum margin value
}
response = rq.get(url, headers=headers, params=params)
Filtering on popularity
It is possible to filter on popularity as well—if you only care about the 25% bestselling products, implement the below example below.
Python
import requests as rq
url = "https://api.qogita.com/product"
headers = {"Authorization": f"Bearer {JWT_ACCESS_TOKEN}"}
params = {
"popularity_max": "0.25", # Top 25% bestsellers
}
response = rq.get(url, headers=headers, params=params)
Comments
0 comments
Article is closed for comments.