Skip to main content
GET
/
customers
/
{customer_id}
/
entities
/
{entity_id}
TypeScript
const { data } = await autumn.entities.get('user_123', 'ent_1');
{
  "id": "<string>",
  "name": "<string>",
  "customer_id": "<string>",
  "created_at": 123,
  "env": "<string>",
  "products": [
    {
      "id": "<string>",
      "name": "<string>",
      "group": "<string>",
      "status": "<string>",
      "canceled_at": 123,
      "started_at": 123,
      "is_default": true,
      "is_add_on": true,
      "version": 123,
      "current_period_start": 123,
      "current_period_end": 123,
      "entity_id": "<string>",
      "items": [
        {}
      ],
      "quantity": 123
    }
  ],
  "features": {},
  "invoices": [
    {
      "product_ids": [
        "<string>"
      ],
      "stripe_id": "<string>",
      "status": "<string>",
      "total": 123,
      "currency": "<string>",
      "created_at": 123,
      "hosted_invoice_url": "<string>"
    }
  ]
}
To get additional data in the entity object, you can use the expand parameter to fetch data like invoices.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customer_id
string
required

Your unique identifier for the customer

entity_id
string
required

Your unique identifier of the entity (eg, a seat ID)

Query Parameters

expand
enum<string>[]

Array of additional data to include in the entity response. Currently supports "invoices"

Response

Entity retrieved successfully

id
string

The unique identifier of the entity

name
string

The name of the entity

customer_id
string

The customer ID this entity belongs to

created_at
integer

Unix timestamp when the entity was created

env
string

The environment (sandbox/live)

products
object[]

Products associated with this entity

features
object

Features associated with this entity

invoices
object[]

Invoices for this entity (only included when expand=invoices)