Documentation Index
Fetch the complete documentation index at: https://docs.withgale.com/llms.txt
Use this file to discover all available pages before exploring further.
Update Product
Update product details including price, description, images, and metadata. Changes to UPC code will trigger a new eligibility check.
Authentication
Authorization: Bearer glm_test_YOUR_API_KEY
Path Parameters
| Parameter | Type | Required | Description |
|---|
id | integer | Yes | Product ID |
Request Body
{
"name": "Premium Blood Pressure Monitor",
"tagline": "Professional-grade automatic BP monitoring",
"description": "Updated description with new features",
"price": 5495,
"images": [
"https://cdn.example.com/bp-monitor-updated.jpg"
],
"metadata": {
"category": "medical_devices",
"brand": "HealthTech Pro",
"version": "2.0"
}
}
Parameters
All parameters are optional. Only include fields you want to update.
| Parameter | Type | Description |
|---|
name | string | Product name (max 255 chars) |
tagline | string | Short description (max 255 chars) |
description | string | Full product description |
price | integer | Price in cents |
currency | string | ISO 4217 currency code |
merchant_product_id | string | Your reference ID |
upc_code_or_gtin | string | UPC or GTIN (triggers eligibility re-check) |
status | enum | active, inactive, or archived |
images | array | Array of image URLs (replaces all existing images) |
metadata | object | Custom key-value pairs (merged with existing) |
All monetary amounts are integers in cents (e.g., 4995 = $49.95).
Request
Response
Returns the updated product object:
{
"id": 12345,
"name": "Premium Blood Pressure Monitor",
"tagline": "Professional-grade automatic BP monitoring",
"description": "Updated description with new features",
"price": 5495,
"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",
"checked_at": "2025-10-18T14:30:00Z"
},
"images": [
{
"id": 569,
"url": "https://cdn.example.com/bp-monitor-updated.jpg",
"is_primary": true
}
],
"metadata": {
"category": "medical_devices",
"brand": "HealthTech Pro",
"version": "2.0"
},
"created_at": "2025-10-18T14:30:00Z",
"updated_at": "2025-10-18T16:00:00Z"
}
Examples
Update Price
curl -X PUT https://api.withgale.com/v2/products/12345 \
-H "Authorization: Bearer glm_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price": 5495
}'
Update Description and Status
curl -X PUT https://api.withgale.com/v2/products/12345 \
-H "Authorization: Bearer glm_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Enhanced model with improved accuracy and larger display",
"tagline": "Professional-grade BP monitor",
"status": "inactive"
}'
Metadata updates are merged with existing values, not replaced:
// Existing metadata
{
"metadata": {
"category": "medical",
"brand": "HealthTech"
}
}
// Update request
{
"metadata": {
"inventory": 50
}
}
// Result (merged)
{
"metadata": {
"category": "medical",
"brand": "HealthTech",
"inventory": 50
}
}
To remove a metadata field, set it to null:
{
"metadata": {
"old_field": null
}
}
Webhooks
Product updates trigger the following webhook event:
{
"type": "product.updated",
"data": {
"id": 12345,
"name": "Premium Blood Pressure Monitor",
"price": 5495,
"updated_at": "2025-10-18T16:00:00Z"
}
}
See Webhooks Reference for details.
Errors
| Status Code | Error Code | Description |
|---|
| 400 | invalid_request | Invalid parameters |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Product not found |
| 422 | validation_error | Field validation failed |
| 429 | rate_limit_exceeded | Too many requests |
Example error:
{
"error": {
"code": "validation_error",
"message": "Invalid price",
"details": [
{
"field": "price",
"message": "Price must be a positive integer"
}
]
}
}