---
title: "Change quantity or term of a cart line"
method: PATCH
path: "/v1/cart/items/{id}"
tags: ["cart"]
---

# Change quantity or term of a cart line

`PATCH /v1/cart/items/{id}`

## Request

- Base URL: `https://api.portproof.org`
- URL: `https://api.portproof.org/v1/cart/items/{id}`
- Auth: one of:
  - API key in cookie `pp_session`
  - HTTP bearer

A dedicated port from the partner network is sold for its own term only (no `term_override`; each term is its own SKU), a few units per line, and only while it is on sale.

## Path parameters

- `id` string, required

## Request body

- object
  - `quantity` integer
  - `term_override` 'monthly' | 'weekly' | 'daily' | 'gb' | 'none', nullable

## Response `200`

Default Response

- object
  - `cart` object, required
    - `id` string, required
    - `items` object[], required
      - `id` string, required
      - `product` object, required
        - `id` string, required
        - `sku` string, required
        - `kind` 'port' | 'bandwidth' | 'topup' | 'sms' | 'esim', required
        - `title` string, required
        - `country` string, nullable, required
        - `carrier_hint` string, nullable, required
        - `term` 'monthly' | 'weekly' | 'daily' | 'gb' | 'none', required
        - `sell_cents` integer, required
        - `currency` 'EUR' | 'USD', required
        - `evidence` 'signed' | 'observed', required
        - `operator_label` string, required
        - `stock` integer, nullable, required
        - `available` boolean, required
        - `supply_health` 'ok' | 'degraded' | 'down' | 'unknown', required
        - `tiers` object[], nullable
          - `min_qty` integer, required
          - `unit_cents` integer, required
        - `gb_per_unit` number, nullable
        - `once_per_customer` boolean
      - `quantity` integer, required
      - `term_override` 'monthly' | 'weekly' | 'daily' | 'gb' | 'none', nullable, required
      - `unit_cents` integer, required
      - `total_cents` integer, required
    - `subtotal_cents` integer, required
    - `currency` 'EUR' | 'USD', required
    - `requires_kyb` boolean, required
    - `expires_at` string, date-time, required

## Other responses

- `400`: Default Response
- `404`: Default Response
- `409`: Default Response

---

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