Skip to main content
GET
/
invoices
/
{id}
Retrieve an invoice
curl --request GET \
  --url https://api.nomos.energy/invoices/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.nomos.energy/invoices/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.nomos.energy/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomos.energy/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.nomos.energy/invoices/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.nomos.energy/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.nomos.energy/invoices/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "object": "invoice",
  "id": "inv_drjjua6ampd1op2fg98k89x8",
  "invoice_number": "H62SU12A-003",
  "month": 4,
  "year": 2025,
  "period_start": "2025-03-31T22:00:00Z",
  "period_end": "2025-04-30T22:00:00Z",
  "period_number": 3,
  "status": "open",
  "usage": 100,
  "total": 110.04,
  "issued_at": "2024-03-14T12:00:00Z",
  "paid_at": "2024-03-14T12:00:00Z"
}
{
"code": "BAD_REQUEST",
"message": "invalid_type in 'end': Required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST"
}
{
"code": "UNAUTHORIZED",
"message": "Invalid or malformed token",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNAUTHORIZED"
}
{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/PAYMENT_REQUIRED"
}
{
"code": "FORBIDDEN",
"message": "You are not allowed to access this resource",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/FORBIDDEN"
}
{
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/NOT_FOUND"
}
{
"code": "METHOD_NOT_ALLOWED",
"message": "Method not allowed",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/METHOD_NOT_ALLOWED"
}
{
"code": "CONFLICT",
"message": "Resource already exists",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/CONFLICT"
}
{
"code": "UNPROCESSABLE_ENTITY",
"message": "invalid_enum_value in 'status': Invalid enum value. Expected 'pending' | 'active' | 'ended'",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNPROCESSABLE_ENTITY"
}
{
"code": "TOO_MANY_REQUESTS",
"message": "Wait 30 seconds before retrying.",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/TOO_MANY_REQUESTS"
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/INTERNAL_SERVER_ERROR"
}

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:

"inv_drjjua6ampd1op2fg98k89x8"

Response

Retrieve the invoice details

object
enum<string>
required
Available options:
invoice
id
string
required

Unique identifier of the invoice.

Example:

"inv_drjjua6ampd1op2fg98k89x8"

invoice_number
string
required

Human-readable invoice number displayed on the invoice document

Example:

"H62SU12A-003"

month
number
required

Numeric month (1-12) for which the invoice is issued

Example:

4

year
number
required

Four-digit year for which the invoice is issued

Example:

2025

period_start
string
required

Timestamp marking the beginning of the billing period (inclusive)

Example:

"2025-03-31T22:00:00Z"

period_end
string
required

Timestamp marking the end of the billing period (exclusive)

Example:

"2025-04-30T22:00:00Z"

period_number
number
required

Sequential number of the billing period within the subscription (1-based)

Example:

3

status
enum<string>
required

Current status of the invoice:

Available options:
open,
paid,
voided
Example:

"open"

usage
number
required

Total energy consumption in kilowatt-hours (kWh) during the billing period

Example:

100

total
number
required

Total amount due in euros (EUR) including all fees, taxes, and energy costs

Example:

110.04

issued_at

Timestamp when the invoice was issued

Example:

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

paid_at

Timestamp when the invoice was paid

Example:

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