Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const product = await priceos.products.get("starter");curl -X GET "https://api.priceos.com/v1/products/starter" \
-H "x-api-key: PRICEOS_API_KEY"{
"id": "prod_123",
"key": "starter",
"name": "Starter",
"type": "stripe",
"isDefault": false,
"version": 2,
"stripeProductId": "prod_stripe_123",
"prices": [
{
"id": "price_row_123",
"stripePriceId": "price_monthly_starter",
"currency": "usd",
"unitAmount": 2900,
"recurringInterval": "month",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": true
},
{
"id": "price_row_124",
"stripePriceId": "price_yearly_starter",
"currency": "usd",
"unitAmount": 29000,
"recurringInterval": "year",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": false
}
],
"featureAccess": [
{
"featureKey": "api_calls",
"name": "API Calls",
"type": "limit",
"hasAccess": true,
"limit": 10000,
"isUnlimited": false
},
{
"featureKey": "priority_support",
"name": "Priority Support",
"type": "boolean",
"hasAccess": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Products
Get Product
Get the latest non-archived product by product key.
GET
/
v1
/
products
/
{productKey}
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const product = await priceos.products.get("starter");curl -X GET "https://api.priceos.com/v1/products/starter" \
-H "x-api-key: PRICEOS_API_KEY"{
"id": "prod_123",
"key": "starter",
"name": "Starter",
"type": "stripe",
"isDefault": false,
"version": 2,
"stripeProductId": "prod_stripe_123",
"prices": [
{
"id": "price_row_123",
"stripePriceId": "price_monthly_starter",
"currency": "usd",
"unitAmount": 2900,
"recurringInterval": "month",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": true
},
{
"id": "price_row_124",
"stripePriceId": "price_yearly_starter",
"currency": "usd",
"unitAmount": 29000,
"recurringInterval": "year",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": false
}
],
"featureAccess": [
{
"featureKey": "api_calls",
"name": "API Calls",
"type": "limit",
"hasAccess": true,
"limit": 10000,
"isUnlimited": false
},
{
"featureKey": "priority_support",
"name": "Priority Support",
"type": "boolean",
"hasAccess": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Headers
API key from your PriceOS dashboard.
Path Parameters
Product key.
Response
Product
Product.
Product ID.
Product key.
Product name.
Product type.
Available options:
stripe, custom Whether this is the default custom product.
Product version number.
Stripe product ID (Stripe products only).
Custom product metadata (custom products only).
Show child attributes
Show child attributes
Stripe prices linked to the product.
Show child attributes
Show child attributes
Feature access entries configured for this product.
Show child attributes
Show child attributes