---
title: "Get current billing period usage for a SIM card"
method: GET
path: "/usage/billing/simcard/{simcardid}"
tags: ["SIMs (Devices)"]
---

# Get current billing period usage for a SIM card

`GET /usage/billing/simcard/{simcardid}`

## Request

- Base URL: `https://dashboard.hologram.io/api/1`
- URL: `https://dashboard.hologram.io/api/1/usage/billing/simcard/{simcardid}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/hologram/apis/hologram-rest-api-v1/docs/usage/billing/simcard/:simcardid/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns one aggregate usage record for a SIM's current unique 30-day billing period. Optionally restrict the total to one cellular link; linkids identifies all links included in the aggregate. Set with_session_details=true to also receive, per link, the most recent closed session rolled into the total (most_recent_sessions) and any in-flight session not yet billed (open_sessions).

## Path parameters

- `simcardid` integer, required

## Query parameters

- `linkid` integer
- `with_session_details` boolean

## Response `200`

OK

- UsageSIMCurrentBillingPeriodResponse
  - `success` boolean: Indicates whether the request was successful.
  - `data` UsageSIMCurrentBillingPeriodRecord
    - `current_billing_usage` integer: Total bytes used in the current billing period
    - `linkids` integer[]: Cellular link IDs that contributed usage to the total
    - `simcardid` integer: SIM card ID
    - `billing_period_end` string, nullable: Current billing period end timestamp (YYYY-MM-DD HH:mm:ss), null when the SIM has no active billing period
    - `most_recent_sessions` UsageSIMMostRecentSession[]: Only present when with_session_details=true. One entry per link in linkids.
      - `linkid` integer: Cellular link (SIM profile) ID the session belongs to
      - `session_begin` string, nullable: Session start timestamp (YYYY-MM-DD HH:mm:ss, UTC)
      - `session_end` string, nullable: Session end timestamp (YYYY-MM-DD HH:mm:ss, UTC)
      - `session_bytes` integer, nullable: Bytes used in the session
    - `open_sessions` UsageSIMOpenSession[]: Only present when with_session_details=true. Only links with an open session appear.
      - `linkid` integer: Cellular link (SIM profile) ID the session belongs to
      - `session_begin` string, nullable: Session start timestamp (YYYY-MM-DD HH:mm:ss, UTC)
      - `time_of_last_usage` string, nullable: Timestamp of the last usage report received for the session (YYYY-MM-DD HH:mm:ss, UTC)
      - `bytes` integer: Bytes used so far in the open session

## Other responses

- `400`: Invalid simcardid or linkid
- `401`: Unauthorized
- `403`: Forbidden — billing_visible permission required
- `404`: SIM card not found

---

[API](https://skmtc.dev/hologram/apis/hologram-rest-api-v1.md) - [All operations](https://skmtc.dev/hologram/apis/hologram-rest-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/hologram/apis/hologram-rest-api-v1/revisions/1bc07dcd1631?raw)
