# Repzo API - Product

OpenAPI specification for Repzo Product endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

- \*\*\*\*: `https://sv.api.repzo.me`

## Authentication

No authentication required.

## Endpoints

### `/product`

#### GET /product

**Summary:** Find products

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `params` | query | object | No | Query parameters for filtering products |

##### Responses

**200** - A list of products

Content-Type: `application/json`

---

#### POST /product

**Summary:** Create a product

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Product created

Content-Type: `application/json`

---

### `/product/{id}`

#### GET /product/{id}

**Summary:** Get a product by ID

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Product details

Content-Type: `application/json`

---

#### PUT /product/{id}

**Summary:** Update a product

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Product updated

Content-Type: `application/json`

---

#### DELETE /product/{id}

**Summary:** Remove a product

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Product removed

Content-Type: `application/json`

---

## Data Models

### ProductFindResult

Result of finding products

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | array | No | No description |

| `total_result` | number | No | Total number of products |

| `current_count` | number | No | Count of products in current page |

| `total_pages` | number | No | Total number of pages |

| `current_page` | number | No | Current page number |

| `per_page` | number | No | Number of products per page |

| `first_page_url` | string | No | URL for the first page |

| `last_page_url` | string | No | URL for the last page |

| `next_page_url` | string | No | URL for the next page |

| `prev_page_url` | string | No | URL for the previous page |

| `path` | string | No | Base URL path |

### ProductSchema

Product schema

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `_id` | string | No | Unique identifier for the product |

| `name` | string | No | Name of the product |

| `category` | string | No | ID of the product category |

| `active` | boolean | No | Whether the product is active |

| `company_namespace` | array | No | Company namespaces |

| `local_name` | string | No | Localized name of the product |

| `sku` | string | No | Stock keeping unit |

| `sub_category` | array | No | IDs of the product sub-categories |

| `assigned_to` | array | No | Representatives assigned to this product |

| `auditable` | boolean | No | Whether the product is auditable |

| `barcode` | string | No | Barcode of the product |

| `sv_tax` | string | No | ID of the tax |

| `sv_measureUnit` | string | No | ID of the measure unit |

| `description` | string | No | Description of the product |

| `local_description` | string | No | Localized description of the product |

| `product_img` | string | No | Product image URL |

| `base_price` | string | No | Base price of the product |

| `assigned_media` | array | No | Media assigned to this product |

| `html_description` | string | No | HTML description of the product |

| `modifiers_group` | array | No | Modifier groups for the product |

| `featured` | boolean | No | Whether the product is featured |

| `brand` | string | No | ID of the brand |

| `rsp` | number | No | Recommended selling price |

| `measureunit_family` | string | No | ID of the measure unit family |

| `integration_meta` | object | No | Integration metadata |

| `teams` | array | No | Teams |

| `position` | number | No | Position of the product |

| `product_groups` | array | No | Product groups |

| `frozen_pre_sales` | boolean | No | Whether pre-sales are frozen |

| `frozen_sales` | boolean | No | Whether sales are frozen |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### ProductCreateBody

Body for creating a product

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | Yes | Name of the product |

| `category` | string | Yes | ID of the product category |

| `active` | boolean | No | Whether the product is active |

| `company_namespace` | array | No | Company namespaces |

| `local_name` | string | No | Localized name of the product |

| `sku` | string | No | Stock keeping unit |

| `sub_category` | array | No | IDs of the product sub-categories |

| `assigned_to` | array | No | Representatives assigned to this product |

| `auditable` | boolean | No | Whether the product is auditable |

| `barcode` | string | No | Barcode of the product |

| `sv_tax` | string | No | ID of the tax |

| `sv_measureUnit` | string | No | ID of the measure unit |

| `description` | string | No | Description of the product |

| `local_description` | string | No | Localized description of the product |

| `product_img` | string | No | Product image URL |

| `base_price` | string | No | Base price of the product |

| `assigned_media` | array | No | Media assigned to this product |

| `html_description` | string | No | HTML description of the product |

| `modifiers_group` | array | No | Modifier groups for the product |

| `featured` | boolean | No | Whether the product is featured |

| `brand` | string | No | ID of the brand |

| `rsp` | number | No | Recommended selling price |

| `measureunit_family` | string | No | ID of the measure unit family |

| `integration_meta` | object | No | Integration metadata |

| `teams` | array | No | Teams |

| `position` | number | No | Position of the product |

| `product_groups` | array | No | Product groups |

| `frozen_pre_sales` | boolean | No | Whether pre-sales are frozen |

| `frozen_sales` | boolean | No | Whether sales are frozen |

| `variants` | array | No | List of variants for this product |

### ProductCreateResult

Result of creating a product

### ProductGetResult

Result of getting a product

### ProductUpdateBody

Body for updating a product

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | No | Name of the product |

| `category` | string | No | ID of the product category |

| `active` | boolean | No | Whether the product is active |

| `company_namespace` | array | No | Company namespaces |

| `local_name` | string | No | Localized name of the product |

| `sku` | string | No | Stock keeping unit |

| `sub_category` | array | No | IDs of the product sub-categories |

| `assigned_to` | array | No | Representatives assigned to this product |

| `auditable` | boolean | No | Whether the product is auditable |

| `barcode` | string | No | Barcode of the product |

| `sv_tax` | string | No | ID of the tax |

| `sv_measureUnit` | string | No | ID of the measure unit |

| `description` | string | No | Description of the product |

| `local_description` | string | No | Localized description of the product |

| `product_img` | string | No | Product image URL |

| `base_price` | string | No | Base price of the product |

| `assigned_media` | array | No | Media assigned to this product |

| `html_description` | string | No | HTML description of the product |

| `modifiers_group` | array | No | Modifier groups for the product |

| `featured` | boolean | No | Whether the product is featured |

| `brand` | string | No | ID of the brand |

| `rsp` | number | No | Recommended selling price |

| `measureunit_family` | string | No | ID of the measure unit family |

| `integration_meta` | object | No | Integration metadata |

| `teams` | array | No | Teams |

| `position` | number | No | Position of the product |

| `product_groups` | array | No | Product groups |

| `frozen_pre_sales` | boolean | No | Whether pre-sales are frozen |

| `frozen_sales` | boolean | No | Whether sales are frozen |

| `_id` | string | No | Unique identifier for the product |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

| `variants` | array | No | List of variants for this product |

### ProductUpdateResult

Result of updating a product

### ProductRemoveResult

Result of removing a product

### VariantCreateBody

Body for creating a variant

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | No | Name of the variant |

| `product` | string | No | ID of the product this variant belongs to |

| `price` | number | No | Price of the variant |

| `company_namespace` | array | No | Company namespaces |

| `disabled` | boolean | No | Whether the variant is disabled |

| `uuid` | string | No | UUID for the variant |

| `local_name` | string | No | Localized name of the variant |

| `sku` | string | No | Stock keeping unit |

| `barcode` | string | No | Barcode of the variant |

| `weight` | number | No | Weight of the variant |

| `length` | number | No | Length of the variant |

| `width` | number | No | Width of the variant |

| `height` | number | No | Height of the variant |

| `position` | number | No | Position of the variant |

| `default` | boolean | No | Whether this is the default variant |

| `variant_img` | string | No | Image URL for the variant |

| `modifiers_groups` | array | No | Modifier groups for the variant |

| `integration_meta` | object | No | Integration metadata |

## TypeScript Usage

See [product-examples.md](./product-examples.md) for detailed TypeScript usage examples.
