List Products
curl --request GET \
--url https://api.khaime.com/api/v1/products \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.khaime.com/api/v1/products"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.khaime.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.khaime.com/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.khaime.com/api/v1/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.khaime.com/api/v1/products")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.khaime.com/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Products retrieved successfully",
"data": {
"products": [
{
"id": 12345,
"title": "Premium T-Shirt",
"slug": "premium-t-shirt",
"description": "High-quality cotton t-shirt",
"type": "physical_product",
"price": 2999,
"currency": "USD",
"is_published": true,
"images": [
{
"url": "https://cdn.khaime.com/...",
"alt": "Premium T-Shirt"
}
],
"variations": [...],
"currency_conversion_details": {
"currency": "USD",
"source_currency": "USD",
"exchange_rate": 1
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45
}
}
}
Commerce API
List Products
Get all products for your business
GET
/
products
List Products
curl --request GET \
--url https://api.khaime.com/api/v1/products \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.khaime.com/api/v1/products"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.khaime.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.khaime.com/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.khaime.com/api/v1/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.khaime.com/api/v1/products")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.khaime.com/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Products retrieved successfully",
"data": {
"products": [
{
"id": 12345,
"title": "Premium T-Shirt",
"slug": "premium-t-shirt",
"description": "High-quality cotton t-shirt",
"type": "physical_product",
"price": 2999,
"currency": "USD",
"is_published": true,
"images": [
{
"url": "https://cdn.khaime.com/...",
"alt": "Premium T-Shirt"
}
],
"variations": [...],
"currency_conversion_details": {
"currency": "USD",
"source_currency": "USD",
"exchange_rate": 1
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45
}
}
}
List Products
Returns a paginated list of all published products for your business.Request
string
required
Your API key
Query Parameters
string
Filter by product type:
physical_product, digital, or gift_cardinteger
Filter by product category ID
string
Filter by category slug or name. Comma-separated for multiple.
string
default:"updatedAt"
Field to sort by
string
default:"DESC"
Sort order: “ASC” or “DESC”
integer
default:"20"
Items per page (max 100)
integer
default:"0"
Number of products to skip, for pagination
This endpoint does not convert prices. Every product comes back in its base currency, and a
currency parameter is ignored. See Displaying prices in multiple currencies.Response
{
"status": true,
"message": "Products retrieved successfully",
"data": {
"products": [
{
"id": 12345,
"title": "Premium T-Shirt",
"slug": "premium-t-shirt",
"description": "High-quality cotton t-shirt",
"type": "physical_product",
"price": 2999,
"currency": "USD",
"is_published": true,
"images": [
{
"url": "https://cdn.khaime.com/...",
"alt": "Premium T-Shirt"
}
],
"variations": [...],
"currency_conversion_details": {
"currency": "USD",
"source_currency": "USD",
"exchange_rate": 1
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45
}
}
}
Displaying prices in multiple currencies
List Products gives you the catalog in each product’s base currency. To show prices in the customer’s currency:- Load the supported codes once from Get Currencies.
- Default to the customer’s local currency, detected from their IP, and let them change it. Get Currencies explains how.
- Fetch each product’s converted price with Get Product
(
GET /product/{id}?currency=NGN) or Get Product Pricing. Cache the results per currency — rates only need refreshing every few minutes.
Example
curl "https://api.khaime.com/api/v1/products?limit=10" \
-H "X-API-Key: pk_live_your_api_key"
