> ## Documentation Index
> Fetch the complete documentation index at: https://storekit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Basket Prefill via URL

> Pre-populate a customer's basket with PLU codes in the URL. Build re-order links, marketing campaign URLs, and QR codes that open the cart with items added.

You can construct a URL that automatically adds products to a customer's basket when they open your store. This is useful for marketing campaigns, QR codes, re-order links, or any scenario where you want to send a customer directly to checkout with specific items.

## URL Format

```
https://{your-store-domain}/{venueSlug}/basket/{products}
```

The `{products}` parameter is a comma-separated list of items, where each item follows the format:

```
PLU:quantity
```

| Part       | Description                                                                                                                |
| ---------- | -------------------------------------------------------------------------------------------------------------------------- |
| `PLU`      | The PLU (Price Look-Up) code of the product. This is set in your menu configuration and is also used for POS integrations. |
| `quantity` | The number of units to add to the basket. Must be a positive integer.                                                      |

### Example

To add 2 units of product `BURGER01` and 1 unit of product `FRIES01`:

```
https://order.storekit.com/my-restaurant/basket/BURGER01:2,FRIES01:1
```

## How It Works

1. The customer opens the URL.
2. The store loads the menu as usual.
3. Each PLU in the URL is matched against available products.
4. Valid items are added to the basket with the specified quantities.
5. The customer is redirected to the menu page with the basket pre-populated and can proceed to checkout.

## Validation Rules

Each item in the URL is validated individually. Items that fail validation are skipped, and the remaining valid items are still added to the basket. The customer will see a notification listing any items that could not be added.

| Condition                                   | Result                                                  |
| ------------------------------------------- | ------------------------------------------------------- |
| PLU not found in the menu                   | Item is skipped                                         |
| Product is marked as unavailable            | Item is skipped                                         |
| Product is out of stock (inventory tracked) | Item is skipped                                         |
| Requested quantity exceeds available stock  | Item is skipped                                         |
| Product has required modifiers              | Item is skipped (modifiers cannot be specified via URL) |

<Warning>
  Products that have required modifier groups (e.g. "Choose a size") cannot be added via URL prefill, because modifiers cannot be specified in the URL format. These items will be skipped.
</Warning>

## Query Parameters

You can combine the basket URL with any standard query parameters your store supports. For example, to also apply a discount code:

```
https://order.storekit.com/my-restaurant/basket/BURGER01:2?discount=SAVE10
```

## Finding PLU Codes

PLU codes are configured per product in the storekit dashboard under your menu settings. They are the same codes used for POS integrations. See [PLU Mapping](/guides/integrations/pos/advanced/plu-mapping) for more details on managing PLU codes.
