List Products
Retrieve a list of all products with optional filtering
GET
/
api
/
v2
/
products
List Products
curl --request GET \
--url https://api.example.com/api/v2/productsimport requests
url = "https://api.example.com/api/v2/products"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/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.example.com/api/v2/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v2/products"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v2/products")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyList Products
Returns a paginated list of products, ordered by creation date (most recent first). Supports filtering by status, eligibility, and more.Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results per page (default: 10, max: 100) |
starting_after | integer | Cursor for pagination (product ID) |
status | enum | Filter by status: active, inactive, archived |
hsa_fsa_eligible | boolean | Filter by HSA/FSA eligibility (true/false) |
merchant_product_id | string | Filter by your product ID |
created_after | timestamp | Filter products created after this date |
created_before | timestamp | Filter products created before this date |
Request
GET /api/v2/products?limit=10&status=active
Response
{
"data": [
{
"id": 12345,
"name": "Digital Blood Pressure Monitor",
"tagline": "FDA-approved automatic BP monitor",
"price": 4995,
"currency": "USD",
"merchant_product_id": "BP-MONITOR-001",
"status": "active",
"eligibility": {
"hsa_fsa_eligible": true,
"message": "SIGIS verified - Medical device"
},
"images": [
{
"id": 567,
"url": "https://cdn.example.com/bp-monitor.jpg",
"is_primary": true
}
],
"created_at": "2025-10-18T14:30:00Z"
},
{
"id": 12346,
"name": "Digital Thermometer",
"price": 2995,
"currency": "USD",
"merchant_product_id": "THERM-001",
"status": "active",
"eligibility": {
"hsa_fsa_eligible": true,
"message": "SIGIS verified - Medical device"
},
"created_at": "2025-10-17T10:00:00Z"
}
],
"has_more": true,
"next_cursor": 12346
}
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of product objects |
has_more | boolean | Whether more results are available |
next_cursor | integer | Cursor for next page (use as starting_after) |
Examples
List All Products
curl https://api.withgale.com/api/v2/products \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Filter by Status
curl "https://api.withgale.com/api/v2/products?status=active&limit=50" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Filter by HSA/FSA Eligibility
curl "https://api.withgale.com/api/v2/products?hsa_fsa_eligible=true" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Pagination
Use cursor-based pagination for large datasets. Pass thenext_cursor value from the previous response as the starting_after parameter:
curl "https://api.withgale.com/api/v2/products?limit=100&starting_after=12345" \
-H "Authorization: Bearer glm_test_YOUR_API_KEY"
Errors
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid query parameters |
| 401 | unauthorized | Invalid or missing API key |
| 429 | rate_limit_exceeded | Too many requests |
{
"error": {
"code": "invalid_request",
"message": "Invalid status value",
"param": "status"
}
}
Related Endpoints
- Create Product - POST /api/v2/products
- Get Product - GET /api/v2/products/
- Update Product - PUT /api/v2/products/
- Check Eligibility - POST /api/v2/products/check-eligibility
Related Resources
โI
List Products
curl --request GET \
--url https://api.example.com/api/v2/productsimport requests
url = "https://api.example.com/api/v2/products"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/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.example.com/api/v2/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v2/products"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v2/products")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body