Docs/Products

Products

Manage your product catalog. Products are what the AI agent shows to customers and what appears on your storefront.

Create a Product

POST/v1/products
ParameterTypeDescription
name
Required
stringProduct name. Max 120 characters.
price
Required
integerPrice in the smallest currency unit (e.g., kobo for NGN). 350000 = ₦3,500.
currency
Optional
stringISO 4217 code. Defaults to your account currency (e.g., 'NGN').
description
Optional
stringProduct description. The AI uses this to answer questions about the product.
category
Optional
stringCategory name for grouping.
image_url
Optional
stringURL to the product image.
in_stock
Optional
booleanWhether the product is available. Default true.
metadata
Optional
objectArbitrary key-value pairs.
curl
curl -X POST https://api.handl-ng.com/v1/products \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jollof Rice (Large)",
    "price": 350000,
    "description": "Party-style jollof with grilled chicken and plantain",
    "category": "Mains",
    "in_stock": true
  }'
javascript
const product = await fetch('https://api.handl-ng.com/v1/products', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Jollof Rice (Large)',
    price: 350000,
    description: 'Party-style jollof with grilled chicken and plantain',
    category: 'Mains',
    in_stock: true,
  }),
}).then(r => r.json());

Response

json
{
  "id": "prod_jollof",
  "object": "product",
  "name": "Jollof Rice (Large)",
  "price": 350000,
  "formatted_price": "₦3,500",
  "currency": "NGN",
  "description": "Party-style jollof with grilled chicken and plantain",
  "category": "Mains",
  "image_url": null,
  "in_stock": true,
  "created_at": "2025-06-15T14:30:00Z",
  "updated_at": "2025-06-15T14:30:00Z"
}

List Products

GET/v1/products
ParameterTypeDescription
category
Optional
stringFilter by category name.
in_stock
Optional
booleanFilter by availability.
search
Optional
stringFull-text search across name and description.
limit
Optional
integerNumber of results (1–100). Default 25.
starting_after
Optional
stringCursor for pagination.
curl
curl "https://api.handl-ng.com/v1/products?category=Mains&in_stock=true" \
  -H "Authorization: Bearer sk_live_..."

Update a Product

PATCH/v1/products/:id

Update any product field. Only the fields you include in the request body will be changed.

curl
curl -X PATCH https://api.handl-ng.com/v1/products/prod_jollof \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "price": 400000, "in_stock": false }'

Delete a Product

DELETE/v1/products/:id
⚠️
Deleting a product removes it from your catalog and storefront. Existing orders that reference this product are not affected — the product snapshot is preserved on the order.
curl
curl -X DELETE https://api.handl-ng.com/v1/products/prod_jollof \
  -H "Authorization: Bearer sk_live_..."

Response

json
{
  "id": "prod_jollof",
  "object": "product",
  "deleted": true
}
💡
The AI agent automatically learns about new and updated products. After creating or modifying a product via the API, the agent can immediately reference it in conversations.