curl -X PATCH https://api.autumnai.com/products/Pro%20Product \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"items": [
{
"price": 25,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use"
}
]
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.update({
productId: 'Pro Product',
name: 'Pro Plan (Updated)',
description: 'Our premium plan with advanced features',
items: [
{
price: 25,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 2000,
price: 0.4,
interval: 'month',
usage_model: 'pay_per_use',
},
],
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.update(
product_id="Pro Product",
name="Pro Plan (Updated)",
description="Our premium plan with advanced features",
items=[
{
"price": 25,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use",
},
],
)
{
"id": "Pro Product",
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 2,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 25,
"display": {
"primary_text": "$25",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 2000,
"interval": "month",
"interval_count": 1,
"price": 0.4,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "2,000 Messages",
"secondary_text": "then $0.4 per 1,000 Messages"
}
}
],
"free_trial": null,
"base_variant_id": null,
"scenario": "new"
}
Products
Update Product
PATCH
/
products
/
:id
curl -X PATCH https://api.autumnai.com/products/Pro%20Product \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"items": [
{
"price": 25,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use"
}
]
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.update({
productId: 'Pro Product',
name: 'Pro Plan (Updated)',
description: 'Our premium plan with advanced features',
items: [
{
price: 25,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 2000,
price: 0.4,
interval: 'month',
usage_model: 'pay_per_use',
},
],
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.update(
product_id="Pro Product",
name="Pro Plan (Updated)",
description="Our premium plan with advanced features",
items=[
{
"price": 25,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use",
},
],
)
{
"id": "Pro Product",
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 2,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 25,
"display": {
"primary_text": "$25",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 2000,
"interval": "month",
"interval_count": 1,
"price": 0.4,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "2,000 Messages",
"secondary_text": "then $0.4 per 1,000 Messages"
}
}
],
"free_trial": null,
"base_variant_id": null,
"scenario": "new"
}
Updates an existing product. You can also use POST for this endpoint (will be deprecated in the future).
Path Parameters
string
required
The ID of the product to update.
Request Body
string
The new ID of the product. Used to rename the product ID.
string
The name of the product.
string
The description of the product.
boolean
Whether the product is an add-on.
boolean
Whether the product is the default product.
string
Product group which this product belongs to.
boolean
Archive this product using this flag. Archived products are hidden on the dashboard.
array
Array of product items that define the product’s features and pricing. Updates the entire items array.
Show Product Item Object
Show Product Item Object
enum
The type of the product item.
price- Fixed price itempriced_feature- Feature with pricingfeature- Feature without pricing
string
The feature ID of the product item. Should be null for fixed price items.
number | 'inf'
The amount of usage included for this feature (per interval).
enum
The reset or billing interval of the product item.
dayweekmonthyear
number
Interval count of the feature.
number
The price of the product item. Should be null if tiered pricing is set.
enum
Whether the feature should be prepaid upfront or billed based on usage.
prepaidpay_per_use
number
The billing units of the product item.
array
enum
The type of tiered pricing.
graduatedvolume
boolean
Whether the usage should be reset when the product is enabled.
string
The feature ID of the entity (like seats) to track sub-balances for.
object
Configuration for rollover and proration behavior.
Show Config Object
Show Config Object
object
enum
Behavior when quantity increases.
prorateno_prorate
enum
Behavior when quantity decreases.
prorateno_prorate
object
Free trial configuration for this product.
Show Free Trial Object
Show Free Trial Object
Response
string
The ID of the product.
string
The name of the product.
string
Product group which this product belongs to.
string
The environment of the product.
boolean
Whether the product is an add-on.
boolean
Whether the product is the default product.
boolean
Whether this product has been archived.
number
The current version of the product.
number
The timestamp of when the product was created.
array
Array of product items that define the product’s features and pricing.
object
Free trial configuration for this product, if available.
string
ID of the base variant this product is derived from.
enum
Scenario for when this product is used in attach flows.
object
Additional product properties.
curl -X PATCH https://api.autumnai.com/products/Pro%20Product \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"items": [
{
"price": 25,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use"
}
]
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.update({
productId: 'Pro Product',
name: 'Pro Plan (Updated)',
description: 'Our premium plan with advanced features',
items: [
{
price: 25,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 2000,
price: 0.4,
interval: 'month',
usage_model: 'pay_per_use',
},
],
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.update(
product_id="Pro Product",
name="Pro Plan (Updated)",
description="Our premium plan with advanced features",
items=[
{
"price": 25,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 2000,
"price": 0.4,
"interval": "month",
"usage_model": "pay_per_use",
},
],
)
{
"id": "Pro Product",
"name": "Pro Plan (Updated)",
"description": "Our premium plan with advanced features",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 2,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 25,
"display": {
"primary_text": "$25",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 2000,
"interval": "month",
"interval_count": 1,
"price": 0.4,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "2,000 Messages",
"secondary_text": "then $0.4 per 1,000 Messages"
}
}
],
"free_trial": null,
"base_variant_id": null,
"scenario": "new"
}
⌘I