---
title: "Restore cart item"
method: PUT
path: "/cart/item/{item_key}"
tags: ["cart-items"]
---

# Restore cart item

`PUT /cart/item/{item_key}`

Restores a previously removed item back to the customer's cart.
By default returns the updated cart contents. Set return_item=true to get just the restored item details.

## Path parameters

- `item_key` string, required

## Query parameters

- `return_item` boolean

## Response `200`

Cart item restored successfully.

- union
  - CartV2 — Complete cart object with enhanced v2 structure.
    - `cart_hash` string — Unique cart hash.
    - `cart_key` string — Unique cart key for the customer.
    - `currency` Currency
      - `currency_code` string — Currency code.
      - `currency_symbol` string — Currency symbol.
      - `currency_symbol_pos` string — Currency symbol position.
      - `currency_minor_unit` integer — Currency minor unit.
      - `currency_decimal_separator` string — Currency decimal separator.
      - `currency_thousand_separator` string — Currency thousand separator.
      - `currency_prefix` string — Currency prefix.
      - `currency_suffix` string — Currency suffix.
    - `customer` Customer
      - `billing_address` BillingAddress
        - `billing_first_name` string
        - `billing_last_name` string
        - `billing_company` string
        - `billing_country` string
        - `billing_address_1` string
        - `billing_address_2` string
        - `billing_postcode` string
        - `billing_city` string
        - `billing_state` string
        - `billing_phone` string
        - `billing_email` string
      - `shipping_address` ShippingAddress
        - `shipping_first_name` string
        - `shipping_last_name` string
        - `shipping_company` string
        - `shipping_country` string
        - `shipping_address_1` string
        - `shipping_address_2` string
        - `shipping_postcode` string
        - `shipping_city` string
        - `shipping_state` string
    - `items` object — Cart items indexed by item key.
    - `item_count` integer — Total number of items in cart.
    - `items_weight` number — Total weight of all items.
    - `coupons` AppliedCoupon[] — Applied coupons.
      - `coupon` string
      - `label` string
      - `saving` string
      - `saving_html` string
    - `needs_payment` boolean — Whether the cart needs payment.
    - `needs_shipping` boolean — Whether the cart needs shipping.
    - `shipping` Shipping
      - `total_packages` integer — Number of shipping packages.
      - `show_package_details` boolean — Whether to show package details.
      - `has_calculated_shipping` boolean — Whether shipping has been calculated.
      - `packages` object — Shipping packages.
    - `fees` CartFee[] — Cart fees.
      - `name` string
      - `amount` number
      - `taxable` boolean
      - `tax_class` string
      - `total` number
      - `tax` number
    - `taxes` CartTax[] — Cart taxes.
      - `rate_id` integer
      - `label` string
      - `compound` boolean
      - `tax_total` string
      - `shipping_tax_total` string
    - `totals` CartTotals
      - `subtotal` string — Cart subtotal.
      - `subtotal_tax` string — Cart subtotal tax.
      - `shipping_total` string — Shipping total.
      - `shipping_tax` string — Shipping tax.
      - `shipping_taxes` number[]
      - `discount_total` string — Discount total.
      - `discount_tax` string — Discount tax.
      - `cart_contents_total` string — Cart contents total.
      - `cart_contents_tax` string — Cart contents tax.
      - `cart_contents_taxes` number[]
      - `fee_total` string — Fee total.
      - `fee_tax` string — Fee tax.
      - `fee_taxes` number[]
      - `total` string — Cart total.
      - `total_tax` string — Total tax.
    - `removed_items` RemovedItem[] — Recently removed items that can be restored.
      - `key` string
      - `product_id` integer
      - `quantity` integer
      - `name` string
    - `cross_sells` CrossSellItem[] — Cross-sell products.
      - `id` integer
      - `product_name` string
      - `product_title` string
      - `price` string
      - `regular_price` string
      - `sale_price` string
      - `product_image` string
    - `notices` object — Cart notices and messages.
    - `extensions` object — Additional data from extensions.
  - CartItem
    - `item_key` string — Unique identifier for the item within the cart.
    - `id` integer — Product ID.
    - `name` string — Product name.
    - `title` string — Product title.
    - `price` string — Current product price.
    - `quantity` object — Quantity information for this item.
      - `value` number — Current quantity of the item in the cart.
      - `min_purchase` number — Minimum quantity that can be purchased.
      - `max_purchase` number — Maximum quantity that can be purchased.
    - `totals` object — Item totals.
      - `subtotal` number — Line subtotal (before discounts).
      - `subtotal_tax` number — Line subtotal tax.
      - `total` number — Line total (after discounts).
      - `tax` number — Line total tax.
    - `slug` string — Product slug.
    - `meta` object — Item metadata.
      - `product_type` string — Product type.
      - `sku` string — Product SKU.
      - `dimensions` object — Product dimensions.
        - `length` string — Product length.
        - `width` string — Product width.
        - `height` string — Product height.
        - `unit` string — Dimension unit.
      - `weight` string — Product weight.
      - `variation` union — Chosen attributes (for variations).
        - object
        - string[]
    - `backorders` string — Backorder status.
    - `cart_item_data` object — Custom cart item data.
    - `featured_image` string — Product featured image URL.

## Other responses

- `400` — Bad request - invalid item key format.
- `403` — Unable to restore item to the cart.
- `404` — Cart item not found.

---

[API](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication.md) · [All operations](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cocartapi/cocart-jwt-authentication/revisions/2031b047ca5f/schema)
