# Store Asset Part Unit API

API for managing asset part unit storage operations

**Version:** 1.0.0

## Overview

### Base URLs

- **Production server**: `https://sv.api.repzo.me`

- **Staging server**: `https://staging.sv.api.repzo.me`

### API Categories

- **Store Asset Part Unit**: Operations related to storing asset part units

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/store-asset-part-unit`

#### GET /store-asset-part-unit

**Summary:** Get all asset part unit storage records

**Description:** Retrieve a list of all asset part unit storage records with optional filtering and pagination

**Tags:** Store Asset Part Unit

##### Parameters

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

| `limit` | query | integer | No | Maximum number of records to return |

| `offset` | query | integer | No | Number of records to skip for pagination |

| `sort` | query | string | No | Field to sort by |

| `order` | query | string | No | Sort order (asc or desc) |

| `filter` | query | string | No | Filter conditions in JSON format |

| `search` | query | string | No | Search term for text fields |

##### Responses

**200** - List of asset part unit storage records retrieved successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

#### POST /store-asset-part-unit

**Summary:** Create a new asset part unit storage record

**Description:** Create a new asset part unit storage record with the provided data

**Tags:** Store Asset Part Unit

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Asset part unit storage record created successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

### `/store-asset-part-unit/{id}`

#### GET /store-asset-part-unit/{id}

**Summary:** Get asset part unit storage record by ID

**Description:** Retrieve a specific asset part unit storage record by its ID

**Tags:** Store Asset Part Unit

##### Parameters

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

| `id` | path | string | Yes | Asset part unit storage record ID |

##### Responses

**200** - Asset part unit storage record retrieved successfully

Content-Type: `application/json`

**404** - Asset part unit storage record not found

**401** - Unauthorized

**500** - Internal server error

---

#### PUT /store-asset-part-unit/{id}

**Summary:** Update asset part unit storage record

**Description:** Update an existing asset part unit storage record with new data

**Tags:** Store Asset Part Unit

##### Parameters

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

| `id` | path | string | Yes | Asset part unit storage record ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Asset part unit storage record updated successfully

Content-Type: `application/json`

**400** - Bad request

**404** - Asset part unit storage record not found

**401** - Unauthorized

**500** - Internal server error

---

#### DELETE /store-asset-part-unit/{id}

**Summary:** Delete asset part unit storage record

**Description:** Delete an existing asset part unit storage record

**Tags:** Store Asset Part Unit

##### Parameters

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

| `id` | path | string | Yes | Asset part unit storage record ID |

##### Responses

**200** - Asset part unit storage record deleted successfully

Content-Type: `application/json`

**404** - Asset part unit storage record not found

**401** - Unauthorized

**500** - Internal server error

---

## Data Models

### StoreAssetPartUnit

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

| `_id` | string | No | Unique identifier for the storage record |

| `storageNumber` | string | Yes | Unique storage number |

| `assetPartUnit` | string | Yes | Asset part unit ID being stored |

| `serialNumber` | string | No | Serial number of the part unit |

| `storageType` | string | Yes | Type of storage |

| `storageReason` | string | No | Reason for storage |

| `storedBy` | string | Yes | User who stored the part |

| `authorizedBy` | string | No | User who authorized the storage |

| `storageDate` | string | No | Date when the part was stored |

| `expectedRetrievalDate` | string | No | Expected retrieval date |

| `location` | object | Yes | No description |

| `status` | string | No | Current storage status |

| `condition` | string | No | Condition when stored |

| `storageEnvironment` | object | No | No description |

| `preservationMethod` | string | No | Preservation method used |

| `lastInspectionDate` | string | No | Last inspection date |

| `nextInspectionDate` | string | No | Next scheduled inspection date |

| `reservedFor` | object | No | No description |

| `tags` | array | No | Storage tags for categorization |

| `barcode` | string | No | Storage barcode |

| `qrCode` | string | No | Storage QR code |

| `weight` | number | No | Weight of the stored item |

| `dimensions` | object | No | No description |

| `storageHistory` | array | No | No description |

| `notes` | string | No | Additional notes |

| `metadata` | object | No | Additional metadata |

| `createdAt` | string | No | Record creation timestamp |

| `updatedAt` | string | No | Record last update timestamp |

### StoreAssetPartUnitInput

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

| `storageNumber` | string | Yes | Unique storage number |

| `assetPartUnit` | string | Yes | Asset part unit ID being stored |

| `serialNumber` | string | No | Serial number of the part unit |

| `storageType` | string | Yes | Type of storage |

| `storageReason` | string | No | Reason for storage |

| `storedBy` | string | Yes | User who stored the part |

| `authorizedBy` | string | No | User who authorized the storage |

| `storageDate` | string | No | Date when the part was stored |

| `expectedRetrievalDate` | string | No | Expected retrieval date |

| `location` | object | Yes | No description |

| `status` | string | No | Current storage status |

| `condition` | string | No | Condition when stored |

| `storageEnvironment` | object | No | No description |

| `preservationMethod` | string | No | Preservation method used |

| `lastInspectionDate` | string | No | Last inspection date |

| `nextInspectionDate` | string | No | Next scheduled inspection date |

| `reservedFor` | object | No | No description |

| `tags` | array | No | Storage tags for categorization |

| `barcode` | string | No | Storage barcode |

| `qrCode` | string | No | Storage QR code |

| `weight` | number | No | Weight of the stored item |

| `dimensions` | object | No | No description |

| `notes` | string | No | Additional notes |

| `metadata` | object | No | Additional metadata |

## TypeScript Usage

See [store-asset-part-unit-examples.md](./store-asset-part-unit-examples.md) for detailed TypeScript usage examples.
