# Repzo API - Measure Unit

OpenAPI specification for Repzo Measure Unit endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/measure-unit`

#### GET /measure-unit

**Summary:** Find measure units

##### Parameters

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

| `params` | query | object | No | Query parameters for filtering measure units |

##### Responses

**200** - A list of measure units

Content-Type: `application/json`

---

#### POST /measure-unit

**Summary:** Create a measure unit

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Measure unit created

Content-Type: `application/json`

---

### `/measure-unit/{id}`

#### GET /measure-unit/{id}

**Summary:** Get a measure unit by ID

##### Parameters

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

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

##### Responses

**200** - Measure unit details

Content-Type: `application/json`

---

#### PUT /measure-unit/{id}

**Summary:** Update a measure unit

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Measure unit updated

Content-Type: `application/json`

---

#### DELETE /measure-unit/{id}

**Summary:** Remove a measure unit

##### Parameters

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

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

##### Responses

**200** - Measure unit removed

Content-Type: `application/json`

---

## Data Models

### MeasureUnitFindResult

Result of finding measure units

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

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

| `total_result` | number | No | Total number of measure units |

| `current_count` | number | No | Count of measure units in current page |

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

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

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

### MeasureUnitSchema

Measure unit schema

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

| `_id` | string | No | Unique identifier for the measure unit |

| `name` | string | No | Name of the measure unit |

| `factor` | number | No | Factor of the measure unit |

| `local_name` | string | No | Localized name of the measure unit |

| `parent` | string | No | Parent measure unit ID |

| `disabled` | boolean | No | Whether the measure unit is disabled |

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

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

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

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

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

### MeasureUnitFamilySchema

Measure unit family schema

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

| `_id` | string | No | Unique identifier for the measure unit family |

| `name` | string | No | Name of the measure unit family |

| `local_name` | string | No | Localized name of the measure unit family |

| `measureunits` | array | No | Measure unit IDs in this family |

| `disabled` | boolean | No | Whether the measure unit family is disabled |

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

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

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

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

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

### MeasureUnitCreateBody

Body for creating a measure unit

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

| `name` | string | Yes | Name of the measure unit |

| `factor` | number | Yes | Factor of the measure unit |

| `local_name` | string | No | Localized name of the measure unit |

| `parent` | string | No | Parent measure unit ID |

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

| `disabled` | boolean | No | Whether the measure unit is disabled |

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

### MeasureUnitCreateResult

Result of creating a measure unit

### MeasureUnitGetResult

Result of getting a measure unit

### MeasureUnitUpdateBody

Body for updating a measure unit

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

| `name` | string | No | Name of the measure unit |

| `factor` | number | No | Factor of the measure unit |

| `local_name` | string | No | Localized name of the measure unit |

| `parent` | string | No | Parent measure unit ID |

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

| `disabled` | boolean | No | Whether the measure unit is disabled |

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

| `_id` | string | No | Unique identifier for the measure unit |

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

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

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

### MeasureUnitUpdateResult

Result of updating a measure unit

### MeasureUnitRemoveResult

Result of removing a measure unit

## TypeScript Usage

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