# Stores

Ecommerce storefronts and the products they sell.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /stores/:store_id/products

Add an existing crm_product to a store, with optional storefront overrides (price_override, storefront_title, images, display_order).

**Scopes:** `ecommerce:write` — [full detail](./stores/post-stores-store-id-products.md)

### POST /stores

Create an ecommerce storefront. Slug auto-derives from name if omitted. Sells crm_products via add_store_product.

**Scopes:** `ecommerce:write` — [full detail](./stores/post-stores.md)

### DELETE /stores/:store_id

Delete an ecommerce store. Fails if it has orders (deactivate instead).

**Scopes:** `ecommerce:delete` — [full detail](./stores/delete-stores-store-id.md)

### GET /stores/:store_id

Fetch a single ecommerce store by UUID.

**Scopes:** `ecommerce:read` — [full detail](./stores/get-stores-store-id.md)

### GET /stores/:store_id/products

List the catalog (products) for a store.

**Scopes:** `ecommerce:read` — [full detail](./stores/get-stores-store-id-products.md)

### GET /stores

List ecommerce storefronts in the workspace.

**Scopes:** `ecommerce:read` — [full detail](./stores/get-stores.md)

### DELETE /stores/:store_id/products/:store_product_id

Remove a product from a store (does not delete the underlying crm_product).

**Scopes:** `ecommerce:delete` — [full detail](./stores/delete-stores-store-id-products-store-product-id.md)

### PATCH /stores/:store_id

Update an ecommerce store (name, branding, currency, tax, fulfillment pipeline, etc.).

**Scopes:** `ecommerce:write` — [full detail](./stores/patch-stores-store-id.md)

### PATCH /stores/:store_id/products/:store_product_id

Update a store product (price_override, visibility, storefront overrides, display order).

**Scopes:** `ecommerce:write` — [full detail](./stores/patch-stores-store-id-products-store-product-id.md)
