Create Product
Add a new product to your catalog with automatic HSA/FSA eligibility detection
POST
/
api
/
v2
/
products
Create Product
curl --request POST \
--url https://api.example.com/api/v2/productsimport requests
url = "https://api.example.com/api/v2/products"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
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 => "POST",
]);
$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("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("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::Post.new(url)
response = http.request(request)
puts response.read_bodyCreate Product
Create a new product in your catalog. Gale automatically checks HSA/FSA eligibility via the SIGIS database using the productβs UPC code or name.Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Request Body
{
"name": "Digital Blood Pressure Monitor",
"tagline": "FDA-approved automatic BP monitor",
"description": "Clinically validated blood pressure monitor with Bluetooth connectivity. Features automatic inflation, irregular heartbeat detection, and memory for 200 readings. Includes carrying case and 4 AAA batteries.",
"price": 4995,
"currency": "USD",
"merchant_product_id": "BP-MONITOR-001",
"upc_code_or_gtin": "14567890123456",
"images": [
"https://cdn.example.com/bp-monitor-1.jpg",
"https://cdn.example.com/bp-monitor-2.jpg"
],
"metadata": {
"category": "medical_devices",
"brand": "HealthTech Pro",
"weight": "0.5 lbs"
}
}
Parameters
All monetary amounts are integers in cents (e.g., 4995 = $49.95).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Product name (max 255 chars) |
tagline | string | No | Short description (max 255 chars) |
description | string | No | Full product description (supports markdown) |
price | integer | Yes | Price in cents (e.g., 4995 = $49.95) |
currency | string | Yes | ISO 4217 currency code (e.g., βUSDβ) |
merchant_product_id | string | No | Your reference ID for this product |
upc_code_or_gtin | string | No | UPC or GTIN barcode (used for eligibility check) |
images | array | No | Array of image URLs (max 10) |
metadata | object | No | Custom key-value pairs |
Response
{
"id": 12345,
"name": "Digital Blood Pressure Monitor",
"tagline": "FDA-approved automatic BP monitor",
"description": "Clinically validated blood pressure monitor with Bluetooth connectivity. Features automatic inflation, irregular heartbeat detection, and memory for 200 readings. Includes carrying case and 4 AAA batteries.",
"price": 4995,
"currency": "USD",
"merchant_product_id": "BP-MONITOR-001",
"upc_code_or_gtin": "14567890123456",
"status": "active",
"eligibility": {
"hsa_fsa_eligible": true,
"message": "SIGIS verified - Medical device"
},
"images": [
{
"id": 567,
"url": "https://cdn.example.com/bp-monitor-1.jpg",
"is_primary": true
},
{
"id": 568,
"url": "https://cdn.example.com/bp-monitor-2.jpg",
"is_primary": false
}
],
"metadata": {
"category": "medical_devices",
"brand": "HealthTech Pro",
"weight": "0.5 lbs"
},
"created_at": "2025-10-18T14:30:00Z",
"updated_at": "2025-10-18T14:30:00Z"
}
Examples
Basic Product
curl -X POST https://api.withgale.com/api/v2/products \
-H "Authorization: Bearer glm_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Digital Thermometer",
"description": "Fast and accurate digital thermometer",
"price": 2995,
"currency": "USD"
}'
Complete Product with UPC
curl -X POST https://api.withgale.com/api/v2/products \
-H "Authorization: Bearer glm_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Blood Pressure Monitor",
"tagline": "Professional-grade BP monitoring",
"description": "Clinically validated automatic blood pressure monitor with advanced features.",
"price": 4995,
"currency": "USD",
"merchant_product_id": "BP-MONITOR-PRO",
"upc_code_or_gtin": "14567890123456",
"images": [
"https://cdn.example.com/bp-monitor-1.jpg",
"https://cdn.example.com/bp-monitor-2.jpg"
],
"metadata": {
"category": "medical_devices",
"brand": "HealthTech",
"features": "bluetooth,memory,irregular_detection"
}
}'
Webhooks
Product creation triggers the following webhook event:{
"type": "product.created",
"data": {
"id": 12345,
"name": "Digital Blood Pressure Monitor",
"eligibility": {
"hsa_fsa_eligible": true,
"message": "SIGIS verified - Medical device"
}
}
}
Errors
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Missing or invalid parameters |
| 400 | invalid_price | Price must be positive integer |
| 400 | invalid_currency | Unsupported currency code |
| 401 | unauthorized | Invalid or missing API key |
| 422 | validation_error | Field validation failed |
| 429 | rate_limit_exceeded | Too many requests |
{
"error": {
"code": "validation_error",
"message": "Invalid product data",
"details": [
{
"field": "name",
"message": "Name is required"
},
{
"field": "price",
"message": "Price must be a positive integer"
}
]
}
}
Related
βI
Create Product
curl --request POST \
--url https://api.example.com/api/v2/productsimport requests
url = "https://api.example.com/api/v2/products"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
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 => "POST",
]);
$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("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("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::Post.new(url)
response = http.request(request)
puts response.read_body