import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.products.list();{
"list": [
{
"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.list();{
"list": [
{
"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"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
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
The type of the product item
feature, priced_feature, price The feature ID of the product item. If the item is a fixed price, should be null
Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.
single_use, continuous_use, boolean, static The amount of usage included for this feature.
The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.
minute, hour, day, week, month, quarter, semi_annual, year The interval count of the product item.
The price of the product item. Should be null if tiered pricing is set.
Whether the feature should be prepaid upfront or billed for how much they use end of billing period.
prepaid, pay_per_use The amount per billing unit (eg. $9 / 250 units)
Whether the usage should be reset when the product is enabled.
The entity feature ID of the product item if applicable.
Used in customer context. Quantity of the feature the customer has prepaid for.
Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.
Configuration for rollover and proration behavior of the feature.
Show child attributes
bill_immediately, prorate_immediately, prorate_next_cycle, bill_next_cycle prorate, prorate_immediately, prorate_next_cycle, none, no_prorations Free trial configuration for this product, if available
Show child attributes
The duration type of the free trial
day, month, year The length of the duration type specified
Whether the free trial is limited to one per customer fingerprint
Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.
Used in customer context. Whether the free trial is available for the customer if they were to attach the product.
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