---
title: "One of the two carts"
method: GET
path: "/v1/offsets/cart"
tags: ["Offsets"]
---

# One of the two carts

`GET /v1/offsets/cart`

## Request

- Base URL: `https://carbonguru.io`
- URL: `https://carbonguru.io/v1/offsets/cart`
- Auth: HTTP bearer

type is required. The shipped read returns both carts' lines in one list, so this route filters by line type and sums the totals over what is left. The cart belongs to the account the credential resolves to and survives between requests through the WooCommerce session, which is keyed on the user: this API carries no cookie and needs none.

## Query parameters

- `type` 'offset' | 'removal', required

## Response `200`

The named cart, read back.

- object
  - `cart` object, required
    - `type` 'offset' | 'removal', required
    - `items` object[], required
      - `item_key` string: Delete this line at DELETE /v1/offsets/cart/items/{item_key}.
      - `name` string
      - `description` string
      - `quantity` number, nullable
      - `type` 'offset' | 'removal'
      - `carbon_kg` number, nullable
      - `metric_tons` number, nullable
      - `cost_usd` number, nullable: This line's price, all-in.
      - `social_cost_usd` number, nullable
      - `carbonguru_id` string, nullable: The analysed item this offset is for.
      - `portfolio_name` string, nullable
      - `subscription_mode` 'monthly' | 'null', nullable
      - `subscription_recurring_price_usd` number, nullable
    - `totals` object, required: Totals of THIS cart. total_cost_usd is the amount checkout charges for it: one all-in number.
      - `item_count` integer
      - `total_carbon_kg` number
      - `total_cost_usd` number
    - `links` object, required
      - `checkout` string
      - `cart` string

## Other responses

- `401`: No valid credential. Every authentication failure returns this one document.
- `402`: The account's plan does not include this capability. Carries min_tier and upgrade_url.
- `403`: A missing scope, an exhausted analysis allowance, or an object that is not the caller's.
- `404`: No such resource.
- `422`: The request's fields are wrong. errors[] names them.

---

[API](https://skmtc.dev/carbonguru/apis/carbonguru-api.md) · [All operations](https://skmtc.dev/carbonguru/apis/carbonguru-api/llms.txt) · [OpenAPI document](https://skmtc.dev/carbonguru/apis/carbonguru-api/revisions/26dcbe7a8500?raw)
