TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.entities.get("customer_id", "entity_id");{
"id": "seat_123",
"name": "John Doe's Seat",
"customer_id": "org_123",
"created_at": 1762971906762,
"env": "sandbox",
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": null,
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 30,
"next_reset_at": 1765563905000,
"overage_allowed": false
}
}
}Entities
Get Entity
GET
/
customers
/
{customer_id}
/
entities
/
{entity_id}
TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.entities.get("customer_id", "entity_id");{
"id": "seat_123",
"name": "John Doe's Seat",
"customer_id": "org_123",
"created_at": 1762971906762,
"env": "sandbox",
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": null,
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 30,
"next_reset_at": 1765563905000,
"overage_allowed": false
}
}
}To get additional data in the entity object, you can use the
expand parameter to fetch data like invoices.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
invoices Response
200 - application/json
The unique identifier of the entity.
The name of the entity.
Unix timestamp (in milliseconds) when the entity was created.
Available options:
sandbox, live The customer ID this entity belongs to.
The feature ID this entity belongs to.
The products this entity has access to.
Show child attributes
Show child attributes
The features this entity has access to.
Show child attributes
Show child attributes
The invoices for this entity. Returned only if 'invoices' is passed into the expand parameter.
Show child attributes
Show child attributes
⌘I

