GET
/
subscriptions
/
{id}
Get a subscription
curl --request GET \
  --url https://api.nomos.energy/subscriptions/{id} \
  --header 'Authorization: Bearer <token>'
{
  "object": "subscription",
  "id": "sub_rocbrf1u5e48mm0reeqoag90",
  "plan": "pln_ctj3tjzc7dywznuw1dy80lb3",
  "customer": {
    "object": "customer",
    "id": "cus_swa4o4nbqh5bsa55n2duoxvh",
    "type": "person",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "created_at": "2024-03-14T12:00:00Z"
  },
  "address": {
    "object": "address",
    "id": "adr_dq0v03lifb3ktpr3d7sdicxj",
    "street": "Torstraße",
    "house_number": "119",
    "zip": "10115",
    "city": "Berlin",
    "created_at": "2024-03-14T12:00:00Z"
  },
  "meter": {
    "object": "meter",
    "id": "mtr_tihqsqnxx3xs1gonbnk0ccou",
    "melo": "DE0000001234567890",
    "malo": "501234567890",
    "number": "1APA0195124010",
    "type": "smart",
    "created_at": "2024-03-14T12:00:00Z"
  },
  "payment_method": {
    "object": "payment_method",
    "id": "pm_adc9utqqpcp7tx054l7vg56s2",
    "type": "sepa_debit",
    "sepa_debit": {
      "iban": "DE************6485",
      "account_holder": "John Doe"
    },
    "created_at": "2024-03-14T12:00:00Z"
  },
  "supplier": {
    "object": "supplier",
    "id": "mp_a0x6jm5h92wde6s5dnuvha4c",
    "name": "Sample Energy GmbH",
    "country": "DE",
    "created_at": "2024-03-14T12:00:00Z"
  },
  "number": "4X44EMKX",
  "status": "active",
  "estimated_usage": 123,
  "created_at": "2024-03-14T12:00:00Z",
  "updated_at": "2024-03-14T12:00:00Z",
  "start_at": "2024-03-14T12:00:00Z",
  "terminated_at": "2024-03-14T12:00:00Z",
  "end_at": "2024-03-14T12:00:00Z",
  "metadata": {
    "utm_source": "google",
    "utm_campaign": "campaign_name",
    "user_id": "1234567890"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required
Example:

"sub_uuf2qqxdvaczh4s8dswi8ulb"

Response

Retrieve the subscription details

object
enum<string>
required

Type of the object, always 'subscription'

Available options:
subscription
id
string
required

Unique identifier for the subscription

Example:

"sub_rocbrf1u5e48mm0reeqoag90"

plan
string
required

ID of the plan

Example:

"pln_ctj3tjzc7dywznuw1dy80lb3"

customer
object
required
address
object
required
meter
object
required
payment_method
object
required
status
enum<string>
required

Status of the subscription

Available options:
pending,
active,
ended
Example:

"active"

estimated_usage
number
required

Estimated yearly usage in kWh, provided by the customer in the checkout.

created_at
required

Timestamp when the subscription was created

Example:

"2024-03-14T12:00:00Z"

updated_at
required

Timestamp when the subscription was updated

Example:

"2024-03-14T12:00:00Z"

start_at
required

Timestamp when delivery was started / will start

Example:

"2024-03-14T12:00:00Z"

terminated_at
required

Timestamp when delivery was terminated

Example:

"2024-03-14T12:00:00Z"

end_at
required

Timestamp when the subscription was ended / will end

Example:

"2024-03-14T12:00:00Z"

supplier
object | null
number
string | null

Human-readable identifier for the subscription

Example:

"4X44EMKX"

metadata
object | null

Metadata of the subscription. Store any type of information, custom to your needs. E.g. the user_id of your in-house user. Restricted to 10KB.

Example:
{
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}