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

# Swag Products Access

> Access Snappy's swag catalog. Requires the Snappy-Account-Id header and swag-specific filters.

The Swag Products Access pattern covers how to browse and filter Snappy's swag catalog — branded merchandise that ships to recipients. Swag access differs from the standard marketplace in one key way: all calls require the `Snappy-Account-Id` header, scoping requests to a specific account's swag configuration.

## Prerequisites

* A Snappy account with swag enabled
* An API key with `products:read` and `collections:read` scopes
* The `accountId` for the account whose swag you're accessing

## The Snappy-Account-Id header

Every swag API call must include:

```http theme={null}
Snappy-Account-Id: <accountId>
```

Without it, swag requests return `400` ("Account ID must be provided to retrieve swag products"). The Swag base products and base variants endpoints require it on every request. This header scopes the request to an account's swag catalog and pricing configuration.

## Three endpoints

### 1. List Swag collections

Retrieve collections tagged as swag to discover what's available for your account.

```text theme={null}
GET /v3/collections?filter[tag]=swag
```

```javascript JavaScript theme={null}
const res = await fetch(`${SNAPPY}/v3/collections?filter[tag]=swag`, {
  headers: {
    ...headers,
    "Snappy-Account-Id": accountId,
  },
});
const { data: swagCollections } = await res.json();
```

### 2. List products in a Swag collection

Once you have a collection ID, fetch its products with the swag catalog filter:

```text theme={null}
GET /v3/collections/{collectionId}/products?filter[catalog]=swag
```

```javascript JavaScript theme={null}
const url = new URL(`${SNAPPY}/v3/collections/${collectionId}/products`);
url.searchParams.set("filter[catalog]", "swag");
url.searchParams.set("location", "US");
url.searchParams.set("include", "brand,tags");
url.searchParams.set("page[size]", "100");

const res = await fetch(url, {
  headers: {
    ...headers,
    "Snappy-Account-Id": accountId,
  },
});
const { data: products } = await res.json();
```

### 3. List all Swag products (across collections)

To fetch all swag products without filtering by collection:

```text theme={null}
GET /v3/products?filter[catalog]=swag
```

```python Python theme={null}
params = {
    "filter[catalog]": "swag",
    "location": "US",
    "include": "brand,tags",
    "page[size]": 100,
}
res = requests.get(
    f"{SNAPPY}/v3/products",
    headers={**headers, "Snappy-Account-Id": account_id},
    params=params,
)
products = res.json()["data"]
```

## Swag base products (coming soon)

Snappy is adding a Base Products API for swag that exposes the underlying product catalog before account-specific configuration is applied. This is useful for building swag configurators and admin tooling. See the [API Reference](https://docs.snappy.com/modules/api/v3/swag/overview.md) for the current spec.

## Common pitfalls

| Pitfall | Fix |
| :- | :- |
| Missing `Snappy-Account-Id` header | All swag calls require this header; requests without it return `400` ("Account ID must be provided to retrieve swag products"). Base products/variants endpoints require it on every request |
| Omitting `filter[catalog]=swag` | Without this filter, swag products may not appear in standard product queries |
| Using swag products with the wrong account | Swag pricing and availability is account-scoped; always pass the correct `accountId` |

## Related

* [Real-Time Catalog Access](https://docs.snappy.com/guides/patterns/real-time-catalog-access.md) — standard marketplace catalog pattern
* [Place Orders](https://docs.snappy.com/guides/patterns/place-orders.md) — placing swag orders (also requires `Snappy-Account-Id`)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.