Subscriptions
Get a subscription
Getting Started
Authentication
API Reference
- OAuth
- Plans
- Subscriptions
- Suppliers
- Prices
- Beta
Error Codes
- Introduction
- Error Types
Subscriptions
Get a subscription
Retrieve a subscription details by its id
GET
/
subscriptions
/
{id}
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_egeq9kz1hd1hrhb5jo3l8brw",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"created_at": "2024-03-14T12:00:00Z"
},
"address": {
"object": "address",
"id": "adr_uk0ei0dzc81k7bnad7edb131",
"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"
},
"status": "active",
"created_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"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Example:
"sub_xvs7aksu7tc1n4zeut6xbuox"
Response
200
application/json
Retrieve the subscription details
The response is of type object
.
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_egeq9kz1hd1hrhb5jo3l8brw",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"created_at": "2024-03-14T12:00:00Z"
},
"address": {
"object": "address",
"id": "adr_uk0ei0dzc81k7bnad7edb131",
"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"
},
"status": "active",
"created_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"
}