Skip to content

Create

POST/products

Creates a product.

Body ParametersJSONExpand Collapse
code: string

Unique product code.

description: optional string

Product description.

ReturnsExpand Collapse
data: Product { id, code, created, 3 more }

Product object.

id: string

FRAGMENT generated unique ID.

code: string

Product code.

created: string

Timestamp when the product was created. Uses ISO 8601 format.

formatdate-time
update_version: number

Current version of the product.

workspace_id: string

Workspace ID of the product.

description: optional string

Product description.

Create

curl https://api.us-west-2.fragment.dev/billing/products \
    -H 'Content-Type: application/json' \
    -d '{
          "code": "PROD_001",
          "description": "Premium subscription service"
        }'
{
  "data": {
    "id": "product_1234567890",
    "code": "PROD_001",
    "created": "2024-01-13T00:00:00Z",
    "update_version": 1,
    "workspace_id": "ws_1234567890",
    "description": "Premium subscription service"
  }
}
Returns Examples
{
  "data": {
    "id": "product_1234567890",
    "code": "PROD_001",
    "created": "2024-01-13T00:00:00Z",
    "update_version": 1,
    "workspace_id": "ws_1234567890",
    "description": "Premium subscription service"
  }
}