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

# Get product blocks to upsert products

> Get product blocks to upsert products

## Overview

Get all product blocks (prompt blocks) configured for your organization. Product blocks are containers that hold related products and are used by AI assistants to recommend products to customers.

Use this endpoint to see which product blocks you can manage with the create, upsert, and delete endpoints.

## Use Cases

* **List Available Catalogs**: See all product catalogs you can manage
* **Integration Setup**: Get block IDs for product sync operations
* **Catalog Selection**: Allow users to select which catalog to update
* **Validation**: Verify block exists before product operations

## Authentication

```
x-api-key: your_api_key_here
```

## Response Structure

Returns an array of product block objects:

| Field   | Type          | Description                      |
| ------- | ------------- | -------------------------------- |
| `id`    | string (UUID) | Product block identifier         |
| `name`  | string        | Product block name               |
| `count` | number        | Number of products in this block |

## Example Request

```bash theme={null}
curl --request GET \
  'https://api.vambe.me/api/public/product/product-blocks' \
  --header 'x-api-key: your_api_key_here'
```

## Example Response

```json theme={null}
[
  {
    "id": "block-abc123",
    "name": "Main Product Catalog",
    "count": 150
  },
  {
    "id": "block-def456",
    "name": "Seasonal Products",
    "count": 25
  }
]
```

## Error Responses

| Status Code | Description                               |
| ----------- | ----------------------------------------- |
| 401         | Unauthorized - Invalid or missing API key |
| 403         | Forbidden - Insufficient permissions      |
| 500         | Internal Server Error                     |

## Related Endpoints

* [POST /api/public/product/create/{promptBlockId}](/reference/product/create-products) - Add products to block
* [POST /api/public/product/upsert/{promptBlockId}](/reference/product/upsert-products) - Sync entire catalog
* [POST /api/public/product/delete/{promptBlockId}](/reference/product/delete-products) - Remove products


## OpenAPI

````yaml get /api/public/product/product-blocks
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/product/product-blocks:
    get:
      tags:
        - Product
      summary: Get product blocks to upsert products
      description: Get product blocks to upsert products
      operationId: PublicProductController_getProductBlocks
      parameters:
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Product blocks retrieved successfully.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.

````