> For the complete documentation index, see [llms.txt](https://www.boxhero.io/docs/llms.txt). Every page is available as Markdown by appending `.md` to its URL; this page is [Markdown](https://www.boxhero.io/docs/fr/developers/api/reference/bundles/get-bundle-by-sku.md).

# Get a bundle by SKU

> Looks up a bundle by SKU (case-sensitive) and returns the same payload as GET /bundles/{bundle_id}.

URL-encode special characters in the SKU.

`GET https://rest.boxhero-app.com/v1/bundles/by-sku/{sku}`

## Autorisation

- `Authorization` (string, obligatoire): En-tête d'authentification Bearer au format `Bearer <token>`, où `<token>` est votre [jeton d'API](https://www.boxhero.io/docs/fr/developers/api/authentication.md).

## Paramètres de chemin

- `sku` (string, min length 1, max length 255, obligatoire): Bundle SKU (case-sensitive). URL-encode special characters such as `#`, `%`, `/`, or spaces.

## Réponses

**200** The requested bundle.

- `item` (Bundle, obligatoire): A bundle with its component items. Bundles have no stock of their own; inventory is tracked at the component-item level.

  - `id` (integer, minimum 0, maximum 2147483647, obligatoire): Bundle id.
  - `name` (string, obligatoire): Bundle display name.
  - `sku` (string, obligatoire): Stock Keeping Unit. Unique within the team.
  - `barcode` (string, obligatoire): Primary barcode for the bundle. Empty string when not assigned.
  - `cost` (string, obligatoire): Cost per bundle, as a decimal string. Independent from component item costs.
  - `price` (string, obligatoire): Selling price per bundle, as a decimal string. Independent from component item prices.
  - `photo_url` (string, nullable, obligatoire): URL of the bundle photo. `null` when no photo is set.
  - `memo` (string, obligatoire): Free-text memo. Empty string when not set.
  - `components` (array of BundleComponent, obligatoire): Component list. Bundles cannot contain other bundles.

    - `item` (ExtendedItemEntity, obligatoire): Reference to an item or bundle embedded in order, return, transaction, and bundle component responses.

      - `id` (integer, minimum 0, maximum 2147483647, obligatoire): Item or bundle id.
      - `name` (string, obligatoire): Display name.
      - `sku` (string, obligatoire): SKU. Empty string when unset.
      - `barcode` (string, obligatoire): Barcode. Empty string when unset.
      - `deleted` (boolean, obligatoire): Whether the underlying item or bundle is deleted.
    - `quantity` (number, obligatoire): Quantity of this item required per bundle.

**400** Team is not in LOCATION mode.

- `id` (string, obligatoire): Unique exception id (`ex_` followed by 32 lowercase hex chars, no dashes — e.g. `ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a`). Quote this in support tickets so we can find the request in our logs.
- `type` (string, obligatoire): Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on `title`.

  Valeurs possibles: `/errors/not-found`, `/errors/invalid-request`, `/errors/invalid-team-mode`, `/errors/tokens/invalid`, `/errors/tokens/required`, `/errors/too-many-requests`, `/errors/core/usage-limit-exceeded`, `/errors/core/forbidden`, `/errors/core/unhandled`, `/errors/unhandled`
- `title` (string, obligatoire): Human-readable summary of the error, in English.
- `correlationID` (string, obligatoire): Request correlation id (`rq_` followed by 32 lowercase hex chars, no dashes — e.g. `rq_01abf3...`). Identical to the `X-Correlation-Id` response header. A client-supplied `X-Correlation-Id` request header (at most 128 chars of `A-Z a-z 0-9 . _ : / = -`) is echoed back here and in the response header; a missing or invalid value is silently replaced with a generated `rq_…` id.
- `instance` (string): Pointer to the specific failing resource (e.g. `/items/12345`). Path-only, no `/v1` version prefix. Absent on unknown-path `404` and unexpected `500` responses.
- `code` (string): Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. `not-available-for-api-token` on 403). Use this for fine-grained branching after dispatching on `type`.
- `errors` (array of object): Field-level error details. Present on request-validation `/errors/invalid-request` (400) responses. Absent on malformed-JSON `400`, `413` body-too-large, and most errors mapped from BoxHero core (which include it only when core supplies an array; this can include `403`). Each entry locates a single failure via JSONPath-like `path` segments and a human-readable `message`.

  - `path` (array of string | number, obligatoire)
  - `message` (string, obligatoire)

**401** Missing, invalid, or revoked API token. `/errors/tokens/required` when no Bearer token is sent; `/errors/tokens/invalid` when the token is unknown or revoked (a revoked token may keep working for up to 60 seconds because validation results are cached).

- `id` (string, obligatoire): Unique exception id (`ex_` followed by 32 lowercase hex chars, no dashes — e.g. `ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a`). Quote this in support tickets so we can find the request in our logs.
- `type` (string, obligatoire): Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on `title`.

  Valeurs possibles: `/errors/not-found`, `/errors/invalid-request`, `/errors/invalid-team-mode`, `/errors/tokens/invalid`, `/errors/tokens/required`, `/errors/too-many-requests`, `/errors/core/usage-limit-exceeded`, `/errors/core/forbidden`, `/errors/core/unhandled`, `/errors/unhandled`
- `title` (string, obligatoire): Human-readable summary of the error, in English.
- `correlationID` (string, obligatoire): Request correlation id (`rq_` followed by 32 lowercase hex chars, no dashes — e.g. `rq_01abf3...`). Identical to the `X-Correlation-Id` response header. A client-supplied `X-Correlation-Id` request header (at most 128 chars of `A-Z a-z 0-9 . _ : / = -`) is echoed back here and in the response header; a missing or invalid value is silently replaced with a generated `rq_…` id.
- `instance` (string): Pointer to the specific failing resource (e.g. `/items/12345`). Path-only, no `/v1` version prefix. Absent on unknown-path `404` and unexpected `500` responses.
- `code` (string): Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. `not-available-for-api-token` on 403). Use this for fine-grained branching after dispatching on `type`.
- `errors` (array of object): Field-level error details. Present on request-validation `/errors/invalid-request` (400) responses. Absent on malformed-JSON `400`, `413` body-too-large, and most errors mapped from BoxHero core (which include it only when core supplies an array; this can include `403`). Each entry locates a single failure via JSONPath-like `path` segments and a human-readable `message`.

  - `path` (array of string | number, obligatoire)
  - `message` (string, obligatoire)

**404** No bundle with the given SKU was found in this team.

- `id` (string, obligatoire): Unique exception id (`ex_` followed by 32 lowercase hex chars, no dashes — e.g. `ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a`). Quote this in support tickets so we can find the request in our logs.
- `type` (string, obligatoire): Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on `title`.

  Valeurs possibles: `/errors/not-found`, `/errors/invalid-request`, `/errors/invalid-team-mode`, `/errors/tokens/invalid`, `/errors/tokens/required`, `/errors/too-many-requests`, `/errors/core/usage-limit-exceeded`, `/errors/core/forbidden`, `/errors/core/unhandled`, `/errors/unhandled`
- `title` (string, obligatoire): Human-readable summary of the error, in English.
- `correlationID` (string, obligatoire): Request correlation id (`rq_` followed by 32 lowercase hex chars, no dashes — e.g. `rq_01abf3...`). Identical to the `X-Correlation-Id` response header. A client-supplied `X-Correlation-Id` request header (at most 128 chars of `A-Z a-z 0-9 . _ : / = -`) is echoed back here and in the response header; a missing or invalid value is silently replaced with a generated `rq_…` id.
- `instance` (string): Pointer to the specific failing resource (e.g. `/items/12345`). Path-only, no `/v1` version prefix. Absent on unknown-path `404` and unexpected `500` responses.
- `code` (string): Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. `not-available-for-api-token` on 403). Use this for fine-grained branching after dispatching on `type`.
- `errors` (array of object): Field-level error details. Present on request-validation `/errors/invalid-request` (400) responses. Absent on malformed-JSON `400`, `413` body-too-large, and most errors mapped from BoxHero core (which include it only when core supplies an array; this can include `403`). Each entry locates a single failure via JSONPath-like `path` segments and a human-readable `message`.

  - `path` (array of string | number, obligatoire)
  - `message` (string, obligatoire)

**429** Rate limit exceeded. Limits are per team and shared by all of the team's API tokens: 5 requests per second and 300 requests per minute. The `RateLimit` and `X-RateLimit-*` headers reflect the per-minute window; check them and `Retry-After` before retrying. This status is also returned when the client IP exceeds 30 failed authentication attempts within 60 seconds, even if the token is valid.

- `id` (string, obligatoire): Unique exception id (`ex_` followed by 32 lowercase hex chars, no dashes — e.g. `ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a`). Quote this in support tickets so we can find the request in our logs.
- `type` (string, obligatoire): Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on `title`.

  Valeurs possibles: `/errors/not-found`, `/errors/invalid-request`, `/errors/invalid-team-mode`, `/errors/tokens/invalid`, `/errors/tokens/required`, `/errors/too-many-requests`, `/errors/core/usage-limit-exceeded`, `/errors/core/forbidden`, `/errors/core/unhandled`, `/errors/unhandled`
- `title` (string, obligatoire): Human-readable summary of the error, in English.
- `correlationID` (string, obligatoire): Request correlation id (`rq_` followed by 32 lowercase hex chars, no dashes — e.g. `rq_01abf3...`). Identical to the `X-Correlation-Id` response header. A client-supplied `X-Correlation-Id` request header (at most 128 chars of `A-Z a-z 0-9 . _ : / = -`) is echoed back here and in the response header; a missing or invalid value is silently replaced with a generated `rq_…` id.
- `instance` (string): Pointer to the specific failing resource (e.g. `/items/12345`). Path-only, no `/v1` version prefix. Absent on unknown-path `404` and unexpected `500` responses.
- `code` (string): Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. `not-available-for-api-token` on 403). Use this for fine-grained branching after dispatching on `type`.
- `errors` (array of object): Field-level error details. Present on request-validation `/errors/invalid-request` (400) responses. Absent on malformed-JSON `400`, `413` body-too-large, and most errors mapped from BoxHero core (which include it only when core supplies an array; this can include `403`). Each entry locates a single failure via JSONPath-like `path` segments and a human-readable `message`.

  - `path` (array of string | number, obligatoire)
  - `message` (string, obligatoire)

Requête

**cURL**

```bash
curl --request GET \
  --url 'https://rest.boxhero-app.com/v1/bundles/by-sku/{sku}' \
  --header "Authorization: Bearer $BOXHERO_API_TOKEN"
```

**JavaScript**

```javascript
const response = await fetch("https://rest.boxhero-app.com/v1/bundles/by-sku/{sku}", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BOXHERO_API_TOKEN}`,
  },
});
const data = await response.json();
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://rest.boxhero-app.com/v1/bundles/by-sku/{sku}",
    headers={
        "Authorization": "Bearer " + os.environ["BOXHERO_API_TOKEN"],
    },
)
data = response.json()
```

**HTTP**

```http
GET /v1/bundles/by-sku/{sku} HTTP/1.1
Host: rest.boxhero-app.com
Authorization: Bearer <token>
```

Réponse

**200**

```json
{
  "item": {
    "id": 4042,
    "name": "Starter Kit",
    "sku": "BUNDLE-STARTER",
    "barcode": "8801234567890",
    "cost": "12.5",
    "price": "29.99",
    "photo_url": null,
    "memo": "",
    "count_of_components": 2,
    "components": [
      {
        "item": {
          "id": 14290445,
          "name": "Finish Setting Powder",
          "sku": "SKU-12345678",
          "barcode": "2097678335587",
          "deleted": false
        },
        "quantity": 1
      },
      {
        "item": {
          "id": 14290446,
          "name": "Hydrating Face Toner",
          "sku": "SKU-12345679",
          "barcode": "2097678335588",
          "deleted": false
        },
        "quantity": 2
      }
    ]
  }
}
```

**400**

```json
{
  "id": "ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a",
  "correlationID": "rq_01abf3c2b8e44a59be2a9c0f1e7d6a40",
  "type": "/errors/invalid-team-mode",
  "title": "This API is only available in Location mode. For Basic or Unit mode, please contact support.",
  "instance": "/bundles/by-sku/SKU-123"
}
```

**401**

```json
{
  "id": "ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a",
  "correlationID": "rq_01abf3c2b8e44a59be2a9c0f1e7d6a40",
  "type": "/errors/tokens/required",
  "title": "Missing API token. Provide a Bearer token in the Authorization header.",
  "instance": "/bundles/by-sku/SKU-123",
  "example": "Bearer wqnot0dlysdg5vymubzi4kiv"
}
```

**404**

```json
{
  "id": "ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a",
  "correlationID": "rq_01abf3c2b8e44a59be2a9c0f1e7d6a40",
  "type": "/errors/not-found",
  "title": "No bundle with the given SKU was found in this team.",
  "instance": "/bundles/by-sku/SKU-123"
}
```

**429**

```json
{
  "id": "ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a",
  "correlationID": "rq_01abf3c2b8e44a59be2a9c0f1e7d6a40",
  "type": "/errors/too-many-requests",
  "title": "Too many requests.",
  "instance": "/bundles/by-sku/SKU-123",
  "retryAfter": 60
}
```
