---
title: "Add item to basket"
method: POST
path: "/basket/{id}"
tags: ["basket"]
---

# Add item to basket

`POST /basket/{id}`

Adds a listing to the basket and gives you the updated basket state back.

Typical usage:
- user clicks "Add to basket" on a listing page
- client sends `listingId` and `quantity`
- UI refreshes from the returned basket payload

Why this response is handy:
- You can re-render the whole basket immediately without an extra read call.

Important behavior:
- Requires authentication.
- If stock is unavailable (or the listing is invalid), the API returns structured listing errors.

## Path parameters

- `id` string, required — The ID of the basket to retrieve

## Request body

- object
  - `listingId` string, required — The ID of the listing
  - `quantity` integer — The quantity of the item in the basket, defaults to 1

## Response `200`

Updated list of items in the basket

- object

## Other responses

- `404` — A listing in the basket was not found
- `409` — The listings in the response body are no longer available in their requested quantity
- `500` — A listing in the basket was not found

---

[API](https://skmtc.net/managem/apis/managem-api.md) · [All operations](https://skmtc.net/managem/apis/managem-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/managem/managem-api/versions/5ed45d6a9e2f/schema)
