# Repzo API - Contract

OpenAPI specification for Repzo Contract endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/contract`

#### GET /contract

**Summary:** Find contracts

##### Parameters

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

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

##### Responses

**200** - A list of contracts

Content-Type: `application/json`

---

#### POST /contract

**Summary:** Create a contract

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Contract created

Content-Type: `application/json`

---

### `/contract/{id}`

#### GET /contract/{id}

**Summary:** Get a contract by ID

##### Parameters

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

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

##### Responses

**200** - Contract details

Content-Type: `application/json`

---

#### PUT /contract/{id}

**Summary:** Update a contract

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Contract updated

Content-Type: `application/json`

---

#### DELETE /contract/{id}

**Summary:** Remove a contract

##### Parameters

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

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

##### Responses

**200** - Contract removed

Content-Type: `application/json`

---

## Data Models

### ContractFindResult

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

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

| `meta` | object | No | No description |

### ContractCreateBody

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

| `title` | string | No | No description |

| `client` | string | No | No description |

| `startDate` | string | No | No description |

| `endDate` | string | No | No description |

| `totalAmount` | number | No | No description |

| `currency` | string | No | No description |

| `status` | string | No | No description |

| `terms` | string | No | No description |

| `installments` | array | No | No description |

### ContractCreateResult

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

| `data` | object | No | No description |

### ContractGetResult

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

| `data` | object | No | No description |

### ContractUpdateBody

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

| `title` | string | No | No description |

| `client` | string | No | No description |

| `startDate` | string | No | No description |

| `endDate` | string | No | No description |

| `totalAmount` | number | No | No description |

| `currency` | string | No | No description |

| `status` | string | No | No description |

| `terms` | string | No | No description |

| `installments` | array | No | No description |

### ContractUpdateResult

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

| `data` | object | No | No description |

### ContractRemoveResult

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

| `success` | boolean | No | No description |

### Contract

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

| `_id` | string | No | No description |

| `title` | string | No | No description |

| `client` | string | No | No description |

| `startDate` | string | No | No description |

| `endDate` | string | No | No description |

| `totalAmount` | number | No | No description |

| `currency` | string | No | No description |

| `status` | string | No | No description |

| `terms` | string | No | No description |

| `installments` | array | No | No description |

| `createdAt` | string | No | No description |

| `updatedAt` | string | No | No description |

## TypeScript Usage

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