# Repzo API - Payment Terms

OpenAPI specification for Repzo Payment Terms endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/paymentterms`

#### GET /paymentterms

**Summary:** Find payment terms

##### Parameters

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

| `params` | query | object | No | Query parameters for filtering payment terms |

##### Responses

**200** - A list of payment terms

Content-Type: `application/json`

---

#### POST /paymentterms

**Summary:** Create a payment term

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Payment term created

Content-Type: `application/json`

---

### `/paymentterms/{id}`

#### GET /paymentterms/{id}

**Summary:** Get a payment term by ID

##### Parameters

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

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

##### Responses

**200** - Payment term details

Content-Type: `application/json`

---

#### PUT /paymentterms/{id}

**Summary:** Update a payment term

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Payment term updated

Content-Type: `application/json`

---

#### DELETE /paymentterms/{id}

**Summary:** Remove a payment term

##### Parameters

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

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

##### Responses

**200** - Payment term removed

Content-Type: `application/json`

---

## Data Models

### PaymentTermFindResult

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

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

| `result` | array | No | No description |

| `pagination` | object | No | No description |

### PaymentTermCreateBody

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

| `name` | string | Yes | Name of the payment term |

| `description` | string | No | Description of the payment term |

| `days` | integer | No | Number of days for payment |

| `discount_percentage` | number | No | Discount percentage if paid early |

| `discount_days` | integer | No | Number of days for discount eligibility |

| `is_active` | boolean | No | Whether the payment term is active |

### PaymentTermCreateResult

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

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

| `result` | object | No | No description |

### PaymentTermGetResult

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

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

| `result` | object | No | No description |

### PaymentTermUpdateBody

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

| `name` | string | No | Name of the payment term |

| `description` | string | No | Description of the payment term |

| `days` | integer | No | Number of days for payment |

| `discount_percentage` | number | No | Discount percentage if paid early |

| `discount_days` | integer | No | Number of days for discount eligibility |

| `is_active` | boolean | No | Whether the payment term is active |

### PaymentTermUpdateResult

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

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

| `result` | object | No | No description |

### PaymentTermRemoveResult

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

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

| `result` | object | No | No description |

### PaymentTerm

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

| `_id` | string | No | Unique identifier |

| `name` | string | No | Name of the payment term |

| `description` | string | No | Description of the payment term |

| `days` | integer | No | Number of days for payment |

| `discount_percentage` | number | No | Discount percentage if paid early |

| `discount_days` | integer | No | Number of days for discount eligibility |

| `is_active` | boolean | No | Whether the payment term is active |

| `created_at` | string | No | Creation timestamp |

| `updated_at` | string | No | Last update timestamp |

| `company_id` | string | No | Company identifier |

### Pagination

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

| `total` | integer | No | Total number of items |

| `page` | integer | No | Current page number |

| `per_page` | integer | No | Items per page |

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

## TypeScript Usage

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