Skip to main content
GET
/
meters
/
batch
Check processing status
curl --request GET \
  --url https://api.flatpeak.com/meters/batch \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.flatpeak.com/meters/batch"

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

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

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

fetch('https://api.flatpeak.com/meters/batch', 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.flatpeak.com/meters/batch",
  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.flatpeak.com/meters/batch"

	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.flatpeak.com/meters/batch")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.flatpeak.com/meters/batch")

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
{
  "id": "bat_65e42b7827c0526548432b9f",
  "object": "meter_batch",
  "records_submitted": 18379,
  "records_accepted": 18378,
  "records_processed": 32,
  "failed_records": [
    {
      "record_num": 1,
      "error": "end_time must not be before start_time",
      "record_reference_id": "MET1234567890"
    }
  ],
  "time_created": "2023-11-07T05:31:56Z",
  "account_id": "acc_661677911f2197045e6cf1b1"
}
{
  "object": "error",
  "type": "invalid_request",
  "code": "access_denied",
  "time_created": "2025-01-01T00:00:00Z"
}
{
  "object": "error",
  "type": "rate_limit",
  "code": "too_many_requests",
  "message": "Too many requests. Please retry after a short delay.",
  "time_created": "2026-01-29T17:11:52Z"
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Query Parameters

batch_id
string
required

Flatpeak meter batch_id.

Response

id
string

Flatpeak ID for this submission.

Example:

"bat_65e42b7827c0526548432b9f"

object
string

Object name, i.e. meter_batch.

Example:

"meter_batch"

records_submitted
integer

Number of received metering records.

Example:

18379

records_accepted
integer

Number of accepted metering records.

Example:

18378

records_processed
integer

Number of processed metering records.

Example:

32

failed_records
FailedMeterRecord · object[]

Returns details of any meter records that failed processing

time_created
string<date-time>

Time when this object was created. In UTC.

Example:

"2023-11-07T05:31:56Z"

account_id
string

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"