# Repzo API - Refund

OpenAPI specification for Repzo Refund endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/refund`

#### GET /refund

**Summary:** Find refunds

##### Parameters

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

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

##### Responses

**200** - A list of refunds

Content-Type: `application/json`

---

#### POST /refund

**Summary:** Create a refund

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Refund created

Content-Type: `application/json`

---

### `/refund/{id}`

#### GET /refund/{id}

**Summary:** Get a refund by ID

##### Parameters

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

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

##### Responses

**200** - Refund details

Content-Type: `application/json`

---

#### PUT /refund/{id}

**Summary:** Update a refund

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Refund updated

Content-Type: `application/json`

---

## Data Models

### RefundFindResult

Result of finding refunds

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

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

| `total_result` | number | No | Total number of refunds |

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

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

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

| `per_page` | number | No | Number of refunds per page |

### RefundSchema

Refund schema

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

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

| `client` | string | No | Client ID associated with the refund |

| `rep` | string | No | Representative ID who processed the refund |

| `invoice` | string | No | Invoice ID being refunded |

| `amount` | number | No | Refund amount |

| `reason` | string | No | Reason for the refund |

| `status` | string | No | Status of the refund |

| `refundMethod` | string | No | Method of refund |

| `reference` | string | No | Reference number for the refund |

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

| `processedAt` | string | No | When the refund was processed |

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

### RefundCreateBody

Body for creating a refund

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

| `client` | string | Yes | Client ID associated with the refund |

| `rep` | string | No | Representative ID who processed the refund |

| `invoice` | string | No | Invoice ID being refunded |

| `amount` | number | Yes | Refund amount |

| `reason` | string | Yes | Reason for the refund |

| `refundMethod` | string | No | Method of refund |

| `reference` | string | No | Reference number for the refund |

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

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

### RefundCreateResult

Result of creating a refund

### RefundGetResult

Result of getting a refund

### RefundUpdateBody

Body for updating a refund

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

| `status` | string | No | Status of the refund |

| `refundMethod` | string | No | Method of refund |

| `reference` | string | No | Reference number for the refund |

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

| `processedAt` | string | No | When the refund was processed |

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

### RefundUpdateResult

Result of updating a refund

## TypeScript Usage

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