---
title: "Get an enterprise's contract and usage."
method: GET
path: "/enterprises/{enterpriseId}/billing"
tags: ["enterprises"]
---

# Get an enterprise's contract and usage.

`GET /enterprises/{enterpriseId}/billing`

## Request

- Base URL: `https://api.shorebird.dev/api/v1`
- URL: `https://api.shorebird.dev/api/v1/enterprises/{enterpriseId}/billing`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

The plan of the billing account the enterprise owns, and the patch
installs of every organization it pays for in the plan's current
period. `plan` and `position` are null while the enterprise owns no
account and its organizations bill through their owners. Owners and
billing managers only; anyone else in the enterprise gets a `403`
(`enterprise_billing_required`).

## Response `200`

The enterprise's billing.

- EnterpriseBilling: An enterprise's contract and its usage against it.
  - `has_billing_account` boolean, required: Whether the enterprise owns a billing account.
  - `plan` EnterpriseBillingPlan, required: The plan of an enterprise's billing account.
    - `name` string, required: The plan's name, as the contract's price names it.
    - `level` string, required: The plan level, such as `enterprise`.
    - `billing_interval` string, nullable: The unit the plan bills on (`month`, `year`).
    - `billing_interval_count` integer, nullable: How many intervals make one billing period.
    - `current_period_start` string, date-time, required
    - `current_period_end` string, date-time, required: When the current period ends and the plan renews.
    - `cancel_at_period_end` boolean, required: Whether the plan ends instead of renewing.
    - `currency` string, required
  - `position` AccountPosition, required: Where the account stands against its plan right now, worked out by the server so every client shows the same figures. Counts are per allotment period (the base subscription's billing period) unless said otherwise. Overage is per overage period, which for an annual plan is the month its overage subscription bills on.
    - `included_installs` integer, required: Installs the account may make this allotment period before overage begins: the plan's allotment plus any credit.
    - `installs` integer, required: Installs served so far this allotment period.
    - `included_installs_used` integer, required: Installs taken from the included allotment. Installs billed as overage are not counted here.
    - `included_exhausted` boolean, required: Whether the included allotment is used up.
    - `overage_installs` integer, required: Overage installs billed this overage period, capped at the spending limit. `0` when the plan has no overage billing.
    - `install_ceiling` integer, nullable, required: The install count at which patches stop being served, or null when nothing stops them.
    - `remaining_installs` integer, nullable, required: Installs left before `install_ceiling`, or null when there is no ceiling.
    - `at_ceiling` boolean, required: Whether `install_ceiling` has been reached.
    - `nearing_limit` boolean, required: Whether installs have reached the share of `install_ceiling` at which Shorebird emails a warning.
    - `consuming_overage` boolean, required: Whether installs are being billed as overage right now.
    - `accrued_overage_amount` string, nullable, required: What `overage_installs` costs at the plan's overage price, in minor units of the plan's currency, as a decimal number in a string because it can be fractional. Null when the plan has no overage billing.

## Other responses

- `default`: Standard error response. Emitted for any non-2xx status where a body can be decoded into an [ErrorResponse].

---

[API](https://skmtc.dev/shorebird/apis/shorebird-codepush-api.md) - [All operations](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/revisions/941da8871d10?raw)
