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

# gifts.list

> Brindes de checkout ativos na vitrine.

# storefront.gifts.list(options)

Lista brindes **ativos** publicados pela loja (mesmo payload do checkout marketing).

Tipo retornado: [Gift (brinde)](https://docs-loja.usecorvex.com.br/data/resources/gift.md).

***

## Parâmetros

| Campo | Tipo | Descrição |
| - | - | - |
| `productIds` | `string[]` | IDs no carrinho (contexto de marketing) |
| `cep` | `string` | CEP do cliente |
| `state` | `string` | UF |
| `subtotal` | `number` | Subtotal do carrinho |

Os limiares (`minCartTotal`, `minCartQuantity`, …) vêm em cada item — o tema pode filtrar no cliente, ou usar [gifts.eligible](https://docs-loja.usecorvex.com.br/data/actions/gifts-eligible.md) para a lista já elegível.

***

## Retorno

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Connection<Gift>
```

***

## Exemplo

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
export const data = defineSectionData(async ({ storefront, cart }) => ({
  gifts: await storefront.gifts.list({
    subtotal: cart?.subtotalPrice ?? 0,
    productIds: cart?.items?.map((item) => item.productId),
  }),
}));
```

***

## Hook

```jsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
const { data: gifts } = useCorvexData('gifts', { subtotal: 199.9 });
```

***

## Declaração schema.data

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
data: ['gifts']
```

Elegibilidade no carrinho (POST): [gifts.eligible](https://docs-loja.usecorvex.com.br/data/actions/gifts-eligible.md).


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