Products API

Create, retrieve, update, and manage products via the API.

When should I read this?

Read this if you need to programmatically manage your product catalog.

Endpoints

Method Endpoint Description
GET /v1/products List all products
POST /v1/products Create a product
GET /v1/products/:id Retrieve a product
PATCH /v1/products/:id Update a product
DELETE /v1/products/:id Archive a product

The Product object

{
  "id": "prod_abc123",
  "name": "Pro Plan",
  "description": "Full-featured subscription",
  "status": "active",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "metadata": {}
}

Create a product

curl https://api.floatless.com/v1/products \
  -H "Authorization: Bearer fl_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Plan",
    "description": "Full-featured subscription"
  }'

Parameters

Parameter Type Required Description
name string Yes Product name
description string No Product description
metadata object No Custom key-value data

List products

curl https://api.floatless.com/v1/products \
  -H "Authorization: Bearer fl_live_..."

Query parameters

Parameter Type Description
status string Filter by status (active, archived)
limit integer Number of results (default 20, max 100)
offset integer Pagination offset

Retrieve a product

curl https://api.floatless.com/v1/products/prod_abc123 \
  -H "Authorization: Bearer fl_live_..."

Update a product

curl https://api.floatless.com/v1/products/prod_abc123 \
  -H "Authorization: Bearer fl_live_..." \
  -H "Content-Type: application/json" \
  -X PATCH \
  -d '{
    "name": "Pro Plan (Updated)"
  }'

Archive a product

curl https://api.floatless.com/v1/products/prod_abc123 \
  -H "Authorization: Bearer fl_live_..." \
  -X DELETE

Archiving hides the product from new subscriptions but preserves history.

Next steps