> For the complete documentation index, see [llms.txt](https://docs.tebex.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tebex.io/developers/headless-api/guides/baskets/remove-package-from-basket.md).

# Remove Package from Basket

To remove a package from the basket, provide the `package_id` . This will remove the package entirely, it does not decrement the quantity count. For that, use [Update Package Quantity](/developers/headless-api/guides/baskets/update-package-quantity.md).

## Remove a package from a basket

> Remove the given package ID from the basket.

```json
{"openapi":"3.1.0","info":{"title":"Tebex Headless API","version":"2.0.0"},"tags":[{"name":"Baskets","description":"Endpoints requiring only a basket ident with no token"}],"servers":[{"url":"https://headless.tebex.io/api/accounts/{token}","description":"Main API scoped to public token","variables":{"token":{"default":"","description":"The store's public token"}}}],"paths":{"/{basketIdent}/packages/remove":{"post":{"tags":["Baskets"],"operationId":"removeBasketPackage","summary":"Remove a package from a basket","parameters":[{"$ref":"#/components/parameters/basketIdent"}],"description":"Remove the given package ID from the basket.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"package_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response returns the basket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Basket"}}}},"422":{"description":"The provided request is invalid. The error response will include detail as to which parameter failed validation."}}}}},"components":{"parameters":{"basketIdent":{"name":"basketIdent","in":"path","required":true,"schema":{"type":"string"},"description":"The basket identifier."}},"schemas":{"Basket":{"type":"object","properties":{"id":{"type":"string"},"ident":{"type":"string"},"complete":{"type":"boolean"},"email":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"giftcards":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"creator_code":{"type":"string","description":"The creator code is used to share a percentage of the payment with another party. See more about creator codes at https://docs.tebex.io/creators/tebex-control-panel/engagement/creator-codes"},"cancel_url":{"type":"string"},"complete_url":{"type":"string","nullable":true},"complete_auto_redirect":{"type":"boolean"},"country":{"type":"string","description":"A two-character country code"},"ip":{"type":"string"},"username_id":{"type":"integer"},"base_price":{"type":"number","format":"float"},"sales_tax":{"type":"number","format":"float"},"total_price":{"type":"number","format":"float"},"currency":{"type":"string","description":"A 3 character currency code"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/BasketPackage"}},"custom":{"type":"object","nullable":true},"links":{"$ref":"#/components/schemas/BasketLinks"}}},"Coupon":{"type":"object","properties":{"code":{"type":"string"}}},"GiftCard":{"type":"object","properties":{"card_number":{"type":"string"}}},"BasketPackage":{"type":"object","description":"A package within an existing basket.","properties":{"id":{"type":"integer","description":"The package ID"},"description":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"in_basket":{"type":"object","properties":{"quantity":{"type":"integer","description":"The quantity of `package` in this basket. This is not the total quantity of overall items in the basket."},"price":{"type":"number","format":"float"},"gift_username_id":{"type":"string","description":"The username id of the user this package is gifted to"},"gift_username":{"type":"string","description":"The username of the user this package is gifted to."}}},"type":{"type":"string","enum":["single","subscription"],"description":"The type of payment, either `single` for one-time payments or `subscription`."},"revenue_share":{"type":"array","description":"An array of payment destination objects describing how the purchase should be split between multiple wallets. **Only available with pre-agreement from Tebex.**","items":{"$ref":"#/components/schemas/RevenueShare"}}}},"RevenueShare":{"type":"object","properties":{"wallet_ref":{"type":"string"},"amount":{"type":"number","description":"A float (decimal) value representing the amount of this payment in your account currency that is credited to the `wallet_ref`"},"gateway_fee_percent":{"type":"number","description":"A float (decimal) value representing the percentage of the gateway fee that should be dedicated from this wallet’s revenue share. This optional value can be anywhere between 0 - 100."}}},"BasketLinks":{"type":"object","properties":{"payment":{"type":"string","description":"The `links.payment` property is only returned if the basket has been paid for and a payment exists with the `complete`,`refund`, or `chargeback` status."},"checkout":{"type":"string","description":"The `links.checkout` property is only returned if the basket has not been paid, and is the URL to send the customer to make payment"}}}}}}
```
