# Repzo API - Variant

OpenAPI specification for Repzo Variant endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/variant`

#### GET /variant

**Summary:** Find variants

##### Parameters

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

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

##### Responses

**200** - A list of variants

Content-Type: `application/json`

---

#### POST /variant

**Summary:** Create a variant

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Variant created

Content-Type: `application/json`

---

### `/variant/{id}`

#### GET /variant/{id}

**Summary:** Get a variant by ID

##### Parameters

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

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

##### Responses

**200** - Variant details

Content-Type: `application/json`

---

#### PUT /variant/{id}

**Summary:** Update a variant

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Variant updated

Content-Type: `application/json`

---

#### DELETE /variant/{id}

**Summary:** Remove a variant

##### Parameters

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

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

##### Responses

**200** - Variant removed

Content-Type: `application/json`

---

## Data Models

### VariantFindResult

Result of finding variants

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

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

| `total_result` | number | No | Total number of variants |

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

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

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

| `per_page` | number | No | Number of variants 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 |

### VariantSchema

Variant schema

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

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

| `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 |

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

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

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

### VariantCreateBody

Body for creating a variant

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

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

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

| `price` | number | Yes | 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 |

### VariantCreateResult

Result of creating a variant

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

| `$ref` | object | No | No description |

### VariantGetResult

Result of getting a variant

### VariantUpdateBody

Body for updating 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 |

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

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

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

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

### VariantUpdateResult

Result of updating a variant

### VariantRemoveResult

Result of removing a variant

## TypeScript Usage

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