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

# Get a Bundle

Retrieve a bundle and, when you ask for them, its products, its price per currency and whether it can be sold right now.

---

## Endpoint

```
GET /api/v3/bundles/{bundle}
```

---

## Path Parameters

| Parameter | Type   | Description                                                            |
| --------- | ------ | ---------------------------------------------------------------------- |
| `bundle`  | string | The bundle's `id`, or its `external_id` when `id_type=external` is set |

## Query Parameters {#query-parameters}

| Parameter | Type   | Default    | Description                                                                                                                       |
| --------- | ------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `id_type` | string | `internal` | `internal` (bundle `id`) or `external` (`external_id`)                                                                            |
| `include` | string | -          | Comma-separated: `products`, `prices`, `availability`, `detailed_stock`. See [Included blocks](./bundles-v3-overview.md#includes) |
| `fields`  | string | -          | Comma-separated list of fields to return, e.g. `id,name`. Applied after `include`                                                 |

---

## Response

`200 OK` with the [bundle object](./bundles-v3-overview.md#the-bundle-object) under `data`. Without `include`, it carries the fields from `id` to `updated_at`. The blocks you include are computed at the moment of the request, from the products as they are then.

This bundle, read with `?include=products,prices,availability`, cannot be sold: one of its products was withdrawn from sale and another one is no longer among the products your store can sell. Each product says why, `availability.reasons` sums it up for the bundle, and `prices` is empty:

```json
{
  "data": {
    "id": "318",
    "external_id": "rock-icons",
    "name": "Rock Icons",
    "slug": "rock-icons",
    "description": "The classics, together",
    "cover_url": null,
    "private": false,
    "published": true,
    "published_at": "2026-10-06T14:05:00.000000Z",
    "product_url": "https://yourstore.publica.la/library/bundle/rock-icons/318?signature=9f2c4e7a…",
    "buy_button_url": "https://yourstore.publica.la/library/bundle/rock-icons/318?signature=9f2c4e7a…&automatically_open_checkout=1",
    "created_at": "2026-10-06T14:00:00.000000Z",
    "updated_at": "2026-10-06T14:05:00.000000Z",
    "products": [
      {
        "id": "1201",
        "position": 0,
        "name": "Rock Icons, Volume 1",
        "available": true,
        "rejection_reason": null
      },
      {
        "id": "1202",
        "position": 1,
        "name": "Rock Icons, Volume 2",
        "available": false,
        "rejection_reason": "not_on_sale"
      },
      {
        "id": "1205",
        "position": 2,
        "name": null,
        "available": false,
        "rejection_reason": "unresolved"
      }
    ],
    "prices": [],
    "availability": {
      "available": false,
      "reasons": ["unresolved_products", "ineligible_products"]
    }
  }
}
```

The codes are listed under [Rejection reasons](./bundles-v3-overview.md#rejection-reasons) and [Availability](./bundles-v3-overview.md#availability).

---

## Examples

### By ID

```bash
curl -X GET "https://yourstore.publica.la/api/v3/bundles/318" \
  -H "X-User-Token: your-api-token" \
  -H "Accept: application/json"
```

### By `external_id`

```bash
curl -X GET "https://yourstore.publica.la/api/v3/bundles/rock-icons?id_type=external" \
  -H "X-User-Token: your-api-token" \
  -H "Accept: application/json"
```

### With Its Products, Prices and Availability

```bash
curl -X GET "https://yourstore.publica.la/api/v3/bundles/318?include=products,prices,availability" \
  -H "X-User-Token: your-api-token" \
  -H "Accept: application/json"
```

### Only Some Fields

```bash
curl -X GET "https://yourstore.publica.la/api/v3/bundles/318?fields=id,name" \
  -H "X-User-Token: your-api-token" \
  -H "Accept: application/json"
```

```json
{
  "data": {
    "id": "318",
    "name": "Rock Icons"
  }
}
```

### A Block and Some Fields

`fields` applies after `include`, so it can keep one of the blocks you included and leave out the rest. For an available bundle:

```bash
curl -X GET "https://yourstore.publica.la/api/v3/bundles/319?include=prices,availability&fields=id,prices" \
  -H "X-User-Token: your-api-token" \
  -H "Accept: application/json"
```

```json
{
  "data": {
    "id": "319",
    "prices": [{ "currency_id": "USD", "amount": 15 }]
  }
}
```

Without `include=prices`, the same `fields=id,prices` returns only `id`.

---

## Errors

| Status | Condition                                                                                                                                                                                            |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `401`  | Missing or invalid `X-User-Token`                                                                                                                                                                    |
| `403`  | Selling is disabled for the store (`Selling is disabled for this store.`), or the token does not belong to an administrator. A token without access gets `403` even for a bundle that does not exist |
| `404`  | The bundle does not exist in your store. The body is `{"message": "Not found"}`, also for a bundle of another store                                                                                  |
| `422`  | `id_type` other than `internal` or `external`, an `include` other than `products`, `prices`, `availability` or `detailed_stock`, or `include` sent as an array                                       |

---

## See Also

- [Bundles API Overview](./bundles-v3-overview.md): the bundle object and its codes
- [List Bundles](./bundles-v3-list.md): page through your bundles
- [Update a Bundle](./bundles-v3-update.md): change a bundle and publish it
