Autumn's V2 API is live in beta. We recommend using this version.
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.products.get('product_id');{
"id": "<string>",
"name": "<string>",
"group": "<string>",
"env": "sandbox",
"is_add_on": true,
"is_default": true,
"archived": true,
"version": 123,
"created_at": 123,
"items": [
{
"type": "feature",
"feature_id": "<string>",
"feature_type": "single_use",
"included_usage": 123,
"interval": "minute",
"interval_count": 123,
"price": 123,
"tiers": [
{
"to": 100,
"amount": 10
}
],
"usage_model": "prepaid",
"billing_units": 123,
"reset_usage_when_enabled": true,
"entity_feature_id": "<string>",
"display": {
"primary_text": "<string>",
"secondary_text": "<string>"
},
"quantity": 123,
"next_cycle_quantity": 123,
"config": {
"rollover": {
"max": 123,
"length": 123,
"duration": "month"
},
"on_increase": "bill_immediately",
"on_decrease": "prorate"
}
}
],
"free_trial": {
"duration": "day",
"length": 123,
"unique_fingerprint": true,
"card_required": true,
"trial_available": true
},
"base_variant_id": "<string>",
"scenario": "scheduled"
}import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.products.get('product_id');{
"id": "<string>",
"name": "<string>",
"group": "<string>",
"env": "sandbox",
"is_add_on": true,
"is_default": true,
"archived": true,
"version": 123,
"created_at": 123,
"items": [
{
"type": "feature",
"feature_id": "<string>",
"feature_type": "single_use",
"included_usage": 123,
"interval": "minute",
"interval_count": 123,
"price": 123,
"tiers": [
{
"to": 100,
"amount": 10
}
],
"usage_model": "prepaid",
"billing_units": 123,
"reset_usage_when_enabled": true,
"entity_feature_id": "<string>",
"display": {
"primary_text": "<string>",
"secondary_text": "<string>"
},
"quantity": 123,
"next_cycle_quantity": 123,
"config": {
"rollover": {
"max": 123,
"length": 123,
"duration": "month"
},
"on_increase": "bill_immediately",
"on_decrease": "prorate"
}
}
],
"free_trial": {
"duration": "day",
"length": 123,
"unique_fingerprint": true,
"card_required": true,
"trial_available": true
},
"base_variant_id": "<string>",
"scenario": "scheduled"
}Documentation Index
Fetch the complete documentation index at: https://docs-v1.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the product you set when creating the product
The name of the product
Product group which this product belongs to
The environment of the product
sandbox, live Whether the product is an add-on and can be purchased alongside other products
Whether the product is the default product
Whether this product has been archived and is no longer available
The current version of the product
The timestamp of when the product was created in milliseconds since epoch
Array of product items that define the product's features and pricing
Show child attributes
Free trial configuration for this product, if available
Show child attributes
ID of the base variant this product is derived from
Scenario for when this product is used in attach flows
scheduled, active, new, renew, upgrade, downgrade, cancel, expired, past_due