> This is part 1 of 2 of the full documentation (pages 1–100 of 137).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.delos.financial/llms-full.txt/1
> Page index: https://docs.delos.financial/llms.txt

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
This site has an agentic ask interface you may use to query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.delos.financial/index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

---

# Introduction

Welcome to the **Delos API** – the gateway to building seamless digital banking experiences. Our API empowers developers to integrate full-cycle banking operations into their applications, enabling secure customer onboarding, account management, transaction processing, and financial reporting.

#### **Key Features**

Our API provides access to:

* **Customer Management**:
  * Authorize and authenticate users
  * Create, edit, and manage customer profiles
  * Submit and process applications (including document uploads)
* **Account Operations**:
  * Open and modify accounts
  * Manage beneficiary accounts (counterparties)
* **Transaction Processing**:
  * Initiate exchanges, withdrawals, and transfers
  * View transaction history and statuses
  * Download payment confirmations and statements
* **Financial Controls**:
  * Configure custom commission structures for end clients

#### **Who Should Use This API?**

* **Partners**: Integrate banking services into your platforms
* **Business Clients**: Automate corporate banking operations
* **Developers**: Build custom financial applications on our infrastructure

#### **Best practices (general)**

#### 1. **Start with Postman**&#x20;

We recommend using [Postman](https://www.postman.com/) to test our API before writing code:

* **Import our Postman Collection**:

1. Export our postman collection on the Overview page

<figure><img src="https://4120526196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6rExT0pUdQJ46WjzZtpV%2Fuploads%2FsZwRhzQBF2waE29t3rxA%2Fimage.png?alt=media&amp;token=2245dc44-14b6-46e8-83af-96e021e9ecc4" alt=""><figcaption></figcaption></figure>

2. Open Postman → Click "Import" → Upload the file. There will be two options, "Partner OpenAPI Specification" and "Work with the definition file along with an exclusive collection".

* **Choose "Partner OpenAPI"** if:
  * You're comfortable building requests from scratch
  * You need to modify the API definition itself
  * You're integrating with other tools that consume OpenAPI specs
* **Choose "Exclusive Collection"** if:
  * You want to start testing immediately
  * You're new to Postman or this API
  * You want pre-built examples and workflows

<figure><img src="https://4120526196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6rExT0pUdQJ46WjzZtpV%2Fuploads%2FyrdvaHMid0lxm0j4BkI0%2Fimage.png?alt=media&amp;token=6f7645db-a200-4a24-ba48-e30a83d02459" alt=""><figcaption></figcaption></figure>

3. All endpoints will appear in your workspace

* **Set Up Environment Variables**:

*Pro Tip:* Use [https://partner.sandbox.delos.financial](https://partner.sandbox.delos.financial/) in requests – change environments (Sandbox/Production) instantly.

```markdown
1. Create a new environment (e.g., "Sandbox")
2. Add variables:
   - `base_url`: `https://partner.sandbox.delos.financial`
   - `api_key`: Your test API key (can be obtained via POST/auth/login)

```

<mark style="color:blue;">**For your convenience, we have created a full Postman collection that is available in this file:**</mark>

{% file src="/files/zPDDyxISTMGuza0rltub" %}

#### 2. **Authentication Made Easy**

* **Store Tokens Securely**:

Add this to your request's "Headers":

Key: `Authorization` Value: `Bearer {{auth_token}}`

Use Postman’s "Authorization" tab to auto-include tokens

* **Auto-Refresh Tokens**: Set up a [Postman pre-request script](https://learning.postman.com/docs/writing-scripts/pre-request-scripts/) to handle OAuth 2.0 renewal.

#### 3. **Testing & Debugging**

* **Use Postman Tests**: Add basic checks to verify responses:

  ```jsx
  // Example test in Postman's "Tests" tab
  pm.test("Status code is 200", () => pm.response.to.have.status(200));
  pm.test("Response has accounts array", () => {
      const jsonData = pm.response.json();
      pm.expect(jsonData.items).to.be.an('array');
  });

  ```

#### 4. **Production Readiness**

* **Export Code Snippets**:

  ```markdown
  1. In Postman, click "Code" (right of "Send")
  2. Select your language (Python, Node.js, etc.)
  3. Copy/paste into your application

  ```
* **Document Your Work**: Use Postman’s "Documentation" feature to generate internal API docs for your team.

#### 5. **Security Essentials**

* **Never Hardcode Secrets**: Store API keys in Postman’s "Secrets" or environment variables – *never in shared collections*.
* **Mask Sensitive Data**: Enable "Hide Variable Values" in Postman settings.

***

#### Postman Quick Reference Cheat Sheet

| Action             | How To                                                |
| ------------------ | ----------------------------------------------------- |
| **Save a request** | Click "Save" after testing → Choose collection        |
| **Reuse values**   | Use `{{variable_name}}` syntax                        |
| **Debug errors**   | Check Postman Console (`View → Show Postman Console`) |
| **Share configs**  | Export collections/environments as JSON files         |

**Need Help?**

* [Postman Learning Center](https://learning.postman.com/)


# Login

Authenticates a user and returns access/refresh tokens for API authorization. Supports optional 2FA verification.

**Endpoint**

&#x20;`POST/v2/auth/login`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_Login>" %}

### **Request**

#### **Headers**

| Key            | Value              | Required |
| -------------- | ------------------ | -------- |
| `Content-Type` | `application/json` | Yes      |
| `Accept`       | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field          | Type     | Description            | Required | Example              |
| -------------- | -------- | ---------------------- | -------- | -------------------- |
| **`login`**    | `string` | Email                  | Yes      | `"user@example.com"` |
| **`password`** | `string` | Password               | Yes      | `"SecurePass123!"`   |
| **`code`**     | `string` | 2FA code (if enabled). | No       | `"123456"`           |

Credentials are provided by our team when you start testing (test version, stage) and finish testing (production environment).&#x20;

**Example Request Body:**

json

```
{
  "login": "user@example.com",
  "password": "SecurePass123!",
  "code": "123456"
}
```

***

### **Response (200 OK)**

Returns authentication tokens and their expiration times.

#### **Response Fields**

| Field              | Type      | Description                                                         | Example                                  |
| ------------------ | --------- | ------------------------------------------------------------------- | ---------------------------------------- |
| **`accessToken`**  | `string`  | **JWT token** for API authorization. Valid for `accessTtl` seconds. | `"eyJhbGci...xyz"`                       |
| **`refreshToken`** | `string`  | **Long-lived token** to renew `accessToken` when expired.           | `"eyJhbGci...abc"`                       |
| **`UserId`**       | `string`  | Unique user identifier.                                             | `"5ff73da8-224e-44de-a235-2d7a76c3144c"` |
| **`accessTtl`**    | `integer` | **Access token lifetime** (seconds).                                | `3600` (1 hour)                          |
| **`refreshTtl`**   | `integer` | **Refresh token lifetime** (seconds).                               | `2592000` (30 days)                      |

**Example Response:**

```
{
  "accessToken": "eyJhbGci...xyz",
  "refreshToken": "eyJhbGci...abc",
  "guid": "usr_5f3d8e2a",
  "accessTtl": 3600,
  "refreshTtl": 2592000
}
```

### **Error Cases**

1. **Invalid Credentials**:

   ```
   { "error": "Invalid login or password" }
   ```
2. **Missing 2FA Code**:

   ```
   { "error": "2FA code required", "requires2fa": true }
   ```
3. **Expired/Invalid 2FA Code**:

   ```
   { "error": "Invalid or expired 2FA code" }
   ```
4. **Account Locked**:

   ```
   { "error": "Account locked after 5 failed attempts" }
   ```

***

### **Notes**

* **Token Usage**:
  * Include `accessToken` in the `Authorization: Bearer <token>` header for authenticated requests.
  * Use `refreshToken` to call `/v2/auth/refresh` when `accessToken` expires.
* **Security**:
  * Passwords are case-sensitive.
  * `refreshToken` should be stored securely (e.g., HTTP-only cookie).
* **2FA**:
  * The `code` field is optional unless 2FA is enabled for the account.
  * If 2FA is required but not provided, the response will include `"requires2fa": true`.

### Examples

**Real request**&#x20;

```postman_json
{
  "login": "test@delos.financial",
  "password": "testpassword",
  "code": "<string>"
}
```

**Real response**&#x20;

```json
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYzNTQ5NTU1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.OHY4Gtx1S9W-eOjcLUHqPd5gDB4aqVDec7q9to0L9-0",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYzNTUwMTU1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.7n7GBsWhqaLkBU3-exTTau2E1RmGuoUBB7rz-vXtm90",
  "userId": "5ff73da8-224e-44de-a235-2d7a76c3144c",
  "accessTtl": 299,
  "refreshTtl": 899
}
```


# Otp Confirm

Verifies a one-time password (OTP) for two-factor authentication (2FA) and completes the login process. Returns success status upon valid OTP confirmation.

**Endpoint**

&#x20;`POST/v2/auth/otp/confirm`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_OtpConfirm>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field      | Type     | Description                                      | Required | Example    |
| ---------- | -------- | ------------------------------------------------ | -------- | ---------- |
| **`code`** | `string` | **OTP code** (e.g., from SMS/authenticator app). | Yes      | `"123456"` |

**Example Request Body:**

json

```
{
  "code": "123456"
}
```

***

### **Response (200 OK)**

Returns a success flag indicating OTP verification status.

#### **Response Fields**

| Field         | Type      | Description                                | Example |
| ------------- | --------- | ------------------------------------------ | ------- |
| **`success`** | `boolean` | `true` if OTP is valid, `false` otherwise. | `true`  |

**Example Response:**

json

```
{
  "success": true
}
```

### **Error Responses**

1. **Invalid OTP**:

   json

   ```
   {
     "success": false,
     "error": "Invalid OTP code"
   }
   ```
2. **Expired OTP**:

   json

   ```
   {
     "success": false,
     "error": "OTP code expired"
   }
   ```
3. **Missing Authorization**:

   json

   ```
   {
     "error": "Unauthorized"
   }
   ```

***

### **Notes**

* **Token Requirement**: Requires a valid JWT from the initial login attempt (provided in `Authorization` header).
* **OTP Lifetime**: Typically valid for 2-5 minutes (depends on system configuration).
* **Success Behavior**:
  * If `success: true`, the user is fully authenticated.
  * The `accessToken` from the initial login becomes active.

### Examples

**Real request**&#x20;

`{`\
`"code": "951212"`\
`}`

**Real response**&#x20;

200 OK

```
{  "success": true}
```


# Otp Disable

Disables two-factor authentication (2FA) for a user account after verifying a valid one-time password (OTP). Returns success status upon completion.

**Endpoint**

&#x20;`POST/v2/auth/otp/disable`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_OtpDisable>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field      | Type     | Description                                        | Required | Example    |
| ---------- | -------- | -------------------------------------------------- | -------- | ---------- |
| **`code`** | `string` | **Current OTP code** (from authenticator app/SMS). | Yes      | `"987654"` |

**Example Request Body:**

json

```
{
  "code": "987654"
}
```

***

### **Response (200 OK)**

Confirms 2FA deactivation status.

#### **Response Fields**

| Field         | Type      | Description                                    | Example |
| ------------- | --------- | ---------------------------------------------- | ------- |
| **`success`** | `boolean` | `true` if 2FA was disabled, `false` otherwise. | `true`  |

**Example Response:**

json

```
{
  "success": true
}
```

### **Error Responses**

1. **Invalid OTP**:

   ```
   {
     "success": false,
     "error": "Invalid OTP code"
   }
   ```
2. **2FA Not Enabled**:

   ```
   {
     "success": false,
     "error": "2FA is not enabled for this account"
   }
   ```
3. **Authorization Required**:

   ```
   {
     "error": "Unauthorized"
   }
   ```

***

### **Notes**

* **Prerequisites**:
  * User must have 2FA **already enabled**.
  * Requires a valid **JWT** from an active session.
* **Security**:
  * The OTP code must be **current** (typically expires in 30-60 seconds).
  * After disabling, users can re-enable 2FA via `/v2/auth/otp/enable`.
* **Post-Success**:
  * Subsequent logins will **not** require OTP verification.
  * Users should **revoke and reissue backup codes** if applicable.

### Examples

**Real request**&#x20;

`{`\
`"code": "489309"`\
`}`

**Real response**&#x20;

`{`\
`"success": true`\
`}`


# Otp Enable

Initiates two-factor authentication (2FA) setup by generating a new OTP secret and QR code for authenticator apps (Google Authenticator, Authy, etc.).

**Endpoint**

&#x20;`POST/v2/auth/otp/enable`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_OtpEnable>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body**

No body required. Send an empty JSON object:

```
{}
```

***

### **Response (200 OK)**

Returns the OTP setup data for configuring an authenticator app.

#### **Response Fields**

| Field        | Type     | Description                                                          | Example                                  |
| ------------ | -------- | -------------------------------------------------------------------- | ---------------------------------------- |
| **`qr`**     | `string` | **Base64-encoded QR code** image. Scan with authenticator apps.      | `"data:image/png;base64,iVBORw0KGgo..."` |
| **`secret`** | `string` | **OTP secret key** (manual entry option). 32-character alphanumeric. | `"JBSWY3DPEHPK3PXP"`                     |

**Example Response:**

```
{
  "qr": "data:image/png;base64,iVBORw0KGgo...",
  "secret": "JBSWY3DPEHPK3PXP"
}
```

#### **Next Steps**

1. **Scan QR Code** with an authenticator app **OR**
2. **Manually Enter Secret**:

   ```
   Secret: JBSWY3DPEHPK3PXP
   Type: TOTP (Time-based)
   Digits: 6
   Period: 30s
   ```
3. **Verify Setup**: Use `/v2/auth/otp/confirm` with a generated OTP code to activate 2FA.

***

### **Error Responses**

1. **2FA Already Enabled**:

   ```
   {
     "error": "2FA is already active"
   }
   ```
2. **Invalid/Missing Token**:

   ```
   {
     "error": "Unauthorized"
   }
   ```

***

### **Notes**

* **QR Code Usage**:
  * The QR contains the `secret` + issuer info (e.g., `otpauth://totp/YourApp:user@email.com?secret=JBSWY3DPEHPK3PXP&issuer=YourApp`).
* **Backup Codes**: Generate separately via `/v2/auth/otp/backup-codes` after confirmation.
* **Security**:
  * Store the `secret` securely (required for recovery).
  * The QR/secret are **valid for 10 minutes** (confirm promptly).

### Examples

**Real request**&#x20;

```codeql
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYzNTQ5NTU1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.OHY4Gtx1S9W-eOjcLUHqPd5gDB4aqVDec7q9to0L9-0

```

**Real response**&#x20;

```codeql
{
  "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsEAAAAAAMhg3qAAAHbUlEQVR4nOzdwW4bOxKG0cngvv8rZxbZCDAYk2J9Lc/FOctEYrftHwSIIln//P79Hxj330+/AP9OgkVCsEgIFgnBIiFYJASLhGCRECwSgkVCsEgIFgnBIiFYJP75+3//+jX/yNVGndNnvY6z+u7OpqDX767GPH3n081IO8+6GefJv+MfZiwSgkVCsEgIFgnBIvHNqvDV1GqlftbOym71PlMrwZ2f9/Xz9ep19dxT+39HMxYJwSIhWCQEi4RgkThYFb46XfXsjHPz+dOV4M2/rz5zulp8sq63MvV3/MqMRUKwSAgWCcEiIVgk3lwVFnZWVVO1sJsa4qnTZ93ssJ3aiXrPjEVCsEgIFgnBIiFYJH7QqvBmNXS6o/KzZ+6++gnvPMuMRUKwSAgWCcEiIVgk3lwV/oTWTlOrpJszeqfPvakPntZMd3R/RzMWCcEiIVgkBIuEYJE4WBV+6rzbzS0uUze03NTypj6/8z43t+XMMmORECwSgkVCsEgIFolvVoVP1gSnVivFDSrF7+HJnavP13bNWCQEi4RgkRAsEoJF4tff1wvFPZmnuyWnulrUdbTTm2RuVq/FTTWn7/B3ZiwSgkVCsEgIFgnBInGwKnw1tfIqdj8W5wGf7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XD1nsX4O6ZqdsWNOk/2dvzDjEVCsEgIFgnBIiFYJA5qhXVH+LreV+xuXbl5t6nPnD735vNfmbFICBYJwSIhWCQEi8TADtK6u/3NrSn/L7s3X03VLqfGVyvkBxEsEoJFQrBICBaJg9tmbnYhnp6zK26S2XmfouPDytTv4XTMZ3bbmrFICBYJwSIhWCQEi8TBucIdT66qbkydkbyph56udqdu4LmhVsiHCRYJwSIhWCQEi8RBF/u6y8POd4szgDvPXSnOAJ4+a2Wqi8d7K0ozFgnBIiFYJASLhGCRGL5t5tVNR/WbOteT5xB3xlwpdnsWu2rfex8zFgnBIiFYJASLhGCRGNhBWndk+NSu1NNaZ/GeN98tziE6V8iHCRYJwSIhWCQEi8Q3q8K6a8PN2brVv0/tnNwZf8fUyvrGkz0Z/zBjkRAsEoJFQrBICBaJ4TtIV05Xc6fvMHsmbnac0x22RT30pm743u/WjEVCsEgIFgnBIiFYJA5Wha/qDginZxJf3dwFurOj9VR9j+vpam5ltl5pxiIhWCQEi4RgkRAsEm+uCgtT93nedI64GefUzc+yo+h8sTP+H2YsEoJFQrBICBYJwSLxg1aFxbm/J88M7tQZizOVK8WuWucK+TDBIiFYJASLhGCReHNV+OR5vak64Kubc3x1PXHq5zodc+d99pmxSAgWCcEiIVgkBIvEwaqwuI90aoVyuvrb+czNiq/ohn/63dVnnumOYcYiIVgkBIuEYJEQLBLfdLGH95ixSAgWCcEiIVgkBIuEYJEQLBKCRUKwSAgWCcEiIVgkBIuEYJH4XwAAAP//xl+mjdPOCl0AAAAASUVORK5CYII=",
  "secret": "ZEB74RJ6YSNH4KHBWOV4ZOBI"
}
```


# Get Profile

Retrieves authenticated user and partner profile information, including 2FA status.

**Endpoint**

&#x20;`GET/v2/auth/profile`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_Profile>" %}

***

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns user and partner details in a structured JSON object.

#### **Response Fields**

**1. Partner Object**

| Field       | Type     | Description            | Example                                  |
| ----------- | -------- | ---------------------- | ---------------------------------------- |
| **`id`**    | `string` | Unique partner ID.     | `"a2813d61-51a3-487f-b5bb-3aea43dd2581"` |
| **`name`**  | `string` | Partner company name.  | `"Acme Inc."`                            |
| **`email`** | `string` | Partner contact email. | `"partner@acme.com"`                     |
| **`phone`** | `string` | Partner contact phone. | `"+1234567890"`                          |

**2. User Object**

| Field       | Type      | Description                          | Example                                  |
| ----------- | --------- | ------------------------------------ | ---------------------------------------- |
| **`id`**    | `string`  | Unique user ID.                      | `"2e325799-392d-41d4-8dd6-6cea890c6982"` |
| **`name`**  | `string`  | User's full name.                    | `"John Doe"`                             |
| **`email`** | `string`  | User's email.                        | `"user@example.com"`                     |
| **`phone`** | `string`  | User's phone number.                 | `"+1987654321"`                          |
| **`is2FA`** | `boolean` | 2FA enabled status (`true`/`false`). | `true`                                   |

**Example Response:**

```
{
  "item": {
    "partner": {
      "id": "a2813d61-51a3-487f-b5bb-3aea43dd2581",
      "name": "Acme Inc.",
      "email": "partner@acme.com",
      "phone": "+1234567890"
    },
    "user": {
      "id": "2e325799-392d-41d4-8dd6-6cea890c6982",
      "name": "John Doe",
      "email": "user@example.com",
      "phone": "+1987654321",
      "is2FA": true
    }
  }
}
```

### **Error Responses**

1. **Invalid/Missing Token**:

   ```
   {
     "error": "Unauthorized"
   }
   ```
2. **Expired Token**:

   ```
   {
     "error": "Token expired"
   }
   ```

***

### **Notes**

* **Permissions**:
  * Requires an **active session** (valid JWT).
  * <mark style="color:red;">Partner details are only included for</mark> <mark style="color:red;"></mark><mark style="color:red;">**business accounts**</mark><mark style="color:red;">.</mark>
* **2FA Status**:
  * `is2FA: true` means the user must provide OTP codes for login.

### Examples

**Real request**&#x20;

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTI5NzYxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.atnfresV4v9XT9f_ze3ShmVs337TWt087Ze0MNuiiWk
```

**Real response**&#x20;

200 OK

```postman_json
{
  "item": {
    "partner": {
      "id": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "name": "Delos test",
      "email": "",
      "phone": ""
    },
    "user": {
      "id": "5ff73da8-224e-44de-a235-2d7a76c3144c",
      "name": "Test",
      "email": "test@delos.financial",
      "phone": "",
      "is2FA": false
    }
  }
}
```


# Recovery Confirm

Finalizes password recovery by verifying a security code and token, then setting a new password. Returns new authentication tokens upon success.

**Endpoint**

`POST/v2/auth/recovery/confirm`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_RecoveryAccessConfirm>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field                | Type     | Description                         | Required | Example               |
| -------------------- | -------- | ----------------------------------- | -------- | --------------------- |
| **`code`**           | `string` | **Recovery code** (from email/SMS). | Yes      | `"A1B2C3"`            |
| **`token`**          | `string` | **One-time recovery token**.        | Yes      | `"xyz789abc"`         |
| **`password`**       | `string` | **New password**.                   | Yes      | `"NewSecurePass123!"` |
| **`repeatPassword`** | `string` | **Must match `password` exactly**.  | Yes      | `"NewSecurePass123!"` |

**Example Request Body:**

json

```
{
  "code": "A1B2C3",
  "token": "xyz789abc",
  "password": "NewSecurePass123!",
  "repeatPassword": "NewSecurePass123!"
}
```

***

### **Response (200 OK)**

Returns new authentication tokens for immediate login.

#### **Response Fields**

| Field              | Type     | Description                               | Example            |
| ------------------ | -------- | ----------------------------------------- | ------------------ |
| **`accessToken`**  | `string` | **JWT for API access**.                   | `"eyJhbGci...xyz"` |
| **`refreshToken`** | `string` | **Long-lived token for renewing access**. | `"eyJhbGci...abc"` |
| **`guid`**         | `string` | **User identifier**.                      | `"usr_5f3d8e2a"`   |

**Example Response:**

json

```
{
  "accessToken": "eyJhbGci...xyz",
  "refreshToken": "eyJhbGci...abc",
  "guid": "usr_5f3d8e2a"
}
```

### **Error Responses**

1. **Invalid Code/Token**:

   json

   ```
   {
     "error": "Invalid recovery code or token"
   }
   ```
2. **Password Mismatch**:

   json

   ```
   {
     "error": "Passwords do not match"
   }
   ```
3. **Weak Password**:

   json

   ```
   {
     "error": "Password must contain at least 8 characters, including uppercase and numbers"
   }
   ```

***

### **Notes**

* **Token Validity**:
  * Recovery tokens typically expire after **15 minutes**.
* **Password Rules**:
  * Minimum 8 characters.
  * Requires uppercase, lowercase, and numbers/symbols.
* **Security**:
  * Old passwords are invalidated immediately.
  * Active sessions using the old password are terminated.

### Examples

Real request&#x20;

Real response&#x20;


# Recovery Access

Initiates the password recovery process by sending a verification code to the user's registered email or phone number. Returns a temporary token for the next recovery step.

**Endpoint**

`POST/v2/auth/recovery/request`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_RecoveryAccessRequest>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field       | Type     | Description               | Required | Example              |
| ----------- | -------- | ------------------------- | -------- | -------------------- |
| **`login`** | `string` | User's email or username. | Yes      | `"user@example.com"` |

**Example Request Body:**

json

```
{
  "login": "user@example.com"
}
```

***

### **Response (200 OK)**

Returns a temporary token to be used in the recovery confirmation step.

#### **Response Fields**

| Field       | Type     | Description                                                  | Example       |
| ----------- | -------- | ------------------------------------------------------------ | ------------- |
| **`token`** | `string` | **One-time token** for password reset. Valid for 15 minutes. | `"xyz789abc"` |

**Example Response:**

json

```
{
  "token": "xyz789abc"
}
```

***

### **Error Responses**

1. **User Not Found**:

   json

   ```
   {
     "error": "Account not found"
   }
   ```
2. **Too Many Requests**:

   json

   ```
   {
     "error": "Recovery attempts exceeded. Try again in 30 minutes"
   }
   ```

***

### **Next Steps**

1. **Check Email/SMS** for a 6-digit recovery code.
2. **Submit Code + Token** to `/v2/auth/recovery/confirm` with a new password.

***

### **Notes**

* **Token Validity**: 15 minutes (configurable).
* **Security**:
  * Codes are sent only to **verified** emails/phones.
  * Rate-limited to 3 attempts per hour.
* **UI Flow**:

  <figure><img src="https://4120526196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6rExT0pUdQJ46WjzZtpV%2Fuploads%2FI7baMQpwRIXoOecjVjnp%2Fdeepseek_mermaid_20250818_56eca2.png?alt=media&amp;token=db368dbe-366f-4a3e-9c0f-88126260867e" alt=""><figcaption></figcaption></figure>

### Examples

**Real request**&#x20;

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTI5NzYxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.atnfresV4v9XT9f_ze3ShmVs337TWt087Ze0MNuiiWk
{
  "login": "test@delos.financial"
}
```

**Real response**&#x20;

200 OK

```postman_json
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwMjY4LCJvdHBfdmVyaWZpZWQiOmZhbHNlfQ.JRS7E-q__bQU8o5pM1NMIgxN4KRf5jO2LpJX2_E_3F4"
}
```


# Refresh Access Token

Generates a new access token using a valid refresh token, extending the user's session without requiring reauthentication.

**Endpoint**

`GET/v2/auth/refresh/{token}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_RefreshToken>" %}

### **Request**

#### **Path Parameters**

| Parameter   | Type     | Description                                    | Required | Example       |
| ----------- | -------- | ---------------------------------------------- | -------- | ------------- |
| **`token`** | `string` | **Valid refresh token** (from login/recovery). | Yes      | `"xyz789abc"` |

#### **Headers**

| Key      | Value              | Required |
| -------- | ------------------ | -------- |
| `Accept` | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns new authentication tokens with updated expiration times.

#### **Response Fields**

| Field              | Type      | Description                           | Example                       |
| ------------------ | --------- | ------------------------------------- | ----------------------------- |
| **`accessToken`**  | `string`  | **New JWT** for API authorization.    | `"eyJhbGci...xyz"`            |
| **`refreshToken`** | `string`  | **New refresh token**.                | `"eyJhbGci...abc"`            |
| **`guid`**         | `string`  | User identifier.                      | `"D69Ijtr-sTPF-2FhmobKMEExA"` |
| **`accessTtl`**    | `integer` | **Access token lifetime** (seconds).  | `3600` (1 hour)               |
| **`refreshTtl`**   | `integer` | **Refresh token lifetime** (seconds). | `2592000` (30 days)           |

**Example Response:**

json

```
{
  "accessToken": "eyJhbGci...xyz",
  "refreshToken": "eyJhbGci...abc",
  "guid": "D69Ijtr-sTPF-2FhmobKMEExA",
  "accessTtl": 3600,
  "refreshTtl": 2592000
}
```

### **Error Responses**

1. **Invalid/Expired Token**:

   json

   ```
   {
     "error": "Invalid or expired refresh token"
   }
   ```
2. **Revoked Token**:

   json

   ```
   {
     "error": "Token revoked. Please log in again"
   }
   ```

***

### **Notes**

* **When to Use**:
  * When the `accessToken` expires (check `accessTtl`).
  * After password changes or security events.
* **Security**:
  * Refresh tokens are **single-use** (a new one is issued each refresh).
  * Old refresh tokens are invalidated immediately.
* **Best Practices**:
  * Store refresh tokens securely (e.g., HTTP-only cookies).
  * Rotate tokens frequently.

### Examples

**Real request**&#x20;

```postman_json
token*
:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwODE1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.CGqmWYJt6aL_Uz52qiFpmySsIGgJ4LEQ1eLmbsaBJjY

```

**Real response**&#x20;

200 OK

```postman_json
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwMjQwLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.fOBE0z6FIYH42Ks3qRklHA_wxK7cPC0RojmCDGGcDRA",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwODQwLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.qvNgNcWCmEtNqJDPx2M8Xp2bpuTRutN9zP3lvh9wcpw",
  "userId": "5ff73da8-224e-44de-a235-2d7a76c3144c",
  "accessTtl": 299,
  "refreshTtl": 899
}
```


# Bulk Client Import

Bulk Client Import lets you submit many customers for KYC/KYB verification in a single **batch** instead of creating and onboarding each one through separate API calls. You describe all customers in one `manifest.json` file, upload it together with their documents to a dedicated storage prefix, and start processing. The platform validates the data, creates the customers, submits them for compliance review and reports the outcome for every row.

A batch can contain **individuals**, **companies** (with their associated parties: UBOs, directors and authorized signatories), or both.

All Bulk Client Import methods live under `/v2/compliance/batch` and belong to the **BatchService** group of the Partner API.

***

**When to use it**

* Migrating an existing customer base to Delos.
* Onboarding customers in bulk from your CRM or back office.
* Any case where calling Add Customer + application methods one by one would be slow or hard to track.

For onboarding a single customer, keep using [Add Customer](https://docs.delos.financial/customer/add-customer) and [Get Compliance Link](https://docs.delos.financial/compliance/get-compliance-link).

***

**Key concepts**

| Term                | Meaning                                                                                                                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Batch**           | A container for one import. It has a lifecycle status, row counters and its own storage prefix.                                                                                                                    |
| **Schema snapshot** | The verification requirements (fields, documents, questionnaire, associated-party roles) frozen when the batch is created. The batch is always validated against this snapshot, even if requirements change later. |
| **Manifest**        | `manifest.json` in the root of the batch prefix. One item (row) per customer.                                                                                                                                      |
| **Row**             | One customer in the manifest, identified by your `row_key`. Each row has its own status and result.                                                                                                                |
| **Prefix**          | A private folder in Delos storage (S3-compatible) where you upload the manifest and documents using temporary credentials.                                                                                         |

***

**Batch lifecycle**

| Status             | Meaning                                                           | Uploads allowed |
| ------------------ | ----------------------------------------------------------------- | --------------- |
| `OPEN`             | Created and waiting for files and a manifest.                     | Yes             |
| `CLOSED`           | Committed. The manifest is accepted and rows are being processed. | No              |
| `CHANGE_REQUESTED` | Reopened by you for corrections after a commit.                   | Yes             |
| `CANCELLED`        | Closed permanently. Final state.                                  | No              |

**Transitions**

| Action          | From                       | To                 | Other states                                     |
| --------------- | -------------------------- | ------------------ | ------------------------------------------------ |
| Commit          | `OPEN`, `CHANGE_REQUESTED` | `CLOSED`           | `409`                                            |
| Request changes | `CLOSED`                   | `CHANGE_REQUESTED` | No-op from `CHANGE_REQUESTED`, `409` from `OPEN` |
| Cancel          | `OPEN`, `CHANGE_REQUESTED` | `CANCELLED`        | No-op from `CANCELLED`, `409` from `CLOSED`      |

You can have at most **3 batches that are not closed** at the same time. Cancel batches you no longer need to free a slot.

***

**Integration flow**

**Base URL (Sandbox):** `https://partner.sandbox.delos.financial`

All requests require the `Authorization: Bearer <JWT>` header. The partner is identified from the token; you never pass a partner ID.

**Step 1. Create a batch**

Select which customer types this batch will contain.

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch> \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "types": ["individual", "company"] }'
```

The response (`201`) is a `Batch` object. Save `batch_id` and `schema_version`. At this moment the platform freezes the schema snapshot for the selected types.

**Step 2. Get the schema and the example manifest**

```bash
GET /v2/compliance/batch/{batch_id}/schema
GET /v2/compliance/batch/{batch_id}/example-manifest
```

The schema tells you exactly what to provide for each customer:

| Schema part          | Describes                                                              | Filled in the manifest as |
| -------------------- | ---------------------------------------------------------------------- | ------------------------- |
| `fields`             | Profile fields: required flag, value type, format                      | `fields`                  |
| `documents`          | Allowed document types and document groups                             | `documents`               |
| `questionnaire`      | Questionnaire sections and questions: id, type, options, required flag | `questionnaire`           |
| `associated_parties` | Companies only: required roles (UBO, director, etc.)                   | `associated_parties`      |

Use `individual_schema` for individual rows and `company_schema` for company rows. Each role in `company_schema.associated_parties` references a level; the fields and documents for that party are in `associated_party_levels` under that reference.

**Fastest start:** download the example manifest. It is generated from your batch's frozen schema and contains one row per selected type, every field with a `"<required>"` / `"<optional>"` placeholder, sample documents, questionnaire answers in the correct shape, and one party for each required company role. Replace the placeholders, remove optional parts you do not need, and save it as `manifest.json`. The same file is also placed in your prefix as `example_manifest.json`; the platform never reads it as data.

**Step 3. Get storage credentials and upload documents**

```bash
GET /v2/compliance/batch/{batch_id}/credentials
```

The response contains `bucket`, `prefix`, `region` and temporary `credentials` (`access_key_id`, `secret_access_key`, `session_token`, `expiration`). Credentials only work inside your batch prefix and are valid for about **12 hours**. Request new ones with the same call when they expire. Credentials are issued only while the batch is `OPEN` or `CHANGE_REQUESTED`.

Upload all customer documents into the prefix. The folder structure is up to you; file paths in the manifest must match where you put the files.

```bash
export AWS_ACCESS_KEY_ID=<access_key_id>
export AWS_SECRET_ACCESS_KEY=<secret_access_key>
export AWS_SESSION_TOKEN=<session_token>

aws s3 cp ./documents s3://<bucket>/<prefix>/ --recursive --region <region>
```

**Tip:** add `?format=credential_process` to receive credentials in the AWS `credential_process` format. The AWS CLI/SDK will then refresh them automatically:

```
# ~/.aws/config
[profile delos-batch]
credential_process = sh -c 'curl -s -H "Authorization: Bearer $DELOS_TOKEN" "<https://partner.sandbox.delos.financial/v2/compliance/batch/><batch_id>/credentials?format=credential_process"'
```

**File requirements**

* Formats: **PDF, JPEG, PNG**. The file content is checked, not the extension.
* Maximum size: **50 MB** per file.
* Corrupted, password-protected or truncated files are rejected.

**Step 4. Compose and upload `manifest.json`**

Upload one `manifest.json` to the **root** of the prefix.

```bash
aws s3 cp ./manifest.json s3://<bucket>/<prefix>/manifest.json --region <region>
```

**Step 5. Commit the batch**

```bash
POST /v2/compliance/batch/{batch_id}/commit
```

Make sure every file and the manifest are fully uploaded first. A successful commit returns `202`: the batch becomes `CLOSED` and processing starts. Row validation runs asynchronously after the commit.

Do not overwrite `manifest.json` after a commit. The platform verifies the content of the accepted manifest and stops processing if it has been replaced.<br>

**Step 6. Track results**

| Call                                                  | Use it to                                                                                 |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `GET /v2/compliance/batch/{batch_id}`                 | See row counters and the `processed` / `done` flags.                                      |
| `GET /v2/compliance/batch/{batch_id}/items`           | List rows, optionally filtered by status.                                                 |
| `GET /v2/compliance/batch/{batch_id}/items/{row_key}` | Get one row with full review details and rejection reasons.                               |
| `GET /v2/compliance/batch/{batch_id}/status`          | Get a summary of problems with readable explanations, plus the list of created customers. |

* `processed: true` means every row has reached `submitted`, `invalid` or `failed`: onboarding is complete on your side.
* `done: true` means every row has a final result.

A `report.json` file with the outcome of every row also appears in your prefix. You can download it with credentials obtained before the commit, as long as they have not expired.

***

**Manifest format**

The manifest is a JSON object with an `items` array, one item per customer. You can optionally include `schema_version`; if it is omitted or empty, the batch's frozen snapshot is used. A `schema_version` from another batch is rejected.

**Row fields**

| Field                  | Type     | Required              | Description                                                                                                                                       |
| ---------------------- | -------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `row_key`              | `string` | Yes                   | Your unique identifier of the row. Must be unique within the manifest. You use it to find the row's result.                                       |
| `external_customer_id` | `string` | No                    | Your stable customer identifier. Prevents the same customer from being created twice, in this or any other batch. Cannot be changed after commit. |
| `type`                 | `string` | Yes                   | `individual` or `company`. Must be one of the types selected when the batch was created.                                                          |
| `fields`               | `object` | Yes                   | Profile field values, keyed by field id from the schema.                                                                                          |
| `documents`            | `array`  | Yes                   | Documents: `type`, optional `sub_type`, `file` (path relative to the prefix).                                                                     |
| `questionnaire`        | `object` | If the schema has one | Answers: `sections` → section id → `items` → question id → answer.                                                                                |
| `associated_parties`   | `array`  | Companies only        | Company participants: `party_key`, roles in `types`, their own `fields` and `documents`.                                                          |

**Individual row example**

```json
{
  "items": [
    {
      "row_key": "client-001",
      "external_customer_id": "crm-48213",
      "type": "individual",
      "fields": {
        "firstName": "Anna",
        "lastName": "Johnson",
        "email": "anna@example.com",
        "phone": "+35799000000",
        "tin": "123456789",
        "taxResidenceCountry": "CY"
      },
      "documents": [
        { "type": "ID_CARD", "sub_type": "FRONT_SIDE", "file": "client-001/id-front.jpg" },
        { "type": "ID_CARD", "sub_type": "BACK_SIDE", "file": "client-001/id-back.jpg" },
        { "type": "UTILITY_BILL", "file": "client-001/address.pdf" }
      ],
      "questionnaire": {
        "sections": {
          "sofandsow": {
            "items": {
              "sof": { "value": "salary" },
              "sow": { "value": "Savings from salary" }
            }
          },
          "regulatory_info": {
            "items": {
              "highriskindustries": { "values": ["none"] }
            }
          },
          "bankstatement": {
            "items": {
              "bankstatement": { "files": ["client-001/bank.pdf"] }
            }
          }
        }
      }
    }
  ]
}
```

Field ids, document types, questionnaire section and question ids above are examples. Always take them from **your batch's** schema or example manifest.<br>

**Validation rules**

* **Fields.** Every field with `required: true` must have a non-empty value of the correct type. If the schema defines a `format`, the value must match it:
  * date: `YYYY-MM-DD`
  * country: ISO 3166-1 alpha-2 code (e.g. `CY`)
  * email: a valid address with `@` and a domain
  * phone: E.164 (`+` and up to 15 digits, no spaces or brackets)
* **Markup.** Values containing `<` or `>` are rejected in profile fields, free-text questionnaire answers and `external_customer_id`.
* **Documents.** The type must be allowed by the schema, and `file` must point to an uploaded file.
  * Two-sided documents (ID card, residence permit, driver's licence) are sent as **two entries of the same type**with `sub_type` `FRONT_SIDE` and `BACK_SIDE`. If you have both sides, send both. A back side without a front side is not accepted.
  * A passport has no sides; send one entry without `sub_type`.
  * For companies, the document type is always `COMPANY_DOC`; the specific document kind goes in `sub_type`. Every required company document group must be covered by at least one file.
* **Questionnaire.** The answer shape depends on the question type:

  * regular question: `value`
  * multiple-choice question: `values` (each must be one of the question's `options`)
  * file question: `files`, a list of paths. Never put a file path in `value`.

  All required visible questions must be answered.
* **Associated parties (companies).** Each party has its own `party_key`, roles in `types` (`UBO`, `DIRECTOR`, `AUTHORIZED_SIGNATORY`), `fields` and `documents`. Roles with `can_skip: false` in the schema are mandatory. For a UBO, pass the ownership share in `share_size`.

**How errors are handled**

* An error in a row marks **only that row** as `invalid`; all other rows are processed.
* If the manifest as a whole cannot be accepted, the commit is rejected with `422` and the batch stays editable. This happens when `manifest.json` is missing or too large, is not valid JSON, has trailing content, has no items, has more than **10,000 rows**, or has a foreign `schema_version`.

***

**Row statuses**

| Status             | Meaning                                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
| `invalid`          | The row failed manifest validation. The reason is in `error`.                                                        |
| `valid`            | Passed validation, waiting to be processed.                                                                          |
| `creating`         | The customer is being created and the documents submitted.                                                           |
| `submitted`        | Submitted for compliance review.                                                                                     |
| `finished`         | Customer approved. Final.                                                                                            |
| `rejected`         | Customer rejected. Final.                                                                                            |
| `change_requested` | Reviewers ask to correct data or documents.                                                                          |
| `failed`           | Could not be processed: broken file, duplicate customer or another permanent error. The reason is in `error`. Final. |

Batch counters are always numbers, including zeros. Uploading files alone does not change them; before the first commit all counters are `0`.

**Where to find rejection details**

* `GET .../status` returns `problems`: rows in `invalid`, `failed`, `change_requested` or `rejected`, each with a readable `summary`.
* `GET .../items/{row_key}` returns the full `review` object, including rejection reasons per document (`document_reject_reasons`), per associated party (`party_reject_reasons`) and per verification step (`step_reject_reasons`).

***

**Corrections**

A typical situation: some rows ended up `invalid` or `change_requested`.

1. Reopen the batch: `POST /v2/compliance/batch/{batch_id}/change`. Status becomes `CHANGE_REQUESTED`.
2. Get new credentials and upload the corrected files. Put a replacement document under a **new path**; do not overwrite the old file.
3. Upload the **full** manifest again. The manifest is always the source of truth: a row you remove that has not yet been submitted for review is withdrawn.
4. Commit again.

**Rules for existing rows**

* Rows in a final state (`finished`, `rejected`, `failed`) are never changed by a later commit.
* To retry a customer whose row is `failed`, add a new row with a new `row_key`.
* The `type` and `external_customer_id` of an existing `row_key` cannot be changed.

**Letting the customer fix it themselves**

For a row in `change_requested`, you can request a fresh verification link and send it to the end customer:

```bash
GET /v2/compliance/batch/{batch_id}/items/{row_key}/web_sdk_link
```

The response contains `url` and `ttl_seconds`. For rows in any other status the call returns `409`.

***

**Cancelling a batch**

`POST /v2/compliance/batch/{batch_id}/cancel` closes the batch permanently and frees a slot in the open-batch limit. It works for `OPEN` and `CHANGE_REQUESTED` batches.

* Rows that were not yet submitted for review become `failed`.
* Rows already submitted cannot be withdrawn and will still receive a result.

***

**Errors**

Errors are returned in the following format:

```json
{
  "code": 9,
  "message": "batch cannot be committed from its current state",
  "details": []
}
```

`code` is a gRPC status code; use the HTTP status of the response for your error handling.

| HTTP  | When                                                                                                                                                         |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400` | Invalid request (e.g. empty or repeated `types`, unsupported `format` value).                                                                                |
| `403` | Your partner account is not enabled for Bulk Client Import, or the token lacks the required scope.                                                           |
| `404` | The batch does not exist or belongs to another partner.                                                                                                      |
| `409` | The action is not allowed in the batch's current status, the open-batch limit is reached, or a WebSDK link is requested for a row not in `change_requested`. |
| `422` | The manifest was rejected at commit. The batch stays editable.                                                                                               |
| `503` | The verification schema source is temporarily unavailable when creating a batch. Retry later.                                                                |

***

**Best practices**

* **Start from the example manifest** instead of building rows by hand.
* **Always send `external_customer_id`** so a customer is never created twice, even across batches.
* **Upload everything before committing**, and run uploads and commits sequentially, not in parallel.
* **Retry a commit only after checking the batch status.** A repeated commit on a `CLOSED` batch returns `200` but does not accept a new manifest.
* **Use `processed`, not `done`, as your onboarding milestone.** `done` also waits for compliance decisions, which can take longer.
* **Poll with reasonable intervals.** Rows move asynchronously; there is no need to poll more often than once every few minutes.

***

**Endpoint reference**

| Method                 | Endpoint                                                           | Description                                        |
| ---------------------- | ------------------------------------------------------------------ | -------------------------------------------------- |
| List Batches           | `GET /v2/compliance/batch`                                         | List your batches.                                 |
| Create Batch           | `POST /v2/compliance/batch`                                        | Create a batch and freeze its schema.              |
| Get Batch              | `GET /v2/compliance/batch/{batch_id}`                              | Batch status, counters and flags.                  |
| Get Batch Schema       | `GET /v2/compliance/batch/{batch_id}/schema`                       | Frozen schema snapshot.                            |
| Get Example Manifest   | `GET /v2/compliance/batch/{batch_id}/example-manifest`             | Manifest template with placeholders.               |
| Get Upload Credentials | `GET /v2/compliance/batch/{batch_id}/credentials`                  | Temporary storage credentials.                     |
| Commit Batch           | `POST /v2/compliance/batch/{batch_id}/commit`                      | Start processing.                                  |
| Request Batch Changes  | `POST /v2/compliance/batch/{batch_id}/change`                      | Reopen a committed batch for corrections.          |
| Cancel Batch           | `POST /v2/compliance/batch/{batch_id}/cancel`                      | Close a batch permanently.                         |
| List Batch Items       | `GET /v2/compliance/batch/{batch_id}/items`                        | List rows with a status filter.                    |
| Get Batch Item         | `GET /v2/compliance/batch/{batch_id}/items/{row_key}`              | One row with review details.                       |
| Get Item WebSDK Link   | `GET /v2/compliance/batch/{batch_id}/items/{row_key}/web_sdk_link` | Verification link for a row in `change_requested`. |
| Get Batch Status       | `GET /v2/compliance/batch/{batch_id}/status`                       | Problems summary and created customers.            |


# List Batches

Returns a paginated list of your Bulk Client Import batches in all statuses. Use it to find an existing batch, check how many batches are still open against the limit of 3, or recover a `batch_id` you did not store.

**Endpoint**

`GET /v2/compliance/batch`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_ListBatches>

**Request**

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Query Parameters**

| Parameter       | Type      | Description                 | Required | Example |
| --------------- | --------- | --------------------------- | -------- | ------- |
| **`page`**      | `integer` | Page number, starting at 1. | No       | `1`     |
| **`page_size`** | `integer` | Number of batches per page. | No       | `20`    |

**Response (200 OK)**

Returns a `ListBatchesResponse`.

**Response Fields**

| Field           | Type            | Description                                          | Example |
| --------------- | --------------- | ---------------------------------------------------- | ------- |
| **`batches`**   | `array[object]` | `Batch` objects. See Create Batch → Response Fields. | —       |
| **`page`**      | `integer`       | Current page.                                        | `1`     |
| **`page_size`** | `integer`       | Page size.                                           | `20`    |
| **`total`**     | `integer`       | Total number of batches.                             | `2`     |

**Example Response:**

```json
{
  "batches": [
    {
      "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
      "status": "CLOSED",
      "schema_version": "string",
      "types": [
        "individual",
        "company"
      ],
      "individual_kyc_level": "string",
      "company_kyc_level": "string",
      "party_kyc_levels": [
        "string"
      ],
      "counters": {
        "total": 120,
        "draft": 0,
        "valid": 0,
        "invalid": 3,
        "creating": 2,
        "submitted": 85,
        "finished": 24,
        "change_requested": 4,
        "rejected": 1,
        "failed": 1
      },
      "processed": false,
      "done": false,
      "created_at": "2026-09-28T10:15:30Z",
      "committed_at": "2026-09-28T11:02:04Z",
      "error": ""
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 1
}
```

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch?page=1&page_size=20> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Open-batch limit**: count batches with status `OPEN`, `CLOSED` or `CHANGE_REQUESTED` to see how close you are to the limit of 3.
* **Details**: the list returns the same `Batch` object as Get Batch, including counters.


# Create Batch

Creates a new Bulk Client Import batch for the customer types you select: individuals, companies, or both. At creation the platform **freezes the verification schema** for the selected types, so the batch is always validated against the requirements that were in effect at this moment, even if they change later.

The new batch starts in status `OPEN` with all row counters at `0`. Counters stay at zero until you commit a manifest; uploading files to storage does not change them.

A batch is created completely or not at all: if any required schema cannot be resolved, no partially usable batch is created.

You can have at most **3 batches that are not closed** at the same time. Creating a fourth returns `409`; cancel a batch you no longer need to free a slot.

**Endpoint**

`POST /v2/compliance/batch`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_CreateBatch>

**Request**

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

`CreateBatchRequest` selects the application types the batch will accept. The platform resolves the matching verification levels automatically.

| Field       | Type            | Description                                                                                                    | Required | Example                     |
| ----------- | --------------- | -------------------------------------------------------------------------------------------------------------- | -------- | --------------------------- |
| **`types`** | `array[string]` | Customer types the batch will accept: `individual`, `company`, or both. Empty and repeated values are invalid. | Yes      | `["individual", "company"]` |

**Example Request Body:**

```json
{
  "types": ["individual", "company"]
}
```

**Response (201 Created)**

Returns the created `Batch` object.

**Response Fields**

| Field                      | Type                 | Description                                                                                                       | Example                                  |
| -------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| **`batch_id`**             | `string`             | Unique batch identifier. Use it in all other batch methods.                                                       | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |
| **`status`**               | `string`             | Batch status: `OPEN`, `CLOSED`, `CHANGE_REQUESTED` or `CANCELLED`. Always `OPEN` for a new batch.                 | `"OPEN"`                                 |
| **`schema_version`**       | `string`             | Version of the frozen schema snapshot. You can pass it in `manifest.json`; a foreign value is rejected at commit. | `"string"`                               |
| **`types`**                | `array[string]`      | Customer types selected at creation.                                                                              | `["individual", "company"]`              |
| **`individual_kyc_level`** | `string`             | Opaque reference to the individual schema. Empty if individual rows are not enabled.                              | `"string"`                               |
| **`company_kyc_level`**    | `string`             | Opaque reference to the company schema. Empty if company rows are not enabled.                                    | `"string"`                               |
| **`party_kyc_levels`**     | `array[string]`      | Opaque references to associated-party schemas in `associated_party_levels` of Get Batch Schema, sorted.           | `["string"]`                             |
| **`counters`**             | `object`             | `ItemCounters` — number of rows per status. Always numbers, including zeros.                                      | see below                                |
| **`processed`**            | `boolean`            | `true` when every row has reached `submitted`, `invalid`or `failed`.                                              | `false`                                  |
| **`done`**                 | `boolean`            | `true` when every row has a final result.                                                                         | `false`                                  |
| **`created_at`**           | `string (date-time)` | When the batch was created.                                                                                       | `"2026-09-28T10:15:30Z"`                 |
| **`committed_at`**         | `string (date-time)` | When the batch was last committed. Empty for a new batch.                                                         | —                                        |
| **`processed_at`**         | `string (date-time)` | When `processed` became `true`. Empty for a new batch.                                                            | —                                        |
| **`done_at`**              | `string (date-time)` | When `done` became `true`. Empty for a new batch.                                                                 | —                                        |
| **`error`**                | `string`             | Set only if the batch itself failed (e.g. an unreadable manifest). Row-level problems are reported on rows.       | `""`                                     |

**`counters` object (`ItemCounters`)**

| Field                  | Type      | Description                                         |
| ---------------------- | --------- | --------------------------------------------------- |
| **`total`**            | `integer` | Total rows in the batch.                            |
| **`draft`**            | `integer` | Rows accepted from the manifest, not yet validated. |
| **`valid`**            | `integer` | Rows that passed validation.                        |
| **`invalid`**          | `integer` | Rows that failed validation.                        |
| **`creating`**         | `integer` | Rows whose customer is being created.               |
| **`submitted`**        | `integer` | Rows submitted for compliance review.               |
| **`finished`**         | `integer` | Approved customers.                                 |
| **`change_requested`** | `integer` | Rows where reviewers requested changes.             |
| **`rejected`**         | `integer` | Rejected customers.                                 |
| **`failed`**           | `integer` | Rows that could not be processed.                   |

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "OPEN",
  "schema_version": "string",
  "types": ["individual", "company"],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": ["string"],
  "counters": {
    "total": 0,
    "draft": 0,
    "valid": 0,
    "invalid": 0,
    "creating": 0,
    "submitted": 0,
    "finished": 0,
    "change_requested": 0,
    "rejected": 0,
    "failed": 0
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "error": ""
}
```

***

**Examples**

**Request — individuals only**

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{
  "types": ["individual"]
}'
```

**Response**

```json
{
  "batch_id": "01a0c461-2b7e-7c3a-9f10-5d2e8a4b6c01",
  "status": "OPEN",
  "schema_version": "string",
  "types": ["individual"],
  "individual_kyc_level": "string",
  "company_kyc_level": "",
  "party_kyc_levels": [],
  "counters": {
    "total": 0,
    "draft": 0,
    "valid": 0,
    "invalid": 0,
    "creating": 0,
    "submitted": 0,
    "finished": 0,
    "change_requested": 0,
    "rejected": 0,
    "failed": 0
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "error": ""
}
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Invalid Request (400)** — `types` is empty, contains a repeated or unknown value, or a required associated-party structure is not supported:

```json
{
  "code": 3,
  "message": "types must not be empty",
  "details": []
}
```

**Authorization fail (401)**:

```json
{
  "code": 16,
  "message": "Unauthorized",
  "details": []
}
```

**Access Restricted (403)** — your partner account is not enabled for Bulk Client Import:

```json
{
  "code": 7,
  "message": "partner is not allowed to import batches",
  "details": []
}
```

**Open-Batch Limit Reached (409)** — you already have 3 batches that are not closed:

```json
{
  "code": 6,
  "message": "open batch limit reached",
  "details": []
}
```

**Schema Source Unavailable (503)** — the verification schema could not be resolved right now. No batch is created; retry later:

```json
{
  "code": 14,
  "message": "schema source unavailable",
  "details": []
}
```

***

**Next Steps**

1. **Get the schema** — call `GET /v2/compliance/batch/{batch_id}/schema` to see which fields, documents, questionnaire answers and associated parties each row needs.
2. **Get the example manifest** — call `GET /v2/compliance/batch/{batch_id}/example-manifest` and use it as the starting point for `manifest.json`.
3. **Get storage credentials** — call `GET /v2/compliance/batch/{batch_id}/credentials` and upload documents and the manifest.

***

**Notes**

* **Frozen schema**: the requirements captured at creation apply for the whole life of the batch. To onboard against newer requirements, create a new batch.
* **Select only the types you need**: rows of a type that was not selected at creation are rejected as `invalid`. You can't add a type to an existing batch.
* **Open-batch limit**: `OPEN`, `CLOSED` and `CHANGE_REQUESTED` batches count towards the limit of 3; a `CANCELLED` batch does not. Use Cancel Batch to free a slot.
* **Opaque identifiers**: `individual_kyc_level`, `company_kyc_level` and `party_kyc_levels` are references into the schema returned by Get Batch Schema. Do not parse them or rely on their format.
* **Counters**: all counters are `0` until the first commit. Uploading files to the prefix does not add rows.

**Typical Workflow**:

1. Call `POST /v2/compliance/batch` with the types you plan to onboard.
2. Save `batch_id` from the response.
3. Fetch the schema and the example manifest.
4. Get storage credentials, upload documents and `manifest.json`.
5. Commit the batch with `POST /v2/compliance/batch/{batch_id}/commit`.


# Get Batch

Returns a single batch with its current status, row counters and the `processed` / `done` flags. This is the main method for polling the progress of an import.

* `processed: true` — every row has reached `submitted`, `invalid` or `failed`. Onboarding is complete on your side.
* `done: true` — every row has a final result.

Counters reflect the current row statuses and are always numbers, including zeros.

**Endpoint**\
`GET /v2/compliance/batch/{batch_id}`

**Link**\
<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetBatch>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                                                                  | Required | Example                                  |
| -------------- | -------- | ---------------------------------------------------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by [Create Batch](https://claude.ai/chat/create-batch.md). | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns the `Batch` object. See Create Batch → Response Fields for every field and the `counters` object.

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "CLOSED",
  "schema_version": "string",
  "types": [
    "individual",
    "company"
  ],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": [
    "string"
  ],
  "counters": {
    "total": 120,
    "draft": 0,
    "valid": 0,
    "invalid": 3,
    "creating": 2,
    "submitted": 85,
    "finished": 24,
    "change_requested": 4,
    "rejected": 1,
    "failed": 1
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "committed_at": "2026-09-28T11:02:04Z",
  "error": ""
}
```

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Batch-level error**: `error` is set only when the batch itself failed (for example, the manifest could not be read). Row-level problems are reported on rows — use Get Batch Status or List Batch Items.
* **Polling**: rows move asynchronously. Polling every few minutes is enough.
* **Which flag to wait for**: use `processed` as your onboarding milestone. `done` also waits for compliance decisions, which can take longer.


# Cancel Batch

Closes a batch permanently. The batch moves from `OPEN` or `CHANGE_REQUESTED` to `CANCELLED` and no longer counts against the limit of 3 open batches.

Cancellation is one-way: a cancelled batch never reopens. Calling it again on a `CANCELLED` batch is a no-op. A `CLOSED`batch cannot be cancelled (`409`); reopen it with Request Batch Changes first.

What happens to rows:

* Rows that were never submitted to compliance review become `failed`.
* Rows already submitted cannot be withdrawn and still receive a final result.

**Endpoint**

`POST /v2/compliance/batch/{batch_id}/cancel`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_CancelBatch>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

No request body.

**Response (200 OK)**

Returns the `Batch` object. See Create Batch → Response Fields for every field and the `counters` object.

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "CANCELLED",
  "schema_version": "string",
  "types": [
    "individual",
    "company"
  ],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": [
    "string"
  ],
  "counters": {
    "total": 120,
    "draft": 0,
    "valid": 0,
    "invalid": 3,
    "creating": 2,
    "submitted": 85,
    "finished": 24,
    "change_requested": 4,
    "rejected": 1,
    "failed": 1
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "committed_at": "2026-09-28T11:02:04Z",
  "error": ""
}
```

***

**Examples**

**Request**

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/cancel> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Cannot Be Cancelled (409)** — the batch is `CLOSED`:

```json
{ "code": 10, "message": "batch cannot be cancelled from its current state", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Irreversible**: to onboard the same customers later, create a new batch.
* **Submitted rows keep going**: customers already under review are not affected. Track their results with List Batch Items.
* **Freeing a slot**: cancel draft batches you no longer need so that Create Batch does not return `409`.


# Request Batch Changes

Reopens a committed batch for corrections. The batch moves from `CLOSED` to `CHANGE_REQUESTED`; you can then get new storage credentials, upload corrected files and a new manifest, and commit again.

Calling it on a batch already in `CHANGE_REQUESTED` is a no-op. Calling it on an `OPEN` batch returns `409`: an open batch is already editable.

**Endpoint**

`POST /v2/compliance/batch/{batch_id}/change`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_RequestBatchChanges>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

No request body.

**Response (200 OK)**

Returns the `Batch` object. See Create Batch → Response Fields for every field and the `counters` object.

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "CHANGE_REQUESTED",
  "schema_version": "string",
  "types": [
    "individual",
    "company"
  ],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": [
    "string"
  ],
  "counters": {
    "total": 120,
    "draft": 0,
    "valid": 0,
    "invalid": 3,
    "creating": 2,
    "submitted": 85,
    "finished": 24,
    "change_requested": 4,
    "rejected": 1,
    "failed": 1
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "committed_at": "2026-09-28T11:02:04Z",
  "error": ""
}
```

***

**Examples**

**Request**

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/change> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Cannot Be Changed (409)** — the batch is `OPEN` or `CANCELLED`:

```json
{ "code": 10, "message": "batch cannot be changed from its current state", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Full manifest**: after reopening, always upload the **complete** manifest, not only the changed rows. The manifest is the source of truth: a row you remove that has not yet been submitted for review is withdrawn.
* **Replace files under new paths**: upload a corrected document under a new file path instead of overwriting the old one, and point the row to it.
* **Final rows are history**: rows in `finished`, `rejected` or `failed` are never changed by a later commit. To retry a `failed` customer, add a new row with a new `row_key`.
* **Immutable row identity**: the `type` and `external_customer_id` of an existing `row_key` cannot be changed.
* **Customer-side fixes**: for rows in `change_requested`, you can also send the end customer a verification link from Get Item WebSDK Link.

**Typical Workflow**:

1. Find rows to fix with Get Batch Status.
2. Call `POST /v2/compliance/batch/{batch_id}/change`.
3. Get new credentials with Get Upload Credentials.
4. Upload corrected files under new paths and the full `manifest.json`.
5. Call Commit Batch.


# Commit Batch

Starts processing a batch. The platform reads `manifest.json` from the root of the batch prefix, accepts it and moves the batch from `OPEN` or `CHANGE_REQUESTED` to `CLOSED`. Row validation, customer creation and submission for review then run **asynchronously**.

Before the state changes, the platform checks the manifest envelope. If `manifest.json` is missing or too large, is not valid JSON, has trailing content, contains no items, has more than **10,000 rows**, or carries a `schema_version` from another batch, the commit is rejected with `422`. The batch stays editable and nothing is processed.

Errors inside individual rows do **not** block the commit: those rows become `invalid` and all other rows are processed.

**Endpoint**

`POST /v2/compliance/batch/{batch_id}/commit`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_CommitBatch>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

No request body.

**Response (202 Accepted)**

The manifest was accepted and processing has started. Returns the `Batch` object. See Create Batch → Response Fields for every field and the `counters` object.

**Response (200 OK)** — the batch was already `CLOSED`: a repeated or concurrent commit returns the batch without accepting its own manifest. The manifest accepted by the first successful commit is the one being processed.

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "CLOSED",
  "schema_version": "string",
  "types": [
    "individual",
    "company"
  ],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": [
    "string"
  ],
  "counters": {
    "total": 120,
    "draft": 0,
    "valid": 0,
    "invalid": 3,
    "creating": 2,
    "submitted": 85,
    "finished": 24,
    "change_requested": 4,
    "rejected": 1,
    "failed": 1
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "committed_at": "2026-09-28T11:02:04Z",
  "error": ""
}
```

Right after the commit, counters may still be `0`: rows appear in the counters as the platform ingests and validates the manifest.

***

**Examples**

**Request**

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/commit> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Cannot Be Committed (409)** — the batch is `CANCELLED`, or a newer editable version of the batch exists. Check the batch status before retrying:

```json
{ "code": 10, "message": "batch cannot be committed from its current state", "details": [] }
```

**Manifest Rejected (422)** — missing, oversized, malformed or trailing JSON, empty `items`, too many rows, or a foreign `schema_version`. The batch stays editable:

```json
{ "code": 3, "message": "manifest.json is not valid JSON", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Upload everything first**: all documents and the final `manifest.json` must be fully uploaded before you commit.
* **Serialize uploads and commits**: do not upload files and commit in parallel, and do not send several commits at once.
* **Do not touch the manifest after commit**: the platform verifies the content of the accepted manifest; if it has been overwritten, processing stops. To change data, call Request Batch Changes first.
* **`schema_version`**: optional in the manifest. If omitted or empty, the batch's frozen schema is used.
* **Retries**: if the commit request timed out, call Get Batch before retrying. A `CLOSED` batch means the commit went through.

**Typical Workflow**:

1. Upload documents and `manifest.json` to the batch prefix.
2. Call `POST /v2/compliance/batch/{batch_id}/commit`.
3. On `422`, fix the manifest, upload it again and repeat step 2.
4. On `202`, poll Get Batch until `processed` is `true`.
5. Review problems with Get Batch Status.


# Get Upload Credentials

Issues temporary credentials for uploading the manifest and customer documents to the batch's private storage prefix (S3-compatible). The credentials work only inside this prefix and are valid for about **12 hours**. When they expire, call this method again.

Credentials are issued only while the batch is `OPEN` or `CHANGE_REQUESTED`. After a commit, reopen the batch with Request Batch Changes to get new ones.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/credentials`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetUploadCredentials>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Query Parameters**

| Parameter    | Type     | Description                                                                                                                                                        | Required | Example                |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ---------------------- |
| **`format`** | `string` | Omit (or send an empty value) for the standard response. `credential_process` returns the AWS `credential_process`document instead. Any other value returns `400`. | No       | `"credential_process"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns an `UploadCredentialsResponse`.

**Response Fields**

| Field                               | Type                 | Description                                         | Example                                      |
| ----------------------------------- | -------------------- | --------------------------------------------------- | -------------------------------------------- |
| **`bucket`**                        | `string`             | Storage bucket name.                                | `"compliance-batch"`                         |
| **`prefix`**                        | `string`             | Your batch prefix. Upload all files under it.       | `"9b3f1e7a-2c44-4d8e-a1b6-7f0c9d2e5a10"`     |
| **`region`**                        | `string`             | Storage region.                                     | `"eu-central-1"`                             |
| **`credentials`**                   | `object`             | Temporary credentials.                              | —                                            |
| **`credentials.access_key_id`**     | `string`             | Access key ID.                                      | `"ASIA5EXAMPLE7QK4WZ3T"`                     |
| **`credentials.secret_access_key`** | `string`             | Secret access key.                                  | `"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"` |
| **`credentials.session_token`**     | `string`             | Session token. Must be sent together with the keys. | `"IQoJb3JpZ2luX2VjEJ3..."`                   |
| **`credentials.expiration`**        | `string (date-time)` | When the credentials expire.                        | `"2026-09-28T22:15:30Z"`                     |

**Example Response:**

```json
{
  "bucket": "compliance-batch",
  "prefix": "9b3f1e7a-2c44-4d8e-a1b6-7f0c9d2e5a10",
  "region": "eu-central-1",
  "credentials": {
    "access_key_id": "ASIA5EXAMPLE7QK4WZ3T",
    "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "session_token": "IQoJb3JpZ2luX2VjEJ3...",
    "expiration": "2026-09-28T22:15:30Z"
  }
}
```

**Response with `format=credential_process`**

The body is **not** the schema above. It is the flat, PascalCase document that the AWS CLI and SDKs expect from a `credential_process`:

```json
{
  "Version": 1,
  "AccessKeyId": "ASIA5EXAMPLE7QK4WZ3T",
  "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "SessionToken": "IQoJb3JpZ2luX2VjEJ3...",
  "Expiration": "2026-09-28T22:15:30Z"
}
```

Client generators built from the OpenAPI file will not know this shape: OpenAPI 2.0 cannot describe two response schemas for one status code. Handle it manually, or let the AWS CLI/SDK consume it directly.

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/credentials> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

**Upload with the AWS CLI**

```bash
export AWS_ACCESS_KEY_ID=<access_key_id>
export AWS_SECRET_ACCESS_KEY=<secret_access_key>
export AWS_SESSION_TOKEN=<session_token>

aws s3 cp ./documents s3://<bucket>/<prefix>/ --recursive --region <region>
aws s3 cp ./manifest.json s3://<bucket>/<prefix>/manifest.json --region <region>
```

**Automatic refresh with `credential_process`**

```
# ~/.aws/config
[profile delos-batch]
region = <region>
credential_process = sh -c 'curl -s -H "Authorization: Bearer $DELOS_TOKEN" "<https://partner.sandbox.delos.financial/v2/compliance/batch/><batch_id>/credentials?format=credential_process"'
```

```bash
aws s3 cp ./documents s3://<bucket>/<prefix>/ --recursive --profile delos-batch
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Invalid Format (400)** — `format` has a value other than empty or `credential_process`:

```json
{ "code": 3, "message": "unsupported format", "details": [] }
```

**Batch Not Editable (409)** — the batch is `CLOSED` or `CANCELLED`:

```json
{ "code": 10, "message": "credentials are available only for an editable batch", "details": [] }
```

**Rewrite Failed (500)** — `credential_process` only: the credentials could not be converted to the AWS format:

```json
{ "code": 13, "message": "credentials could not be converted", "details": [] }
```

**Incomplete Credentials (502)** — `credential_process` only: the storage service returned incomplete credentials. Retry:

```json
{ "code": 14, "message": "incomplete credentials", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Scope**: credentials are limited to your batch prefix. Requests outside it are denied by storage.
* **Folder structure**: any structure inside the prefix is fine. File paths in the manifest are relative to the prefix and must match exactly.
* **`manifest.json` location**: the manifest must be at the prefix root.
* **Files**: PDF, JPEG or PNG (content is checked, not the extension), up to 50 MB each. Corrupted, password-protected or truncated files are rejected.
* **`report.json`**: after the commit, a per-row report appears in the prefix. You can download it with credentials issued before the commit, while they are still valid.
* **Keep secrets safe**: never log or share the secret key and session token.


# Get Example Manifest

Returns a ready-to-fill `manifest.json` template generated from the batch's frozen schema. It is the fastest way to build a valid manifest: replace the placeholders with real values and file paths, remove optional parts you do not need, and save the result as `manifest.json` in the prefix root.

The template contains:

* one row per customer type selected for the batch;
* every profile field, with a `"<required>"` or `"<optional>"` placeholder;
* one document per document group;
* every unconditional questionnaire question, in the answer shape its type takes (`value`, `values` or `files`);
* for companies, one associated party per required role.

The same document is written to `example_manifest.json` in the batch prefix when the batch is created. The platform never reads the example as data.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/example-manifest`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetExampleManifest>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

A JSON object with `schema_version` and `items`, placeholders in place of values. The row structure is described in Bulk Client Import → Manifest format.

**Example Response (fragment):**

```json
{
  "schema_version": "string",
  "items": [
    {
      "row_key": "<required>",
      "external_customer_id": "<optional>",
      "type": "individual",
      "fields": {
        "firstName": "<required>",
        "lastName": "<required>",
        "email": "<required>",
        "phone": "<required>"
      },
      "documents": [
        { "type": "PASSPORT", "file": "<required>" }
      ],
      "questionnaire": {
        "sections": {
          "sofandsow": {
            "items": {
              "sof": { "value": "<required>" }
            }
          }
        }
      }
    }
  ]
}
```

The fragment above is illustrative. Field ids, document types and questionnaire ids depend on your batch's schema — always use the template returned for your batch.

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/example-manifest> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Placeholders must be replaced**: a manifest that still contains `"<required>"` values fails validation for those rows.
* **Two-sided documents**: the template also shows the `FRONT_SIDE` / `BACK_SIDE` pair for identity documents that have two sides.
* **Conditional questions**: questions that appear only after a specific answer are not in the template; check Get Batch Schema for them.
* **Same schema as validation**: the template is built from the same frozen snapshot the rows are validated against.


# List Batch Items

Returns a paginated list of batch rows with their current status, customer ID and error, optionally filtered by status. Use it to find the rows you need to act on, for example every row in `change_requested` or `failed`.

For full review details of a single row, use Get Batch Item.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/items`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_ListBatchItems>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Query Parameters**

| Parameter       | Type      | Description                              | Required | Example                                      |
| --------------- | --------- | ---------------------------------------- | -------- | -------------------------------------------- |
| **`status`**    | `string`  | Comma-separated row statuses to include. | No       | `"change_requested,rejected,failed,invalid"` |
| **`page`**      | `integer` | Page number, starting at 1.              | No       | `1`                                          |
| **`page_size`** | `integer` | Number of rows per page.                 | No       | `100`                                        |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns a `ListBatchItemsResponse`.

**Response Fields**

| Field           | Type            | Description          | Example |
| --------------- | --------------- | -------------------- | ------- |
| **`items`**     | `array[object]` | `BatchItem` objects. | —       |
| **`page`**      | `integer`       | Current page.        | `1`     |
| **`page_size`** | `integer`       | Page size.           | `100`   |
| **`total`**     | `integer`       | Total matching rows. | `2`     |

**`BatchItem` object**

| Field                      | Type                 | Description                                                                                                      | Example                       |
| -------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| **`row_key`**              | `string`             | Your row identifier from the manifest.                                                                           | `"client-001"`                |
| **`type`**                 | `string`             | What the row onboards: `individual` or `company`.                                                                | `"individual"`                |
| **`client_id`**            | `string`             | ID of the created customer. Empty for `invalid` rows: they never get one.                                        | `"DNkjZcj-hHJA-yhO8yAX3rBRe"` |
| **`external_customer_id`** | `string`             | Your customer identifier from the manifest, stable across batches.                                               | `"crm-48213"`                 |
| **`status`**               | `string`             | Row status: `invalid`, `valid`, `creating`, `submitted`, `finished`, `rejected`, `change_requested` or `failed`. | `"submitted"`                 |
| **`review_status`**        | `string`             | Current status of the compliance review.                                                                         | `"pending"`                   |
| **`error`**                | `string`             | Reason for `invalid` or `failed`, or the latest temporary error while the row is being retried.                  | `""`                          |
| **`updated_at`**           | `string (date-time)` | Last change of the row.                                                                                          | `"2026-09-28T11:05:12Z"`      |

**Example Response:**

```json
{
  "items": [
    {
      "row_key": "client-001",
      "type": "individual",
      "client_id": "DNkjZcj-hHJA-yhO8yAX3rBRe",
      "external_customer_id": "crm-48213",
      "status": "change_requested",
      "review_status": "string",
      "error": "",
      "updated_at": "2026-09-28T11:05:12Z"
    },
    {
      "row_key": "client-017",
      "type": "individual",
      "client_id": "",
      "external_customer_id": "crm-48301",
      "status": "invalid",
      "review_status": "",
      "error": "fields.email: value does not match format email",
      "updated_at": "2026-09-28T11:02:09Z"
    }
  ],
  "page": 1,
  "page_size": 100,
  "total": 2
}
```

***

**Examples**

**Request — rows that need attention**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/items?status=change_requested,rejected,failed,invalid> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Row statuses**: `invalid` and `failed` carry the reason in `error`. `finished`, `rejected` and `failed` are final.
* **Rows being retried**: while a row is in `creating` and the platform is retrying a temporary error, `error` shows the latest retry reason.
* **Explanations**: for a readable summary of every problem in the batch, use Get Batch Status.


# Get Batch Item

Returns one batch row by its `row_key`, including the full compliance review: overall rejection reasons and detailed reasons per document, per associated party and per verification step. Use it to understand exactly what to fix for a row in `change_requested` or `rejected`.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/items/{row_key}`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetBatchItem>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |
| **`row_key`**  | `string` | Your `row_key` from the manifest.  | Yes      | `"client-001"`                           |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns a `BatchItemDetail`: every field of `BatchItem` plus `review` and `review_error`.

**Response Fields**

| Field                      | Type                 | Description                                                                                                      | Example                       |
| -------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| **`row_key`**              | `string`             | Your row identifier from the manifest.                                                                           | `"client-001"`                |
| **`type`**                 | `string`             | What the row onboards: `individual` or `company`.                                                                | `"individual"`                |
| **`client_id`**            | `string`             | ID of the created customer. Empty for `invalid` rows: they never get one.                                        | `"DNkjZcj-hHJA-yhO8yAX3rBRe"` |
| **`external_customer_id`** | `string`             | Your customer identifier from the manifest, stable across batches.                                               | `"crm-48213"`                 |
| **`status`**               | `string`             | Row status: `invalid`, `valid`, `creating`, `submitted`, `finished`, `rejected`, `change_requested` or `failed`. | `"submitted"`                 |
| **`review_status`**        | `string`             | Current status of the compliance review.                                                                         | `"pending"`                   |
| **`error`**                | `string`             | Reason for `invalid` or `failed`, or the latest temporary error while the row is being retried.                  | `""`                          |
| **`updated_at`**           | `string (date-time)` | Last change of the row.                                                                                          | `"2026-09-28T11:05:12Z"`      |
| **`review`**               | `object`             | `BatchItemReview` — the compliance review of this row. See below.                                                | —                             |
| **`review_error`**         | `string`             | Set if the review details could not be loaded.                                                                   | `""`                          |

**`review` object (`BatchItemReview`)**

| Field                         | Type                 | Description                                         |
| ----------------------------- | -------------------- | --------------------------------------------------- |
| **`uuid`**                    | `string`             | Review ID.                                          |
| **`status`**                  | `string`             | Review status.                                      |
| **`revision`**                | `string (int64)`     | Review revision; increases with every resubmission. |
| **`updated_at`**              | `string (date-time)` | Last review update.                                 |
| **`reject_type`**             | `string`             | Type of rejection (e.g. final or retry allowed).    |
| **`reject_reasons`**          | `array[string]`      | Overall rejection reasons.                          |
| **`reject_comment`**          | `string`             | Reviewer comment.                                   |
| **`button_ids`**              | `array[string]`      | Machine-readable rejection reason codes.            |
| **`details_available`**       | `boolean`            | Whether detailed reasons below are available.       |
| **`document_reject_reasons`** | `array[object]`      | Reasons per document. See below.                    |
| **`party_reject_reasons`**    | `array[object]`      | Reasons per associated party (companies).           |
| **`step_reject_reasons`**     | `array[object]`      | Reasons per verification step.                      |

**`document_reject_reasons[]`**

| Field                                                                           | Type      | Description                                                                 |
| ------------------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------- |
| **`document_uuid`**                                                             | `string`  | Document ID at the provider.                                                |
| **`party_key`**                                                                 | `string`  | Associated party the document belongs to; empty for the row's own document. |
| **`type`**                                                                      | `string`  | Document type from the manifest.                                            |
| **`sub_type`**                                                                  | `string`  | Document sub-type or side.                                                  |
| **`file`**                                                                      | `string`  | File path from the manifest.                                                |
| **`matched`**                                                                   | `boolean` | Whether the rejected document was matched to a manifest entry.              |
| **`question_section`**                                                          | `string`  | For questionnaire files: section id.                                        |
| **`question_item`**                                                             | `string`  | For questionnaire files: question id.                                       |
| **`question_index`**                                                            | `integer` | For questionnaire files: position of the file in `files`.                   |
| **`reject_type`**, **`reject_reasons`**, **`reject_comment`**, **`button_ids`** | —         | Same meaning as in `review`.                                                |

**`party_reject_reasons[]`**

| Field                                                                           | Type     | Description                         |
| ------------------------------------------------------------------------------- | -------- | ----------------------------------- |
| **`party_key`**                                                                 | `string` | Associated party from the manifest. |
| **`status`**                                                                    | `string` | Review status of this party.        |
| **`reject_type`**, **`reject_reasons`**, **`reject_comment`**, **`button_ids`** | —        | Same meaning as in `review`.        |

**`step_reject_reasons[]`**

| Field                                                                           | Type     | Description                                             |
| ------------------------------------------------------------------------------- | -------- | ------------------------------------------------------- |
| **`party_key`**                                                                 | `string` | Associated party; empty for the row's own verification. |
| **`step`**                                                                      | `string` | Verification step.                                      |
| **`reject_type`**, **`reject_reasons`**, **`reject_comment`**, **`button_ids`** | —        | Same meaning as in `review`.                            |

**Example Response:**

```json
{
  "row_key": "client-001",
  "type": "individual",
  "client_id": "DNkjZcj-hHJA-yhO8yAX3rBRe",
  "external_customer_id": "crm-48213",
  "status": "change_requested",
  "review_status": "string",
  "error": "",
  "updated_at": "2026-09-28T11:05:12Z",
  "review": {
    "uuid": "c8b9ad3b-9ca4-4fbb-9cb6-a9aca0ee8e7e",
    "status": "string",
    "revision": "1",
    "updated_at": "2026-09-28T11:05:12Z",
    "reject_type": "string",
    "reject_reasons": ["string"],
    "reject_comment": "The document is blurry. Please upload a clear photo.",
    "button_ids": ["string"],
    "details_available": true,
    "document_reject_reasons": [
      {
        "document_uuid": "string",
        "party_key": "",
        "type": "ID_CARD",
        "sub_type": "FRONT_SIDE",
        "file": "client-001/id-front.jpg",
        "matched": true,
        "reject_type": "string",
        "reject_reasons": ["string"],
        "reject_comment": "Document is not readable",
        "button_ids": ["string"]
      }
    ],
    "party_reject_reasons": [],
    "step_reject_reasons": []
  },
  "review_error": ""
}
```

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/items/client-001> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Item Not Found (404)** — the batch or the `row_key` does not exist, or the batch belongs to another partner:

```json
{ "code": 5, "message": "item not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Live review data**: review details are read from compliance in real time and may be newer than the row status.
* **Mapping back to the manifest**: use `file`, `party_key` and `question_section` / `question_item` / `question_index`in `document_reject_reasons` to find the exact manifest entry to fix.
* **Fixing a row**: either correct the data and resubmit via Request Batch Changes, or send the customer a link from Get Item WebSDK Link.


# Get Item WebSDK Link

Generates a fresh verification link for a batch row in `change_requested`. Send the link to the end customer so they can correct data or upload missing documents themselves, without another batch commit.

The link is available only while the row is in `change_requested`; for any other status the method returns `409`.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/items/{row_key}/web_sdk_link`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetItemWebSDKLink>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |
| **`row_key`**  | `string` | Your `row_key` from the manifest.  | Yes      | `"client-001"`                           |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns a `GetItemWebSDKLinkResponse`.

**Response Fields**

| Field             | Type      | Description                                | Example                                  |
| ----------------- | --------- | ------------------------------------------ | ---------------------------------------- |
| **`url`**         | `string`  | Verification link for the end customer.    | `"<https://in.sumsub.com/websdk/p/>..."` |
| **`ttl_seconds`** | `integer` | How long the link stays valid, in seconds. | `1800`                                   |

**Example Response:**

```json
{
  "url": "<https://in.sumsub.com/websdk/p/sbx_example>",
  "ttl_seconds": 1800
}
```

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/items/client-001/web_sdk_link> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Row Not In change\_requested (409)** — the row is in any other status:

```json
{ "code": 10, "message": "item is not in change_requested", "details": [] }
```

**Item Not Found (404)**:

```json
{ "code": 5, "message": "item not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Fresh link every call**: request a new link when the previous one expires.
* **Useful for two-sided documents or missing files**: when a customer needs to add something only they have, the link is faster than a new batch cycle.
* **Result**: once the customer completes the check, the row continues through review and its status updates in Get Batch Item.


# Get Batch Schema

Returns the **frozen schema snapshot** of a batch: the verification requirements captured when the batch was created. Every manifest row is validated against this snapshot, even if the requirements change later, so this is the reference for building `manifest.json`.

The schema is available in every batch status.

A manifest row mirrors the schema: `fields`, `documents`, `questionnaire` and, for company rows, `associated_parties`are filled in against the part of the schema with the same name.

You rarely need to build a manifest from the schema by hand. Get Example Manifest returns a template generated from this snapshot. Use the schema to check requirements, allowed values and conditional questions.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/schema`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetBatchSchema>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns a `GetBatchSchemaResponse`.

**Response Fields**

| Field                         | Type     | Description                                                                                                                                                          |
| ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`schema_version`**          | `string` | Version of the snapshot. Same value as `schema_version` of the batch; you can pass it in `manifest.json`.                                                            |
| **`individual_schema`**       | `object` | Requirements for `individual` rows: `fields`, `documents`, `questionnaire`. Absent if the batch does not accept individuals.                                         |
| **`company_schema`**          | `object` | Requirements for `company` rows: `fields`, `documents`, `questionnaire`, `associated_parties`. Absent if the batch does not accept companies.                        |
| **`associated_party_levels`** | `object` | Requirements for company participants (UBOs, directors, authorized signatories), keyed by opaque level identifiers. Each entry has its own `fields` and `documents`. |

***

**Schema structure**

Each subject schema (`individual_schema`, `company_schema`, and every entry of `associated_party_levels`) is built from the parts below.

**`fields` — profile fields**

Describes every profile field the row can carry. For each field the schema states:

* whether it is **required** — required fields must have a non-empty value;
* the **value type** — the value in the manifest must have this type;
* the **format**, if any — the value must match it:

| Format  | Rule                                                  | Example              |
| ------- | ----------------------------------------------------- | -------------------- |
| date    | `YYYY-MM-DD`                                          | `"1990-05-14"`       |
| country | ISO 3166-1 alpha-2 code                               | `"CY"`               |
| email   | Valid address with `@` and a domain                   | `"anna@example.com"` |
| phone   | E.164: `+` and up to 15 digits, no spaces or brackets | `"+35799000000"`     |

In the manifest: `fields` is an object keyed by field id, e.g. `{"firstName": "Anna"}`.

**`documents` — document groups**

Describes which documents the row must or may provide, organized in groups (for example, identity document and proof of address). For each group the schema states:

* whether the group is **required** — every required group must be covered by at least one document;
* the **allowed document types** in the group;
* which of those types are **two-sided** (`two_sided_types`) — such documents are sent as two entries with `sub_typeFRONT_SIDE` and `BACK_SIDE`.

For companies, company documents use the type `COMPANY_DOC`; the specific kind of document is selected with `sub_type`from the list the group allows.

In the manifest: `documents` is an array of `{"type", "sub_type", "file"}` entries.

**`questionnaire` — questionnaire**

A blank questionnaire form: sections, and questions inside each section. For each question the schema states its **id**, **type**, **options** (for choice questions) and whether it is **required**. Some questions are shown only depending on the answer to another question.

If the level has no questionnaire, `questionnaire` is an empty array.

In the manifest: `questionnaire.sections.<section_id>.items.<question_id>` holds the answer, whose shape depends on the question type:

| Question type   | Answer shape                                         |
| --------------- | ---------------------------------------------------- |
| Regular         | `{"value": "..."}`                                   |
| Multiple choice | `{"values": ["...", "..."]}` (each one of `options`) |
| File attachment | `{"files": ["path/in/prefix.pdf"]}`                  |

**`associated_parties` — company participants (`company_schema` only)**

Lists the participant roles a company must or may declare. For each role the schema states:

* the **role** — `UBO`, `DIRECTOR` or `AUTHORIZED_SIGNATORY`;
* **`can_skip`** — if `false`, at least one party with this role is mandatory;
* the **applicant type** of the party;
* the **level** — an opaque reference to the entry in `associated_party_levels` that holds the party's own `fields` and `documents`.

In the manifest: `associated_parties` is an array of parties, each with its own `party_key`, roles in `types`, `fields`, `documents` and, for UBOs, `share_size`.

**How the parts connect**

```
company_schema
 ├─ fields, documents, questionnaire      → company row
 └─ associated_parties[]
      ├─ role: UBO, can_skip: false
      └─ level: "<id>" ──────────────┐
                                     ▼
associated_party_levels["<id>"]
 ├─ fields                            → associated_parties[].fields
 └─ documents                         → associated_parties[].documents
```

The same level identifiers are listed in `party_kyc_levels` of the Batch object.

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/schema> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

**Response (outline)**

```json
{
  "schema_version": "string",
  "individual_schema": {
    "fields": { },
    "documents": [ ],
    "questionnaire": [ ]
  },
  "company_schema": {
    "fields": { },
    "documents": [ ],
    "questionnaire": [ ],
    "associated_parties": [ ]
  },
  "associated_party_levels": {
    "<level_id>": {
      "fields": { },
      "documents": [ ]
    }
  }
}
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Frozen for the batch's lifetime**: the snapshot never changes. To onboard against newer requirements, create a new batch.
* **Opaque identifiers**: keys of `associated_party_levels` and the `level` references are identifiers only. Do not parse them or rely on their format.
* **Validation is strict**: rows are checked against the snapshot before customers are created — required fields, value types, formats, allowed document types, required document groups, document sides, questionnaire answers and mandatory roles. A row that fails any check becomes `invalid` with the reason in `error`.
* **Conditional questions**: the example manifest includes only unconditional questions. If an answer makes another question visible, answer that question too when it is required.
* **Markup is not allowed**: values containing `<` or `>` are rejected in profile fields, free-text answers and `external_customer_id`.

**Typical Workflow**:

1. Create a batch with Create Batch.
2. Call `GET /v2/compliance/batch/{batch_id}/schema` and check the requirements for each type.
3. Download the template with Get Example Manifest and fill it in against the schema.
4. Upload documents and `manifest.json`, then Commit Batch.


# Get Batch Status

Returns a summary of the batch: its current state and counters, a paginated list of **problems** with readable explanations, and a paginated list of **customers already created** by the batch.

* **Problems** are rows in `invalid`, `failed`, `change_requested` or `rejected`, plus rows in `creating` that are being retried after a temporary error. Each problem has a short `summary` of what is wrong.
* **Clients** are rows whose customer has actually been created, with the `client_id` you can use in other API methods. Reserved IDs that were never used are not included.

Counters include zeros and are available even before the first commit.

**Endpoint**

`GET /v2/compliance/batch/{batch_id}/status`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_GetBatchStatus>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Query Parameters**

| Parameter              | Type      | Description                                           | Required | Default |
| ---------------------- | --------- | ----------------------------------------------------- | -------- | ------- |
| **`page`**             | `integer` | Page of `problems`, starting at 1.                    | No       | `1`     |
| **`page_size`**        | `integer` | Problems per page, `0`–`100`.                         | No       | `100`   |
| **`client_page`**      | `integer` | Page of `clients`, starting at 1.                     | No       | `1`     |
| **`client_page_size`** | `integer` | Clients per page, `0`–`100`.                          | No       | `100`   |
| **`detailed`**         | `boolean` | Include full row details in each problem (`details`). | No       | `false` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Response (200 OK)**

Returns a `BatchStatusResponse`.

**Response Fields**

| Field                  | Type            | Description                                                   |
| ---------------------- | --------------- | ------------------------------------------------------------- |
| **`batch`**            | `object`        | `Batch` object. See Create Batch → Response Fields.           |
| **`problems`**         | `array[object]` | `BatchProblem` objects for the current page. See below.       |
| **`problem_total`**    | `integer`       | Total number of problems.                                     |
| **`page`**             | `integer`       | Current problems page.                                        |
| **`page_size`**        | `integer`       | Problems page size.                                           |
| **`clients`**          | `array[object]` | `CreatedBatchClient` objects for the current page. See below. |
| **`client_total`**     | `integer`       | Total number of created customers.                            |
| **`client_page`**      | `integer`       | Current clients page.                                         |
| **`client_page_size`** | `integer`       | Clients page size.                                            |

**`problems[]` (`BatchProblem`)**

| Field                       | Type     | Description                                                               |
| --------------------------- | -------- | ------------------------------------------------------------------------- |
| **`row_key`**               | `string` | Row identifier.                                                           |
| **`client_id`**             | `string` | Customer ID, if created.                                                  |
| **`type`**                  | `string` | `individual` or `company`.                                                |
| **`status`**                | `string` | Row status.                                                               |
| **`current_review_status`** | `string` | Current compliance review status, read live.                              |
| **`summary`**               | `string` | Readable explanation of the problem.                                      |
| **`details`**               | `object` | `BatchItemDetail`, same as Get Batch Item. Returned with `detailed=true`. |

**`clients[]` (`CreatedBatchClient`)**

| Field                      | Type     | Description                                 |
| -------------------------- | -------- | ------------------------------------------- |
| **`row_key`**              | `string` | Row identifier.                             |
| **`client_id`**            | `string` | ID of the created customer.                 |
| **`external_customer_id`** | `string` | Your customer identifier from the manifest. |

**Example Response:**

```json
{
  "batch": {
    "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
    "status": "CLOSED",
    "schema_version": "string",
    "types": [
      "individual",
      "company"
    ],
    "individual_kyc_level": "string",
    "company_kyc_level": "string",
    "party_kyc_levels": [
      "string"
    ],
    "counters": {
      "total": 120,
      "draft": 0,
      "valid": 0,
      "invalid": 3,
      "creating": 2,
      "submitted": 85,
      "finished": 24,
      "change_requested": 4,
      "rejected": 1,
      "failed": 1
    },
    "processed": false,
    "done": false,
    "created_at": "2026-09-28T10:15:30Z",
    "committed_at": "2026-09-28T11:02:04Z",
    "error": ""
  },
  "problem_total": 2,
  "problems": [
    {
      "row_key": "client-017",
      "client_id": "",
      "type": "individual",
      "status": "invalid",
      "current_review_status": "",
      "summary": "fields.email: value does not match format email"
    },
    {
      "row_key": "client-001",
      "client_id": "DNkjZcj-hHJA-yhO8yAX3rBRe",
      "type": "individual",
      "status": "change_requested",
      "current_review_status": "string",
      "summary": "ID_CARD FRONT_SIDE (client-001/id-front.jpg): document is not readable"
    }
  ],
  "page": 1,
  "page_size": 100,
  "clients": [
    {
      "row_key": "client-001",
      "client_id": "DNkjZcj-hHJA-yhO8yAX3rBRe",
      "external_customer_id": "crm-48213"
    }
  ],
  "client_total": 1,
  "client_page": 1,
  "client_page_size": 100
}
```

***

**Examples**

**Request**

```bash
curl --request GET \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/status?page=1&page_size=50> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Invalid Page Size (400)**:

```json
{ "code": 3, "message": "page_size must be between 0 and 100", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Two independent lists**: `page` / `page_size` control `problems`; `client_page` / `client_page_size` control `clients`.
* **Live review data**: the problem set comes from row statuses, while review details are read from compliance in real time and may be newer.
* **Use `clients` for mapping**: it is the quickest way to map your `row_key` and `external_customer_id` to Delos `client_id`.
* **Uploads do not count**: uploading files to the prefix does not create rows; rows appear only after a commit.


# List Customers

Retrieves a paginated list of customers with filtering options. Returns customer details including balances, status, and metadata.

**Endpoint**

`GET/v2/customer`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_List>" %}

### **Request**

#### **Query Parameters**

| Parameter           | Type      | Description & Values                                                                                                                                                                                                                                                                                                                   | Required | Example                                  |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------- |
| **`customerId`**    | `string`  | Filter by customer ID.                                                                                                                                                                                                                                                                                                                 | No       | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`customerName`**  | `string`  | Filter by customer name (partial match).                                                                                                                                                                                                                                                                                               | No       | `"John"`                                 |
| **`fromCreateAt`**  | `string`  | Filter customers created **after** this date (ISO 8601).                                                                                                                                                                                                                                                                               | No       | `"2024-01-01T00:00:00Z"`                 |
| **`meta.page`**     | `integer` | Page number (starts from 0).                                                                                                                                                                                                                                                                                                           | No       | `0`                                      |
| **`meta.pageSize`** | `integer` | Items per page.                                                                                                                                                                                                                                                                                                                        | No       | `10`                                     |
| **`status`**        | `string`  | <p>Filter by customer status:<br>- <code>NEW</code>: Registered user<br>- <code>READY\_FOR\_MODERATION</code>: Sent to moderator<br>- <code>MODERATED</code>: Moderator reviewed<br>- <code>VERIFY</code>: In verification<br>- <code>ACCEPT</code>: Approved<br>- <code>REJECT</code>: Rejected<br>- <code>BANNED</code>: Blocked</p> | No       | `"ACCEPT"`                               |
| **`toCreateAt`**    | `string`  | Filter customers created **before** this date (ISO 8601).                                                                                                                                                                                                                                                                              | No       | `"2024-12-31T23:59:59Z"`                 |
| **`type`**          | `string`  | <p>Filter by customer type:<br>- <code>CORPORATE</code>: Business entity<br>- <code>INDIVIDUAL</code>: Person</p>                                                                                                                                                                                                                      | No       | `"INDIVIDUAL"`                           |
| **`userUuid`**      | `string`  | Filter by user UUID.                                                                                                                                                                                                                                                                                                                   | No       | `"b5f8e835-d669-4d4d-8ddf-198263364821"` |

***

### **Response (200 OK)**

Returns paginated customer data with metadata.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description                         | Example |
| -------------- | --------- | ----------------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.                     | `10`    |
| **`page`**     | `integer` | Current page number.                | `0`     |
| **`total`**    | `string`  | Total customers (across all pages). | `"150"` |

**2. Customer Object (`items[]`)**

| Field             | Type     | Description                                 | Example                                  |
| ----------------- | -------- | ------------------------------------------- | ---------------------------------------- |
| **`cuid`**        | `string` | **Customer unique ID**.                     | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`puid`**        | `string` | **Partner/user ID**.                        | `"127c9ea7-3ea7-4063-9fa4-c69e796c55e4"` |
| **`status`**      | `string` | Current status (see values above).          | `"ACCEPT"`                               |
| **`createAt`**    | `string` | Creation timestamp (ISO 8601).              | `"2024-01-15T10:30:00Z"`                 |
| **`updateAt`**    | `string` | Last update timestamp (ISO 8601).           | `"2024-05-20T14:45:00Z"`                 |
| **`name`**        | `string` | First name (individual) or company name.    | `"John"` or `"Acme Inc."`                |
| **`lastname`**    | `string` | Last name (individuals only).               | `"Doe"`                                  |
| **`comment`**     | `string` | Internal notes/comments.                    | `"VIP client"`                           |
| **`company`**     | `string` | Company name (if corporate).                | `"Acme Inc."`                            |
| **`type`**        | `string` | `CORPORATE` or `INDIVIDUAL`.                | `"INDIVIDUAL"`                           |
| **`balance`**     | `object` | **Available balance** (Money Object).       | -                                        |
| **`balanceHold`** | `object` | **Held/restricted balance** (Money Object). | -                                        |

**Money Object**

| Field              | Type      | Description               | Example               |
| ------------------ | --------- | ------------------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code (ISO 4217). | `"USD"`               |
| **`units`**        | `string`  | Whole units.              | `"1000"`              |
| **`nanos`**        | `integer` | Fractional units (10^-9). | `500000000` (= $0.50) |

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer?status=ACCEPT&type=INDIVIDUAL&meta.page=0&meta.pageSize=5' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Response**

json

```
{
  "meta": {
    "pageSize": 5,
    "page": 0,
    "total": "23"
  },
  "items": [
    {
      "cuid": "DqCsgSE-4e95-ViYbNI",
      "puid": "127c9ea7-3ea7-4063-9fa4-c69e796c55e4",
      "status": "ACCEPT",
      "createAt": "2024-01-15T10:30:00Z",
      "updateAt": "2024-05-20T14:45:00Z",
      "name": "John",
      "lastname": "Doe",
      "type": "INDIVIDUAL",
      "balance": {
        "currencyCode": "USD",
        "units": "1500",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    }
  ]
}
```

***

### **Error Responses**

1. **Invalid Status/Type**:

   json

   ```
   { "error": "Invalid status value: INVALID_STATUS" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Pagination**: Default `pageSize` is typically 20-50 items.
* **Date Format**: Use ISO 8601 (`YYYY-MM-DDThh:mm:ssZ`).
* **Balance Types**:
  * `balance`: Available for transactions.
  * `balanceHold`: Temporarily locked (e.g., pending transactions).

Real request Example 1

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwODI3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.XfGwROoZwOCi3DKim0LItQ1RAUi6tip68ZSLvYNN2_4
customerId:
DqCsgSE-4e95-ViYbNI7mudVE
customerName:
Test com
fromCreateAt:
string
meta.page:
integer
meta.pageSize:

```

Real response example 1

200 OK

```postman_json
{
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "0"
  },
  "items": []
}
```

Real request 2

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwODI3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.XfGwROoZwOCi3DKim0LItQ1RAUi6tip68ZSLvYNN2_4

```

Real response 2

```postman_json
{
  "meta": {
    "pageSize": 22,
    "page": 0,
    "total": "22"
  },
  "items": [
    {
      "customerId": "Doief2V-ITMK-rPT6ckmcui5t",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-10-16T17:59:01Z",
      "updateAt": "2025-10-20T14:07:09Z",
      "name": "Test",
      "lastname": "string",
      "comment": "string",
      "company": "Test",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DIekSXG-5nAE-TRioUrRHTW9o",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-10-10T09:09:46Z",
      "updateAt": "2025-10-10T09:09:46Z",
      "name": "ABC",
      "lastname": "",
      "comment": "",
      "company": "ABC",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "ACCEPT",
      "createAt": "2025-09-16T11:33:11Z",
      "updateAt": "2025-10-02T09:03:23Z",
      "name": "NOVA HORIZON LTD",
      "lastname": "",
      "comment": "",
      "company": "NOVA HORIZON LTD",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "2835",
        "nanos": 800000002
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "3144",
        "nanos": 199999998
      }
    },
    {
      "customerId": "DsVORph-6e1g-ofLmNlLkSO4e",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-09-16T07:35:45Z",
      "updateAt": "2025-09-16T07:35:45Z",
      "name": "Test1",
      "lastname": "",
      "comment": "",
      "company": "Test1",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DaKFXt2-1vfp-e00RmYfclJTS",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-09-15T08:10:40Z",
      "updateAt": "2025-09-15T08:10:40Z",
      "name": "API",
      "lastname": "App",
      "comment": "string",
      "company": "API",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DuHE6zT-X62B-jlI3z4jDHUbj",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-09-12T10:06:17Z",
      "updateAt": "2025-10-17T14:34:50Z",
      "name": "Test",
      "lastname": "",
      "comment": "",
      "company": "Test",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DKK9ixq-OCO2-s7zsoPNZQMNy",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "READY_FOR_MODERATION",
      "createAt": "2025-04-08T13:18:48Z",
      "updateAt": "2025-04-08T13:19:44Z",
      "name": "Test Stage1 Test Stage2",
      "lastname": "Test Stage2",
      "comment": "",
      "company": "Test Stage1 Test Stage2",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DsXXsPq-NbVT-BSoPIlDF6aWh",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "READY_FOR_MODERATION",
      "createAt": "2025-03-27T06:13:21Z",
      "updateAt": "2025-03-27T06:36:59Z",
      "name": "Test1 Test2",
      "lastname": "Test2",
      "comment": "Test4",
      "company": "Test1 Test2",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "D4ZzW7O-USRR-uhNqTZfCtr48",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-03-10T22:19:17Z",
      "updateAt": "2025-03-10T22:20:30Z",
      "name": "First Mark 2nd Mark",
      "lastname": "2nd Mark",
      "comment": "Comment",
      "company": "First Mark 2nd Mark",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "Ds4chzv-eL2I-M5hvl0Xjv5rX",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-02-25T15:33:31Z",
      "updateAt": "2025-02-25T15:33:31Z",
      "name": "TestType4 TestType4",
      "lastname": "TestType4",
      "comment": "",
      "company": "TestType4 TestType4",
      "type": "INDIVIDUAL",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DULfTCd-ykEK-7NfYjUE3n4gS",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-02-25T14:59:57Z",
      "updateAt": "2025-02-25T15:00:04Z",
      "name": "TestType3 TestType3",
      "lastname": "TestType3",
      "comment": "",
      "company": "TestType3 TestType3",
      "type": "INDIVIDUAL",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DN6NzfF-7EhX-GYoVohMqafmM",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-02-25T14:59:21Z",
      "updateAt": "2025-02-25T14:59:21Z",
      "name": "TestType2 TestType2",
      "lastname": "TestType2",
      "comment": "",
      "company": "TestType2 TestType2",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DOPnYlY-0Xbl-tcLj2v8svOtx",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-02-14T14:17:30Z",
      "updateAt": "2025-02-14T14:17:30Z",
      "name": "Test Test",
      "lastname": "Test",
      "comment": "",
      "company": "Test Test",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "ACCEPT",
      "createAt": "2025-01-28T11:10:23Z",
      "updateAt": "2025-02-14T12:24:01Z",
      "name": "Test Eugen Test Eugen",
      "lastname": "Test Eugen",
      "comment": "Test Eugen",
      "company": "Test Eugen Test Eugen",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "1650",
        "nanos": 972000225
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "498",
        "nanos": 354814459
      }
    },
    {
      "customerId": "DnCrQVb-u3Tt-fA4rA0bJ47tp",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-01-10T08:58:07Z",
      "updateAt": "2025-01-10T08:58:07Z",
      "name": "dfklgjhldfk sruturettring",
      "lastname": "sruturettring",
      "comment": "string",
      "company": "dfklgjhldfk sruturettring",
      "type": "CORPORATE",
      "balance": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 0
      }
    },
    {
      "customerId": "DcuswIU-06yY-SWeF4CC6FTeG",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-01-10T08:57:14Z",
      "updateAt": "2025-01-10T08:57:14Z",
      "name": "abd ldkfj",
      "lastname": "ldkfj",
      "comment": "string",
      "company": "abd ldkfj",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "D4r9r1t-Yv3F-o0elRYoLbDGQ",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2025-01-10T08:56:04Z",
      "updateAt": "2025-01-10T08:56:04Z",
      "name": "Name Lastname",
      "lastname": "Lastname",
      "comment": "string",
      "company": "Name Lastname",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DiIQ7VR-89Cz-MbgvdmhmR2Ic",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2024-09-18T13:22:05Z",
      "updateAt": "2024-09-18T13:22:05Z",
      "name": "Dario Roberts",
      "lastname": "Roberts",
      "comment": "Simply. the best",
      "company": "Dario Roberts",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "Drv8xnP-NGrR-opUHqgyIuXW7",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2024-08-30T11:35:09Z",
      "updateAt": "2024-08-30T11:36:10Z",
      "name": "Luca Gorski",
      "lastname": "Gorski",
      "comment": "",
      "company": "Luca Gorski",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DkRyxfy-1pHk-pIJSR7rmQoMY",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2024-08-20T11:20:02Z",
      "updateAt": "2024-08-20T11:20:02Z",
      "name": "Mark Walsh",
      "lastname": "Walsh",
      "comment": "Client 1 onboarded 20th August",
      "company": "Mark Walsh",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "DoxdEEV-4IJq-zKeUYqrtqVDK",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "NEW",
      "createAt": "2024-08-15T13:07:55Z",
      "updateAt": "2024-08-15T13:07:55Z",
      "name": "James Test",
      "lastname": "Test",
      "comment": "",
      "company": "James Test",
      "type": "CORPORATE",
      "balance": null,
      "balanceHold": null
    },
    {
      "customerId": "D2m7Lul-43rP-DdkoWBYZuZrn",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "status": "READY_FOR_MODERATION",
      "createAt": "2024-08-14T13:09:28Z",
      "updateAt": "2025-02-25T14:58:59Z",
      "name": "Test Test",
      "lastname": "Test",
      "comment": "Test",
      "company": "Test Test",
      "type": "INDIVIDUAL",
      "balance": {
        "currencyCode": "USD",
        "units": "-120",
        "nanos": -340000000
      },
      "balanceHold": {
        "currencyCode": "USD",
        "units": "220",
        "nanos": 340000000
      }
    }
  ]
}
```


# Add Customer

Creates a new customer with the provided details. Returns the newly created customer object with system-generated IDs and default balances.

**Endpoint**

`POST/v2/customer`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_Add>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field          | Type     | Description & Requirements                                                                                               | Required | Example                   |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------- |
| **`name`**     | `string` | **First name** (individual) or **Company name** (corporate).                                                             | Yes      | `"John"` or `"Acme Inc."` |
| **`lastname`** | `string` | **Last name** (individuals only).                                                                                        | No       | `"Doe"`                   |
| **`comment`**  | `string` | **Internal notes/comments**.                                                                                             | No       | `"VIP client"`            |
| **`company`**  | `string` | **Company name** (if corporate).                                                                                         | No       | `"Acme Corporation"`      |
| **`type`**     | `string` | <p><strong>Customer type</strong>:<br>- <code>CORPORATE</code>: Business entity<br>- <code>INDIVIDUAL</code>: Person</p> | No       | `"INDIVIDUAL"`            |

**Example Request Body (Individual):**

json

```
{
  "name": "John",
  "lastname": "Doe",
  "type": "INDIVIDUAL",
  "comment": "Premium customer"
}
```

**Example Request Body (Corporate):**

json

```
{
  "name": "Acme Inc.",
  "company": "Acme Corporation",
  "type": "CORPORATE",
  "comment": "Business account"
}
```

***

### **Response (200 OK)**

Returns the created customer object with system-generated fields.

#### **Response Fields**

| Field             | Type     | Description                                   | Example                                  |
| ----------------- | -------- | --------------------------------------------- | ---------------------------------------- |
| **`cuid`**        | `string` | **System-generated customer ID**.             | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`puid`**        | `string` | **Partner/user ID**.                          | `"127c9ea7-3ea7-4063-9fa4-c69e796c55e4"` |
| **`status`**      | `string` | Initial status: `NEW`.                        | `"NEW"`                                  |
| **`createAt`**    | `string` | Creation timestamp (ISO 8601).                | `"2024-05-20T10:30:00Z"`                 |
| **`updateAt`**    | `string` | Update timestamp (ISO 8601).                  | `"2024-05-20T10:30:00Z"`                 |
| **`name`**        | `string` | Name from request.                            | `"John"`                                 |
| **`lastname`**    | `string` | Last name from request.                       | `"Doe"`                                  |
| **`comment`**     | `string` | Comment from request.                         | `"Premium customer"`                     |
| **`company`**     | `string` | Company name from request.                    | `""`                                     |
| **`type`**        | `string` | Customer type from request.                   | `"INDIVIDUAL"`                           |
| **`balance`**     | `object` | **Initial balance** (0, in default currency). | -                                        |
| **`balanceHold`** | `object` | **Initial held balance** (0).                 | -                                        |

**Money Object (for balances)**

| Field              | Type      | Description       | Example |
| ------------------ | --------- | ----------------- | ------- |
| **`currencyCode`** | `string`  | Currency code.    | `"USD"` |
| **`units`**        | `string`  | Whole units.      | `"0"`   |
| **`nanos`**        | `integer` | Fractional units. | `0`     |

**Example Response:**

json

```
{
  "item": {
    "cuid": "DqCsgSE-4e95-ViYbNI",
    "puid": "127c9ea7-3ea7-4063-9fa4-c69e796c55e4",
    "status": "NEW",
    "createAt": "2024-05-20T10:30:00Z",
    "updateAt": "2024-05-20T10:30:00Z",
    "name": "John",
    "lastname": "Doe",
    "comment": "Premium customer",
    "company": "",
    "type": "INDIVIDUAL",
    "balance": {
      "currencyCode": "USD",
      "units": "0",
      "nanos": 0
    },
    "balanceHold": {
      "currencyCode": "USD",
      "units": "0",
      "nanos": 0
    }
  }
}
```

***

### **Examples**

#### **Request (Corporate Customer)**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/customer' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Tech Solutions Ltd",
    "company": "Tech Solutions Group",
    "type": "CORPORATE",
    "comment": "Enterprise client"
  }'
```

***

### **Error Responses**

1. **Missing Required Field**:

   json

   ```
   { "error": "name is required" }
   ```
2. **Invalid Type**:

   json

   ```
   { "error": "Invalid type: INVALID_TYPE" }
   ```
3. **Duplicate Customer**:

   json

   ```
   { "error": "Customer already exists" }
   ```

***

### **Notes**

* **Default Values**:
  * `status` defaults to `NEW`
  * `type` defaults to `CORPORATE` if not specified
  * Balances initialize to `0` in system default currency
* **Next Steps**:
  * New customers typically require verification (`MODERATED` → `ACCEPTED`)
  * Add accounts via `/v2/account` endpoint

Real request Example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMxMTE2LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.ns5XvumhlZ6NNxMy6ubfBEhpiRw6_QxODCfnyNEyc_Q
{
  "name": "API",
  "lastname": "Testing",
  "comment": "string",
  "company": "API Testing",
  "type": "CORPORATE"
}
{
  "name": "API",
  "lastname": "Testing",
  "comment": "string",
  "company": "API Testing",
  "type": "CORPORATE"
}
```

Real response example

200 OK

```postman_json
{
  "item": {
    "customerId": "Dsmwr6E-x1oN-B3KfkJ4D53SA",
    "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "status": "NEW",
    "createAt": "2025-10-22T11:00:26Z",
    "updateAt": "2025-10-22T11:00:26Z",
    "name": "API",
    "lastname": "Testing",
    "comment": "string",
    "company": "API",
    "type": "CORPORATE",
    "balance": null,
    "balanceHold": null
  }
}
```


# Get Customer

Retrieves detailed information about a specific customer including balances, contact information, and status.

**Endpoint**

<kbd>`POST/v2/customer/{customerId}`</kbd>

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_Get>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                  | Required | Example                 |
| ---------------- | -------- | ---------------------------- | -------- | ----------------------- |
| **`customerId`** | `string` | **Customer ID** to retrieve. | Yes      | `"DqCsgSE-4e95-ViYbNI"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a customer object with complete details.

#### **Response Fields**

| Field             | Type     | Description                                                                                                                                                                                                           | Example                                  |
| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| **`cuid`**        | `string` | **Customer unique ID**.                                                                                                                                                                                               | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`puid`**        | `string` | **Partner/user ID**.                                                                                                                                                                                                  | `"127c9ea7-3ea7-4063-9fa4-c69e796c55e4"` |
| **`status`**      | `string` | <p>Current status:<br>- <code>NEW</code><br>- <code>READY\_FOR\_MODERATION</code><br>- <code>MODERATED</code><br>- <code>VERIFY</code><br>- <code>ACCEPT</code><br>- <code>REJECT</code><br>- <code>BANNED</code></p> | `"ACCEPT"`                               |
| **`createAt`**    | `string` | Creation timestamp (ISO 8601).                                                                                                                                                                                        | `"2024-01-15T10:30:00Z"`                 |
| **`updateAt`**    | `string` | Last update timestamp (ISO 8601).                                                                                                                                                                                     | `"2024-05-20T14:45:00Z"`                 |
| **`name`**        | `string` | First name or company name.                                                                                                                                                                                           | `"John"` or `"Acme Inc."`                |
| **`lastname`**    | `string` | Last name (individuals only).                                                                                                                                                                                         | `"Doe"`                                  |
| **`comment`**     | `string` | Internal notes/comments.                                                                                                                                                                                              | `"VIP client"`                           |
| **`company`**     | `string` | Company name (if corporate).                                                                                                                                                                                          | `"Acme Corporation"`                     |
| **`type`**        | `string` | `CORPORATE` or `INDIVIDUAL`.                                                                                                                                                                                          | `"INDIVIDUAL"`                           |
| **`balance`**     | `object` | **Available balance** (Money Object).                                                                                                                                                                                 | -                                        |
| **`balanceHold`** | `object` | **Held/restricted balance** (Money Object).                                                                                                                                                                           | -                                        |
| **`phone`**       | `string` | Contact phone number.                                                                                                                                                                                                 | `"+1234567890"`                          |
| **`email`**       | `string` | Contact email address.                                                                                                                                                                                                | `"john@example.com"`                     |

**Money Object**

| Field              | Type      | Description               | Example               |
| ------------------ | --------- | ------------------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code (ISO 4217). | `"USD"`               |
| **`units`**        | `string`  | Whole units.              | `"1500"`              |
| **`nanos`**        | `integer` | Fractional units (10^-9). | `500000000` (= $0.50) |

**Example Response:**

json

```
{
  "item": {
    "cuid": "DqCsgSE-4e95-ViYbNI",
    "puid": "127c9ea7-3ea7-4063-9fa4-c69e796c55e4",
    "status": "ACCEPT",
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-05-20T14:45:00Z",
    "name": "John",
    "lastname": "Doe",
    "comment": "VIP client",
    "company": "",
    "type": "INDIVIDUAL",
    "balance": {
      "currencyCode": "USD",
      "units": "1500",
      "nanos": 500000000
    },
    "balanceHold": {
      "currencyCode": "USD",
      "units": "250",
      "nanos": 0
    },
    "phone": "+1234567890",
    "email": "john@example.com"
  }
}
```

*Translation: $1500.50 available, $250.00 on hold*

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Corporate Customer Example**

**Response:**

json

```
{
  "item": {
    "cuid": "DqCsgSE-4e95-ViYbNI",
    "puid": "127c9ea7-3ea7-4063-9fa4-c69e796c55e4",
    "status": "ACCEPT",
    "createAt": "2024-02-20T09:15:00Z",
    "updateAt": "2024-05-18T16:20:00Z",
    "name": "Tech Solutions Ltd",
    "lastname": "",
    "comment": "Enterprise account",
    "company": "Tech Solutions Group",
    "type": "CORPORATE",
    "balance": {
      "currencyCode": "EUR",
      "units": "50000",
      "nanos": 0
    },
    "balanceHold": {
      "currencyCode": "EUR",
      "units": "10000",
      "nanos": 0
    },
    "phone": "+49876543210",
    "email": "finance@techsolutions.com"
  }
}
```

***

### **Error Responses**

1. **Customer Not Found**:

   json

   ```
   { "error": "Customer not found: DqCsgSE-4e95-ViYbNI" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Balance Types**:
  * `balance`: Available for transactions
  * `balanceHold`: Temporarily locked (pending transactions, reserves)
* **Status Flow**:
  * `NEW` → `MODERATED` → `ACCEPT` (typical flow)
  * `BANNED` accounts cannot perform transactions
* **Contact Info**: Phone/email may be masked for privacy (`"j***@example.com"`)

Real request example

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTYzMDE4LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.ya9eUQUvAB1OROjjinA36fULCTAWCLengiPCxXVMsrU
customerId*: D7k3xbc-ERrj-lde9k1t3XuaE
```

Real response example

200 OK

```postman_json
{
  "item": {
    "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
    "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "status": "ACCEPT",
    "createAt": "2025-09-16T11:33:11Z",
    "updateAt": "2025-10-02T09:03:23Z",
    "name": "NOVA HORIZON LTD",
    "lastname": "",
    "comment": "",
    "company": "NOVA HORIZON LTD",
    "type": "CORPORATE",
    "balance": {
      "currencyCode": "USD",
      "units": "2835",
      "nanos": 800000002
    },
    "balanceHold": {
      "currencyCode": "USD",
      "units": "3144",
      "nanos": 199999998
    },
    "phone": "+447533029735",
    "email": "business@novahorizon.example"
  }
}
```


# Update Customer

Updates an existing customer's information including status, contact details, and metadata. Returns the updated customer object.

**Endpoint**

`PATCH/v2/customer/{customerId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_Update>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                | Required | Example                 |
| ---------------- | -------- | -------------------------- | -------- | ----------------------- |
| **`customerId`** | `string` | **Customer ID** to update. | Yes      | `"DqCsgSE-4e95-ViYbNI"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

All fields are optional - only include the fields you want to update.

| Field          | Type     | Description & Values                                                                                                                                                                                                                    | Example                   |
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| **`name`**     | `string` | **First name** or **company name**.                                                                                                                                                                                                     | `"John"` or `"Acme Inc."` |
| **`lastname`** | `string` | **Last name** (individuals only).                                                                                                                                                                                                       | `"Smith"`                 |
| **`comment`**  | `string` | **Internal notes/comments**.                                                                                                                                                                                                            | `"Updated contact info"`  |
| **`company`**  | `string` | **Company name** (if corporate).                                                                                                                                                                                                        | `"Acme Corporation"`      |
| **`status`**   | `string` | <p><strong>Customer status</strong>:<br>- <code>NEW</code><br>- <code>READY\_FOR\_MODERATION</code><br>- <code>MODERATED</code><br>- <code>VERIFY</code><br>- <code>ACCEPT</code><br>- <code>REJECT</code><br>- <code>BANNED</code></p> | `"ACCEPT"`                |
| **`type`**     | `string` | <p><strong>Customer type</strong>:<br>- <code>CORPORATE</code><br>- <code>INDIVIDUAL</code></p>                                                                                                                                         | `"INDIVIDUAL"`            |

**Example Request Body:**

json

```
{
  "name": "John",
  "lastname": "Smith",
  "status": "ACCEPT",
  "comment": "Verified customer"
}
```

***

### **Response (200 OK)**

Returns the updated customer object with all current values.

#### **Response Fields**

| Field             | Type     | Description                       | Example                                  |
| ----------------- | -------- | --------------------------------- | ---------------------------------------- |
| **`cuid`**        | `string` | Customer ID (unchanged).          | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`puid`**        | `string` | Partner ID (unchanged).           | `"127c9ea7-3ea7-4063-9fa4-c69e796c55e4"` |
| **`status`**      | `string` | Updated status.                   | `"ACCEPT"`                               |
| **`createAt`**    | `string` | Original creation timestamp.      | `"2024-01-15T10:30:00Z"`                 |
| **`updateAt`**    | `string` | **New update timestamp**.         | `"2024-05-21T09:15:00Z"`                 |
| **`name`**        | `string` | Updated name.                     | `"John"`                                 |
| **`lastname`**    | `string` | Updated last name.                | `"Smith"`                                |
| **`comment`**     | `string` | Updated comment.                  | `"Verified customer"`                    |
| **`company`**     | `string` | Updated company name.             | `""`                                     |
| **`type`**        | `string` | Customer type.                    | `"INDIVIDUAL"`                           |
| **`balance`**     | `object` | Current balance (unchanged).      | -                                        |
| **`balanceHold`** | `object` | Current held balance (unchanged). | -                                        |

**Money Object**

| Field              | Type      | Description       | Example               |
| ------------------ | --------- | ----------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code.    | `"USD"`               |
| **`units`**        | `string`  | Whole units.      | `"1500"`              |
| **`nanos`**        | `integer` | Fractional units. | `500000000` (= $0.50) |

**Example Response:**

json

```
{
  "item": {
    "cuid": "DqCsgSE-4e95-ViYbNI",
    "puid": "127c9ea7-3ea7-4063-9fa4-c69e796c55e4",
    "status": "ACCEPT",
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-05-21T09:15:00Z",
    "name": "John",
    "lastname": "Smith",
    "comment": "Verified customer",
    "company": "",
    "type": "INDIVIDUAL",
    "balance": {
      "currencyCode": "USD",
      "units": "1500",
      "nanos": 500000000
    },
    "balanceHold": {
      "currencyCode": "USD",
      "units": "250",
      "nanos": 0
    }
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X PATCH 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "ACCEPT",
    "comment": "Completed verification"
  }'
```

#### **Corporate Customer Update**

**Request:**

json

```
{
  "company": "Tech Solutions Global",
  "status": "ACCEPT",
  "comment": "Enterprise account approved"
}
```

***

### **Error Responses**

1. **Customer Not Found**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **Invalid Status**:

   json

   ```
   { "error": "Invalid status transition from BANNED to ACCEPT" }
   ```
3. **Validation Error**:

   json

   ```
   { "error": "Company name required for CORPORATE type" }
   ```

***

### **Notes**

* **Partial Updates**: Only included fields are modified.
* **Status Restrictions**: Some status changes may be restricted (e.g., `BANNED` → `ACCEPT`).
* **Type Changes**: Changing from `INDIVIDUAL` to `CORPORATE` may require additional company fields.

Real request Example

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcxMTI5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.bC-UKwBwV1qJhkP3dBbU_-Wr0xaLCL-bHXOO0CIP5Cs
customerId*: D7k3xbc-ERrj-lde9k1t3XuaE

```

```postman_json
{
  "name": "NOVA HORIZON LTD",
  "lastname": "string",
  "comment": "string",
  "company": "NOVA HORIZON LTD",
  "status": "ACCEPT",
  "type": "CORPORATE"
}
```

Real response example

200 OK

```postman_json
{
  "item": {
    "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
    "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "status": "ACCEPT",
    "createAt": "2025-09-16T11:33:11Z",
    "updateAt": "2025-10-27T13:13:57Z",
    "name": "NOVA HORIZON LTD",
    "lastname": "string",
    "comment": "string",
    "company": "NOVA HORIZON LTD",
    "type": "CORPORATE",
    "balance": null,
    "balanceHold": null
  }
}
```


# Share Verified KYC/KYB Data

Applies a SumSub share token to an existing customer, transferring an already-verified profile instead of requiring the customer to go through verification again. One token covers the whole share: an **INDIVIDUAL**'s own verified profile, or a **CORPORATE** profile copied together with its verified beneficiaries/UBOs — the company profile is derived from the shared applicant.

The token is validated **before** it is consumed. If it is rejected, the response reports `applied: false` with the reason in `message`; nothing is applied, and the request can be retried after fixing the token. Malformed requests fail with `400` before any side effect.

A customer can be successfully shared **exactly once**. Repeating the call after a successful share (`applied: true`) returns `409`. If the previous attempt failed (`applied: false`), the same customer can be shared again with a corrected token.

Not available for partners on the BaaS verification program (`403`).

**Endpoint**

`POST/v2/compliance/{customerId}/share`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_Share>" %}

#### **Request**

**Path Parameters**

| Parameter        | Type     | Description                            | Required | Example                       |
| ---------------- | -------- | -------------------------------------- | -------- | ----------------------------- |
| **`customerId`** | `string` | **Customer ID** to apply the share to. | Yes      | `"DCalXLc-KRLb-ICUZ4pnjWNvo"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

`ShareRequest` carries a SumSub share token for an **existing** customer. Tokens are short-lived (\~20 minutes) and single-use; the token is validated upfront and nothing is consumed if it is rejected.

| Field                 | Type     | Description                                                                | Required |
| --------------------- | -------- | -------------------------------------------------------------------------- | -------- |
| **`applicant`**       | `object` | `KycShareApplicant` — the customer's own shared, already-verified profile. | Yes      |
| **`applicant.token`** | `string` | The SumSub share token.                                                    | Yes      |

**Example Request Body:**

```
{
  "applicant": {
    "token": "string"
  }
}
```

#### **Response (200 OK)**

Returns a `KycShareResult` reporting the outcome of share-token processing.

**Response Fields**

| Field             | Type            | Description                                                                                          | Example                  |
| ----------------- | --------------- | ---------------------------------------------------------------------------------------------------- | ------------------------ |
| **`applied`**     | `boolean`       | `true` if and only if compliance accepted and applied the token.                                     | `true`                   |
| **`message`**     | `string`        | Failure reason when the token was not applied (e.g. expired token, shared applicant not approved).   | `"Token expired"`        |
| **`outstanding`** | `array[string]` | Document sets still required when the shared data did not fully cover the target verification level. | `["PROOF_OF_RESIDENCE"]` |

**Example Response — Success, fully verified:**

```
{
  "applied": true,
  "message": "",
  "outstanding": []
}
```

**Example Response — Success, additional documents required:**

```
{
  "applied": true,
  "message": "",
  "outstanding": ["PROOF_OF_RESIDENCE"]
}
```

**Example Response — Token rejected:**

```
{
  "applied": false,
  "message": "Token expired",
  "outstanding": []
}
```

***

#### **Examples**

**Request**

```
curl --request POST \
  --url https://tp2.tst-apidmndelss.com/v2/compliance/customerId/share \
  --header 'Accept: application/json' \
  --header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjUzOCwiZXhwIjoxNzc4MDU5NzU0LCJrZXkiOiI1ODg4MTk4NDNkZWE1OWRkMzhlMjA5MTM3NDg4MmY2OGVkY2Q1MWJkIiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.JlzM3bXwNcIIDXI8bLS02kuI41w3Z-me3aqj3W3_4RY' \
  --header 'Content-Type: application/json' \
  --data '{
  "applicant": {
    "token": "string"
  }
}'
```

**Response**

```
{
  "applied": true,
  "message": "",
  "outstanding": ["PROOF_OF_RESIDENCE"]
}
```

***

#### **Error Responses**

**Malformed Request (400)**:

```
{
  "error": "Invalid request body"
}
```

**Access Restricted for BaaS Verification Program (403)**:

```
{ 
  "error": "Not available for partners on the BaaS verification program" 
}
```

**Customer Already Shared (409)**:

```
{ 
  "error": "Customer has already been shared" 
}
```

**Authorization fail**

```
{ 
  "error": "Unauthorized" 
}
```

***

#### **Required Follow-Up Steps**

A successful share (`applied: true`) is not the end of the flow — two follow-up actions are required:

1. **Finalize the application** — call [`PATCH /v2/customer/{customerId}/application`](https://docs.delos.financial/application/send-customer-application) to update the customer's application status based on the applied data.
2. **Cover outstanding documents, if any** — if the response includes items in `outstanding`, the shared data did not fully satisfy the required verification level. Generate a link via [`GET /v2/compliance/{customerId}/web_sdk_link`](https://docs.delos.financial/compliance/get-compliance-link) so the customer can upload the missing document sets.

***

#### **Notes**

* **Single successful share**: only a **successfully applied** token consumes the one-time share. A rejected token (`applied: false`) does not block retrying with a corrected token for the same `customerId`.
* **Token lifetime**: share tokens are short-lived (\~20 minutes) and single-use — request a fresh token from SumSub if it expires before use.
* **Scope of the share**: for `CORPORATE` applicants, the shared profile includes verified beneficiaries/UBOs; there is no separate call needed to bring those over.
* **BaaS verification program**: partners operating under the BaaS verification program cannot use this method (`403`) — their customers must complete standard verification via Get Compliance Link.
* **Prerequisite — matching verification levels**: Before using this endpoint, ensure that the KYC/KYB verification level shared with the partner via Sumsub Partner Levels exactly matches the level used on your own side. A mismatch between levels will prevent the share flow from working correctly, even if the token itself is valid. See [Configuring Partner Verification Levels](https://docs.delos.financial/configuring-partner-verification-levels) for setup instructions.

**Typical Workflow**:

1. Customer's SumSub share token is obtained.
2. Call `POST /v2/compliance/{customerId}/share` with the token.
3. If `applied: false` → fix the token and retry from step 2.
4. If `applied: true` → call [`PATCH /v2/customer/{customerId}/application`](https://docs.delos.financial/application/send-customer-application) to finalize the application.
5. If `outstanding` is non-empty → generate a [`GET /v2/compliance/{customerId}/web_sdk_link`](https://docs.delos.financial/compliance/get-compliance-link) link for the customer to upload the remaining documents.
6. Customer status updates accordingly (e.g. `MODERATED` → `ACCEPTED`).


# Get Compliance Link

Generates a temporary, single-use URL for a customer to access the compliance web SDK. This URL allows customers to complete KYC/KYB (Know Your Customer/Business), AML (Anti-Money Laundering), and other compliance verification processes through a secure, hosted interface.

**Endpoint**

`GET/v2/compliance/{customerId}/web_sdk_link`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_GetWebSDKLink>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                  | Required | Example                       |
| ---------------- | -------- | -------------------------------------------- | -------- | ----------------------------- |
| **`customerId`** | `string` | **Customer ID** for compliance verification. | Yes      | `"DCalXLc-KRLb-ICUZ4pnjWNvo"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a temporary compliance link with its expiration time.

#### **Response Fields**

| Field              | Type      | Description                                                         | Example                                          |
| ------------------ | --------- | ------------------------------------------------------------------- | ------------------------------------------------ |
| **`ttlInSeconds`** | `integer` | **Time-to-live** (seconds until link expires).                      | `3600` (60 minutes)                              |
| **`url`**          | `string`  | **Temporary compliance URL** for customer to complete verification. | `"https://compliance.example.com/sdk/abc123xyz"` |

**Example Response:**

json

```
{
  "ttlInSeconds": 900,
  "url": "https://compliance.example.com/sdk/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
```

***

### **Examples**

#### **Request**

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/compliance/DCalXLc-KRLb-ICUZ4pnjWNvo/web_sdk_link' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Response**&#x20;

```
{
  "ttlInSeconds": 3600,
  "url": "https://in.sumsub.com/websdk/p/sbx_HNwutCtvO7FI5Xtc"
}
```

***

### **Error Responses**

**Customer Not Found**:

```
{ "error": "Customer not found: DCalXLc-NRLb-ICUZ4pnjWNvo" }
```

**Authorization fail**

```
{ "error": "Unauthorized" }
```

***

### **Compliance Link Usage**

The generated URL typically provides access to a hosted compliance form where customers can:

* **Upload Identity Documents** (passport, driver's license, etc.)
* **Enter Personal Information** (address, date of birth, etc.)
* **Complete Questionnaire** (source of funds, beneficial ownership, etc.)
* **Submit Proof of Address** (utility bills, bank statements, etc.)
* **Verify Business Details** (for corporate accounts)

***

### **Notes**

* **Single-Use**: Links are typically designed for single use and expire after the TTL period
* **Session Management**: Opening the link starts a compliance verification session
* **Status Tracking**: Compliance status can be monitored via customer status
* **Security**: The URL contains encrypted tokens; do not share it publicly
* **Reusability**: Generate a new link if the previous one expires

**Typical Workflow**:

1. Customer requests compliance verification
2. System generates a temporary compliance link
3. Customer clicks link → Completes compliance form
4. System processes submitted information
5. Customer status updates (e.g., `MODERATED` → `ACCEPTED`)


# Get Customer Application

Retrieves comprehensive customer application information including personal/business details, investment profiles, KYC data, and associated documents.

Returns either individual or corporate application data based on the customer type.

**Endpoint**

`GET/v2/customer/{customerId}/application`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_GetApplication>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                  | Required | Example        |
| ---------------- | -------- | -------------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** to retrieve application for. | Yes      | `"cust_12345"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns either individual or corporate application data with comprehensive customer information.

#### **Response Structure**

The response contains either `individual` or `corporate` object based on customer type.

***

### **Individual Application Response**

#### **Individual Application Fields**

**1. Basic Information**

| Field                    | Type     | Description             | Example                  |
| ------------------------ | -------- | ----------------------- | ------------------------ |
| **`firstName`**          | `string` | Customer's first name.  | `"John"`                 |
| **`middleName`**         | `string` | Customer's middle name. | `"Michael"`              |
| **`lastName`**           | `string` | Customer's last name.   | `"Doe"`                  |
| **`emailAddress`**       | `string` | Contact email address.  | `"john.doe@example.com"` |
| **`telephoneNumber`**    | `string` | Contact phone number.   | `"+1234567890"`          |
| **`taxReferenceNumber`** | `string` | Tax ID/SSN number.      | `"123-45-6789"`          |
| **`passportNumber`**     | `string` | Passport number.        | `"A12345678"`            |
| **`nationality`**        | `string` | Nationality/country.    | `"US"`                   |
| **`dateOfBirth`**        | `string` | Date of birth.          | `"1985-05-15T00:00:00Z"` |

**2. Mailing Address**

| Field              | Type     | Description            | Example             |
| ------------------ | -------- | ---------------------- | ------------------- |
| **`unitNumber`**   | `string` | Unit/apartment number. | `"5A"`              |
| **`addressLine1`** | `string` | Primary address.       | `"123 Main Street"` |
| **`addressLine2`** | `string` | Secondary address.     | `"Suite 500"`       |
| **`city`**         | `string` | City.                  | `"New York"`        |
| **`stateIso`**     | `string` | State code.            | `"NY"`              |
| **`postalCode`**   | `string` | Postal code.           | `"10001"`           |
| **`countryIso`**   | `string` | Country code.          | `"US"`              |

**3. Employment Information**

| Field                       | Type     | Description           | Allowed Values                                                                    | Example                 |
| --------------------------- | -------- | --------------------- | --------------------------------------------------------------------------------- | ----------------------- |
| **`usResidencyStatus`**     | `string` | US residency status.  | `RES_US_CITIZEN`, `RES_RESIDENT_ALIEN`, `RES_NON_RESIDENT_ALIEN`                  | `"RES_US_CITIZEN"`      |
| **`employmentStatus`**      | `string` | Employment status.    | `EMP_EMPLOYEE`, `EMP_SELF_EMPLOYED`, `EMP_RETIRED`, `EMP_UNEMPLOYED`, `EMP_OTHER` | `"EMP_EMPLOYEE"`        |
| **`employmentDescription`** | `string` | Employment details.   | -                                                                                 | `"Software Engineer"`   |
| **`employerName`**          | `string` | Employer name.        | -                                                                                 | `"Tech Solutions Inc."` |
| **`occupation`**            | `string` | Job title/occupation. | -                                                                                 | `"Senior Developer"`    |

**4. Investment Profile**

| Field                          | Type     | Description                | Allowed Values                                          | Example                   |
| ------------------------------ | -------- | -------------------------- | ------------------------------------------------------- | ------------------------- |
| **`primarySourceOfFunds`**     | `string` | Main income source.        | `SFD_EMPLOYMENT`, `SFD_SAVINGS`, `SFD_INVESTMENT`, etc. | `"SFD_EMPLOYMENT"`        |
| **`totalAssets`**              | `string` | Total asset value.         | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`                  | `"VLM_ONEHUNDREDK_TO_1M"` |
| **`usdValueOfFiat`**           | `string` | Fiat currency value.       | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`                  | `"VLM_TEN_TO_100K"`       |
| **`usdValueOfCrypto`**         | `string` | Crypto asset value.        | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`                  | `"VLM_UPTO_10K"`          |
| **`monthlyDeposits`**          | `string` | Monthly deposit count.     | `CLM_UPTO_5` to `CLM_MORE_THAN_25`                      | `"CLM_UPTO_5"`            |
| **`monthlyInvestmentDeposit`** | `string` | Investment deposit amount. | `ILM_UPTO_1K` to `ILM_MORE_THAN_5M`                     | `"ILM_ONE_TO_100K"`       |

**5. KYC Profile**

| Field                               | Type    | Description                   | Example                                   |
| ----------------------------------- | ------- | ----------------------------- | ----------------------------------------- |
| **`fundsSendReceiveJurisdictions`** | `array` | Countries for fund transfers. | `["US", "GB", "DE"]`                      |
| **`engageInActivities`**            | `array` | Business activities.          | `["ACT_NONE"]`                            |
| **`vendorsAndCounterparties`**      | `array` | Business relationships.       | `["VND_SELF", "VND_MERCHANTS_SUPPLIERS"]` |

**6. Documents Array**

Array of uploaded documents with metadata and verification status.

**Example Individual Response:**

json

```
{
  "individual": {
    "application": {
      "firstName": "John",
      "middleName": "Michael",
      "lastName": "Doe",
      "emailAddress": "john.doe@example.com",
      "mailingAddress": {
        "unitNumber": "5A",
        "addressLine1": "123 Main Street",
        "addressLine2": "Suite 500",
        "city": "New York",
        "stateIso": "NY",
        "postalCode": "10001",
        "countryIso": "US"
      },
      "telephoneNumber": "+1234567890",
      "taxReferenceNumber": "123-45-6789",
      "passportNumber": "A12345678",
      "nationality": "US",
      "dateOfBirth": "1985-05-15T00:00:00Z",
      "usResidencyStatus": "RES_US_CITIZEN",
      "employmentStatus": "EMP_EMPLOYEE",
      "employmentDescription": "Software Engineer",
      "employerName": "Tech Solutions Inc.",
      "occupation": "Senior Developer",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_EMPLOYMENT",
        "primarySourceOfFundsDescription": "Salary and bonuses",
        "totalAssets": "VLM_ONEHUNDREDK_TO_1M",
        "usdValueOfFiat": "VLM_TEN_TO_100K",
        "monthlyDeposits": "CLM_UPTO_5",
        "monthlyWithdrawals": "CLM_UPTO_5",
        "monthlyInvestmentDeposit": "ILM_ONE_TO_100K",
        "monthlyInvestmentWithdrawal": "ILM_UPTO_1K",
        "usdValueOfCrypto": "VLM_UPTO_10K",
        "monthlyCryptoDeposits": "CLM_UPTO_5",
        "monthlyCryptoWithdrawals": "CLM_UPTO_5",
        "monthlyCryptoInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyCryptoInvestmentWithdrawal": "ILM_UPTO_1K"
      },
      "kycProfile": {
        "fundsSendReceiveJurisdictions": ["US", "GB"],
        "engageInActivities": ["ACT_NONE"],
        "numberOfOperation": "CLM_UPTO_5",
        "aggregateUsdVolume1stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume3stMonth": "VLM_TEN_TO_100K",
        "aggregateUsdVolume6stMonth": "VLM_ONEHUNDREDK_TO_1M",
        "regulatedNoLicenseExplain": "",
        "requireClientAccount": false,
        "vendorsAndCounterparties": ["VND_SELF", "VND_MERCHANTS_SUPPLIERS"]
      },
      "guid": "app_12345",
      "documents": [
        {
          "id": "doc_pass123",
          "customerId": "cust_12345",
          "fileName": "passport.pdf",
          "size": 2048576,
          "mime": "application/pdf",
          "docType": "PASSPORT",
          "info": "US passport",
          "isLock": true,
          "createAt": "2024-05-15T10:30:00Z",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": true
    }
  }
}
```

***

### **Corporate Application Response**

#### **Corporate Application Fields**

**1. Company Information**

| Field                        | Type     | Description               | Example                        |
| ---------------------------- | -------- | ------------------------- | ------------------------------ |
| **`registeredName`**         | `string` | Legal company name.       | `"Tech Solutions Corporation"` |
| **`tradingName`**            | `string` | Trading/business name.    | `"Tech Solutions"`             |
| **`registeredNumber`**       | `string` | Registration number.      | `"123456789"`                  |
| **`emailAddress`**           | `string` | Company email.            | `"admin@techsolutions.com"`    |
| **`websiteAddress`**         | `string` | Company website.          | `"https://techsolutions.com"`  |
| **`stateOfIncorporation`**   | `string` | State of incorporation.   | `"Delaware"`                   |
| **`countryOfIncorporation`** | `string` | Country of incorporation. | `"US"`                         |
| **`establishedOn`**          | `string` | Incorporation date.       | `"2020-01-15T00:00:00Z"`       |

**2. Corporate Entity Type**

| Field                     | Type     | Description           | Allowed Values                                      | Example                                  |
| ------------------------- | -------- | --------------------- | --------------------------------------------------- | ---------------------------------------- |
| **`corporateEntityType`** | `string` | Business structure.   | `ETT_C_CORP_PRIVATE`, `ETT_LLC`, `ETT_S_CORP`, etc. | `"ETT_C_CORP_PRIVATE"`                   |
| **`naics`**               | `string` | Industry code.        | -                                                   | `"541511"`                               |
| **`naicsDescription`**    | `string` | Industry description. | -                                                   | `"Custom Computer Programming Services"` |

**3. Registered & Physical Address**

Same structure as individual mailing address for both registered and physical locations.

**4. Corporate Investment Profile**

| Field                            | Type     | Description               | Allowed Values                                  | Example                   |
| -------------------------------- | -------- | ------------------------- | ----------------------------------------------- | ------------------------- |
| **`totalAssets`**                | `string` | Company total assets.     | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`          | `"VLM_ONE_TO_10M"`        |
| **`totalInvestableAssets`**      | `string` | Liquid/investable assets. | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`          | `"VLM_ONEHUNDREDK_TO_1M"` |
| **`assetAllocationToCrypto`**    | `string` | Crypto allocation.        | `VLM_UPTO_10K` to `VLM_MORE_THAN_250M`          | `"VLM_UPTO_10K"`          |
| **`investmentExperienceCrypto`** | `string` | Crypto experience level.  | `INE_LITTLE`, `INE_MODERATE`, `INE_SIGNIFICANT` | `"INE_MODERATE"`          |
| **`tradesPerMonth`**             | `string` | Monthly trade volume.     | `TRL_UPTO_20` to `TRL_MORE_THAN_400`            | `"TRL_UPTO_20"`           |

**5. Corporate KYC Profile**

| Field                       | Type     | Description             | Allowed Values                                       | Example              |
| --------------------------- | -------- | ----------------------- | ---------------------------------------------------- | -------------------- |
| **`primaryBusiness`**       | `string` | Main business activity. | `BSN_SOFTWARE`, `BSN_FINANCIAL`, `BSN_TRADING`, etc. | `"BSN_SOFTWARE"`     |
| **`regulatedStatus`**       | `string` | Regulatory status.      | `RGS_REGULATED`, `RGS_LICENSED`, `RGS_NONE`          | `"RGS_NONE"`         |
| **`businessJurisdictions`** | `array`  | Operating countries.    | -                                                    | `["US", "CA", "GB"]` |

**6. Individuals Array**

Array of company representatives, officers, and beneficial owners.

**Example Corporate Response:**

json

```
{
  "corporate": {
    "application": {
      "registeredName": "Tech Solutions Corporation",
      "tradingName": "Tech Solutions",
      "registeredNumber": "123456789",
      "registeredAddress": {
        "addressLine1": "456 Corporate Avenue",
        "city": "Wilmington",
        "stateIso": "DE",
        "postalCode": "19801",
        "countryIso": "US"
      },
      "physicalAddress": {
        "addressLine1": "123 Business Plaza",
        "city": "San Francisco",
        "stateIso": "CA",
        "postalCode": "94105",
        "countryIso": "US"
      },
      "telephoneNumber": "+16505551234",
      "websiteAddress": "https://techsolutions.com",
      "stateOfIncorporation": "Delaware",
      "countryOfIncorporation": "US",
      "corporateEntityType": "ETT_C_CORP_PRIVATE",
      "emailAddress": "admin@techsolutions.com",
      "establishedOn": "2020-01-15T00:00:00Z",
      "naics": "541511",
      "naicsDescription": "Custom Computer Programming Services",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_COMPANY",
        "totalInvestableAssets": "VLM_ONEHUNDREDK_TO_1M",
        "totalAssets": "VLM_ONE_TO_10M",
        "assetAllocationToCrypto": "VLM_UPTO_10K",
        "investmentExperienceCrypto": "INE_MODERATE",
        "investmentStrategyCrypto": "INS_MEDIUM_RISK",
        "initialDepositSource": "DEP_WIRE",
        "frequencyOfCryptoTransactions": "FRQ_MONTHLY",
        "cryptoInvestmentPlans": "INP_CUSTODY",
        "tradesPerMonth": "TRL_UPTO_20",
        "usdValueOfCrypto": "VLM_UPTO_10K",
        "frequencyOfTransactions": "FRQ_MONTHLY",
        "monthlyInvestmentDeposit": "ILM_ONE_TO_100K",
        "monthlyDeposits": "CLM_UPTO_5",
        "tradeInternationally": true,
        "tradeJurisdictions": ["US", "GB", "SG"],
        "usdValueOfFiat": "VLM_ONEHUNDREDK_TO_1M"
      },
      "kycProfile": {
        "primaryBusiness": "BSN_SOFTWARE",
        "descriptionOfBusinessNature": "Enterprise software development and consulting",
        "isCharitable": false,
        "businessJurisdictions": ["US", "CA", "GB"],
        "fundsSendReceiveJurisdictions": ["US", "GB", "EU"],
        "newYorkOffice": false,
        "engageInActivities": ["ACT_NONE"],
        "regulatedStatus": "RGS_NONE",
        "numberOfOperation": "CLM_UPTO_5",
        "aggregateUsdVolume1stMonth": "VLM_UPTO_10K",
        "requireClientAccount": false,
        "vendorsAndCounterparties": ["VND_SELF", "VND_MERCHANTS_SUPPLIERS", "VND_EMPLOYEES"]
      },
      "taxReferenceNumber": "98-7654321",
      "documents": [
        {
          "id": "doc_incorp123",
          "customerId": "cust_biz999",
          "fileName": "articles_of_incorporation.pdf",
          "size": 5120480,
          "mime": "application/pdf",
          "docType": "ARTICLES_OF_INCORPORATION",
          "info": "Delaware incorporation documents",
          "isLock": true,
          "createAt": "2024-04-15T08:45:00Z",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": true
    },
    "individuals": [
      {
        "individualType": ["IND_OFFICER", "IND_BENEFICIAL_OWNER"],
        "firstName": "Sarah",
        "lastName": "Wilson",
        "emailAddress": "sarah.wilson@techsolutions.com",
        "mailingAddress": {
          "addressLine1": "789 Executive Lane",
          "city": "San Francisco",
          "stateIso": "CA",
          "postalCode": "94108",
          "countryIso": "US"
        },
        "telephoneNumber": "+16505556789",
        "taxReferenceNumber": "123-45-6789",
        "dateOfBirth": "1980-08-20T00:00:00Z",
        "percentageOwnership": 60,
        "title": "CEO",
        "usResidencyStatus": "RES_US_CITIZEN",
        "documents": [
          {
            "id": "doc_sarah_id",
            "fileName": "sarah_passport.pdf",
            "docType": "PASSPORT",
            "status": "DST_APPROVED"
          }
        ]
      }
    ]
  }
}
```

***

### **Field Value Details**

#### **Employment Status Values**

* **`EMP_EMPLOYEE`**: Employed by another organization
* **`EMP_SELF_EMPLOYED`**: Self-employed/contractor
* **`EMP_RETIRED`**: Retired from employment
* **`EMP_UNEMPLOYED`**: Currently unemployed
* **`EMP_OTHER`**: Other employment situation

#### **Asset Value Ranges**

* **`VLM_UPTO_10K`**: Up to $10,000
* **`VLM_TEN_TO_100K`**: $10,000 - $100,000
* **`VLM_ONEHUNDREDK_TO_1M`**: $100,000 - $1,000,000
* **`VLM_ONE_TO_10M`**: $1,000,000 - $10,000,000
* **`VLM_TEN_TO_50M`**: $10,000,000 - $50,000,000
* **`VLM_FIFTY_TO_250M`**: $50,000,000 - $250,000,000
* **`VLM_MORE_THAN_250M`**: Over $250,000,000

#### **Transaction Frequency**

* **`FRQ_DAILY`**: Daily transactions
* **`FRQ_WEEKLY`**: Weekly transactions
* **`FRQ_MONTHLY`**: Monthly transactions
* **`FRQ_QUARTERLY`**: Quarterly transactions

#### **Business Types**

* **`BSN_SOFTWARE`**: Software/technology company
* **`BSN_FINANCIAL`**: Financial services
* **`BSN_TRADING`**: Trading/investment firm
* **`BSN_CONSULTING`**: Professional services

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/application' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **High Net Worth Individual Example**

**Response:**

json

```
{
  "individual": {
    "application": {
      "firstName": "Robert",
      "lastName": "Chen",
      "emailAddress": "robert.chen@example.com",
      "mailingAddress": {
        "addressLine1": "1 Billionaire Row",
        "city": "Beverly Hills",
        "stateIso": "CA",
        "postalCode": "90210",
        "countryIso": "US"
      },
      "telephoneNumber": "+13105551234",
      "taxReferenceNumber": "987-65-4321",
      "nationality": "US",
      "dateOfBirth": "1975-12-10T00:00:00Z",
      "usResidencyStatus": "RES_US_CITIZEN",
      "employmentStatus": "EMP_SELF_EMPLOYED",
      "employmentDescription": "Technology entrepreneur and investor",
      "occupation": "CEO and Investor",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_INVESTMENT",
        "totalAssets": "VLM_MORE_THAN_250M",
        "usdValueOfFiat": "VLM_TEN_TO_50M",
        "usdValueOfCrypto": "VLM_ONE_TO_10M",
        "monthlyInvestmentDeposit": "ILM_MORE_THAN_5M",
        "monthlyCryptoInvestmentDeposit": "ILM_ONEHUNDREDK_TO_1M"
      },
      "kycProfile": {
        "fundsSendReceiveJurisdictions": ["US", "CH", "SG", "GB"],
        "engageInActivities": ["ACT_NONE"],
        "vendorsAndCounterparties": ["VND_SELF", "VND_INVESTMENT"]
      },
      "documents": [
        {
          "id": "doc_robert_pass",
          "docType": "PASSPORT",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": true
    }
  }
}
```

***

### **Error Responses**

1. **Customer Not Found**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **Application Not Found**:

   json

   ```
   { "error": "Application not found for customer" }
   ```
3. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Customer Type**: Response contains either `individual` or `corporate` object, not both
* **Document Status**: All associated documents include current verification status
* **Compliance**: Application data is used for KYC/AML regulatory compliance
* **Sensitive Data**: Personal identification numbers are masked/encrypted
* **Verification**: Application status reflects current compliance verification state

**Common Use Cases**:

* Customer onboarding status verification
* Compliance and regulatory reporting
* Risk assessment and profiling
* Document verification tracking
* Customer relationship management


# Set Customer Application (deprecated)

Submits a comprehensive customer application for either individual or corporate entities. This endpoint handles KYC (Know Your Customer), AML (Anti-Money Laundering), and investment profile data collection for customer onboarding and compliance purposes.

**Endpoint**

`POST/v2/customer/{customerId}/application`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_SetApplication>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                | Required | Example        |
| ---------------- | -------- | ------------------------------------------ | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** to submit application for. | Yes      | `"cust_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Body Parameters**

**Important**: Use either `individual` OR `corporate` object, not both.

***

### **Individual Application Structure**

#### **Individual Application Object**

| Field             | Type     | Description           | Required |
| ----------------- | -------- | --------------------- | -------- |
| **`application`** | `object` | Main application data | Yes      |

**Application Basic Information**

| Field                       | Type     | Description                | Required |
| --------------------------- | -------- | -------------------------- | -------- |
| **`firstName`**             | `string` | Customer's first name      | Yes      |
| **`middleName`**            | `string` | Customer's middle name     | No       |
| **`lastName`**              | `string` | Customer's last name       | Yes      |
| **`emailAddress`**          | `string` | Contact email address      | Yes      |
| **`mailingAddress`**        | `object` | Mailing address details    | Yes      |
| **`telephoneNumber`**       | `string` | Contact phone number       | Yes      |
| **`taxReferenceNumber`**    | `string` | Tax ID/SSN                 | Yes      |
| **`passportNumber`**        | `string` | Passport number            | Yes      |
| **`nationality`**           | `string` | Nationality/citizenship    | Yes      |
| **`dateOfBirth`**           | `string` | Date of birth (ISO format) | Yes      |
| **`usResidencyStatus`**     | `string` | US residency status        | Yes      |
| **`employmentStatus`**      | `string` | Current employment status  | Yes      |
| **`employmentDescription`** | `string` | Employment details         | No       |
| **`employerName`**          | `string` | Employer name              | No       |
| **`occupation`**            | `string` | Job title/occupation       | Yes      |

**Address Object**

| Field              | Type     | Description            | Required |
| ------------------ | -------- | ---------------------- | -------- |
| **`unitNumber`**   | `string` | Unit/Apartment number  | No       |
| **`addressLine1`** | `string` | Primary address line   | Yes      |
| **`addressLine2`** | `string` | Secondary address line | No       |
| **`addressLine3`** | `string` | Tertiary address line  | No       |
| **`city`**         | `string` | City                   | Yes      |
| **`stateIso`**     | `string` | State/Province code    | Yes      |
| **`postalCode`**   | `string` | ZIP/Postal code        | Yes      |
| **`countryIso`**   | `string` | Country code           | Yes      |

**Investment Profile**

| Field                                   | Type     | Description                   | Required |
| --------------------------------------- | -------- | ----------------------------- | -------- |
| **`primarySourceOfFunds`**              | `string` | Main funding source           | Yes      |
| **`primarySourceOfFundsDescription`**   | `string` | Funding source details        | No       |
| **`totalAssets`**                       | `string` | Total asset value range       | Yes      |
| **`usdValueOfFiat`**                    | `string` | Fiat currency holdings        | Yes      |
| **`monthlyDeposits`**                   | `string` | Monthly deposit frequency     | Yes      |
| **`monthlyWithdrawals`**                | `string` | Monthly withdrawal frequency  | Yes      |
| **`monthlyInvestmentDeposit`**          | `string` | Investment deposit amount     | Yes      |
| **`monthlyInvestmentWithdrawal`**       | `string` | Investment withdrawal amount  | Yes      |
| **`usdValueOfCrypto`**                  | `string` | Crypto holdings value         | Yes      |
| **`monthlyCryptoDeposits`**             | `string` | Crypto deposit frequency      | Yes      |
| **`monthlyCryptoWithdrawals`**          | `string` | Crypto withdrawal frequency   | Yes      |
| **`monthlyCryptoInvestmentDeposit`**    | `string` | Crypto investment deposits    | Yes      |
| **`monthlyCryptoInvestmentWithdrawal`** | `string` | Crypto investment withdrawals | Yes      |

**KYC Profile**

| Field                               | Type            | Description                  | Required |
| ----------------------------------- | --------------- | ---------------------------- | -------- |
| **`fundsSendReceiveJurisdictions`** | `array[string]` | Countries for fund transfers | Yes      |
| **`engageInActivities`**            | `array[string]` | Business activities          | Yes      |
| **`numberOfOperation`**             | `string`        | Monthly transaction count    | Yes      |
| **`aggregateUsdVolume1stMonth`**    | `string`        | Expected 1st month volume    | Yes      |
| **`aggregateUsdVolume3stMonth`**    | `string`        | Expected 3rd month volume    | Yes      |
| **`aggregateUsdVolume6stMonth`**    | `string`        | Expected 6th month volume    | Yes      |
| **`regulatedNoLicenseExplain`**     | `string`        | Regulatory explanation       | No       |
| **`requireClientAccount`**          | `boolean`       | Client account requirement   | Yes      |
| **`vendorsAndCounterparties`**      | `array[string]` | Business counterparty types  | Yes      |

**Documents**

| Field                     | Type            | Description              | Required |
| ------------------------- | --------------- | ------------------------ | -------- |
| **`documents`**           | `array[object]` | Supporting documents     | Yes      |
| **`informationAttested`** | `boolean`       | Information verification | Yes      |
| **`guid`**                | `string`        | Application GUID         | Yes      |

***

### **Corporate Application Structure**

#### **Corporate Application Object**

| Field             | Type            | Description                | Required |
| ----------------- | --------------- | -------------------------- | -------- |
| **`application`** | `object`        | Main corporate application | Yes      |
| **`individuals`** | `array[object]` | Company representatives    | Yes      |

**Corporate Basic Information**

| Field                                | Type     | Description                 | Required |
| ------------------------------------ | -------- | --------------------------- | -------- |
| **`registeredName`**                 | `string` | Legal company name          | Yes      |
| **`tradingName`**                    | `string` | Trading/business name       | Yes      |
| **`registeredNumber`**               | `string` | Company registration number | Yes      |
| **`registeredAddress`**              | `object` | Legal registered address    | Yes      |
| **`physicalAddress`**                | `object` | Physical business address   | Yes      |
| **`telephoneNumber`**                | `string` | Business phone number       | Yes      |
| **`websiteAddress`**                 | `string` | Company website             | No       |
| **`stateOfIncorporation`**           | `string` | State of incorporation      | Yes      |
| **`countryOfIncorporation`**         | `string` | Country of incorporation    | Yes      |
| **`corporateEntityType`**            | `string` | Business entity type        | Yes      |
| **`corporateEntityTypeDescription`** | `string` | Entity type details         | No       |
| **`emailAddress`**                   | `string` | Business email              | Yes      |
| **`establishedOn`**                  | `string` | Incorporation date          | Yes      |
| **`naics`**                          | `string` | NAICS code                  | Yes      |
| **`naicsDescription`**               | `string` | Business description        | Yes      |
| **`taxReferenceNumber`**             | `string` | Business tax ID             | Yes      |
| **`legalStructureDescription`**      | `string` | Legal structure details     | No       |

**Corporate Investment Profile**

| Field                               | Type      | Description                  | Required |
| ----------------------------------- | --------- | ---------------------------- | -------- |
| **`primarySourceOfFunds`**          | `string`  | Main funding source          | Yes      |
| **`totalInvestableAssets`**         | `string`  | Investable assets range      | Yes      |
| **`totalAssets`**                   | `string`  | Total company assets         | Yes      |
| **`assetAllocationToCrypto`**       | `string`  | Crypto allocation            | Yes      |
| **`investmentExperienceCrypto`**    | `string`  | Crypto experience level      | Yes      |
| **`investmentStrategyCrypto`**      | `string`  | Investment strategy          | Yes      |
| **`initialDepositSource`**          | `string`  | Initial deposit method       | Yes      |
| **`ongoingDepositSource`**          | `string`  | Ongoing deposit method       | Yes      |
| **`frequencyOfCryptoTransactions`** | `string`  | Crypto transaction frequency | Yes      |
| **`cryptoInvestmentPlans`**         | `string`  | Crypto investment plans      | Yes      |
| **`tradesPerMonth`**                | `string`  | Monthly trade volume         | Yes      |
| **`tradeInternationally`**          | `boolean` | International trading        | Yes      |

**Corporate KYC Profile**

| Field                             | Type            | Description               | Required |
| --------------------------------- | --------------- | ------------------------- | -------- |
| **`primaryBusiness`**             | `string`        | Primary business activity | Yes      |
| **`descriptionOfBusinessNature`** | `string`        | Business description      | Yes      |
| **`isCharitable`**                | `boolean`       | Charitable organization   | Yes      |
| **`businessJurisdictions`**       | `array[string]` | Operating jurisdictions   | Yes      |
| **`regulatedStatus`**             | `string`        | Regulatory status         | Yes      |
| **`regulationAgency`**            | `string`        | Regulatory body           | No       |
| **`controlExemptionReason`**      | `string`        | Control exemption reason  | Yes      |

**Corporate Individuals**

| Field                           | Type            | Description                       | Required |
| ------------------------------- | --------------- | --------------------------------- | -------- |
| **`individualType`**            | `array[string]` | Role types (Officer, Owner, etc.) | Yes      |
| **`firstName`**, **`lastName`** | `string`        | Personal details                  | Yes      |
| **`percentageOwnership`**       | `integer`       | Ownership percentage              | Yes      |
| **`title`**                     | `string`        | Job title                         | Yes      |
| **`documents`**                 | `array[object]` | Personal documents                | Yes      |

### **Error Responses**

1. **Invalid Customer ID**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **Missing Required Fields**:

   json

   ```
   { "error": "Missing required field: firstName" }
   ```
3. **Both Individual and Corporate Provided**:

   json

   ```
   { "error": "Provide either individual or corporate application, not both" }
   ```
4. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Oneof Requirement**: Submit either individual OR corporate application, never both
* **Document Status**: Documents can have statuses: `DST_SUBMITTED`, `DST_APPROVED`, `DST_REJECTED`, etc.
* **Compliance**: All fields are used for regulatory compliance and KYC/AML purposes
* **Validation**: Extensive validation is performed on all submitted data
* **Audit Trail**: All applications are logged for compliance auditing

**Common Use Cases**:

* New customer onboarding
* KYC/AML compliance
* Investment suitability assessment
* Regulatory reporting
* Risk management

**Security Considerations**:

* Sensitive personal and financial information
* Strict access controls
* Data encryption in transit and at rest
* Compliance with privacy regulations

### Examples

\
**Real request**

json

```
{
  "individual": {
    "application": {
      "firstName": "Test",
      "middleName": "string",
      "lastName": "Api",
      "emailAddress": "string",
      "mailingAddress": {
        "unitNumber": "string",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "city": "Tulsa",
        "stateIso": "TX",
        "postalCode": "string",
        "countryIso": "US"
      },
      "telephoneNumber": "string",
      "taxReferenceNumber": "string",
      "passportNumber": "string",
      "nationality": "string",
      "dateOfBirth": "2019-08-24T14:15:22Z",
      "usResidencyStatus": "RES_US_CITIZEN",
      "employmentStatus": "EMP_EMPLOYEE",
      "employmentDescription": "string",
      "employerName": "string",
      "occupation": "string",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_EMPLOYMENT",
        "primarySourceOfFundsDescription": "string",
        "totalAssets": "VLM_UPTO_10K",
        "usdValueOfFiat": "VLM_UPTO_10K",
        "monthlyDeposits": "CLM_UPTO_5",
        "monthlyWithdrawals": "CLM_UPTO_5",
        "monthlyInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyInvestmentWithdrawal": "ILM_UPTO_1K",
        "usdValueOfCrypto": "VLM_UPTO_10K",
        "monthlyCryptoDeposits": "CLM_UPTO_5",
        "monthlyCryptoWithdrawals": "CLM_UPTO_5",
        "monthlyCryptoInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyCryptoInvestmentWithdrawal": "ILM_UPTO_1K"
      },
      "kycProfile": {
        "fundsSendReceiveJurisdictions": [
          "string"
        ],
        "engageInActivities": [
          "ACT_NONE"
        ],
        "numberOfOperation": "CLM_UPTO_5",
        "aggregateUsdVolume1stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume3stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume6stMonth": "VLM_UPTO_10K",
        "regulatedNoLicenseExplain": "string",
        "requireClientAccount": true,
        "vendorsAndCounterparties": [
          "VND_SELF"
        ]
      },
      "guid": "string",
      "documents": [
        {
          "id": "string",
          "customerId": "string",
          "fileName": "string",
          "size": 0,
          "mime": "string",
          "docType": "UNSET",
          "info": "string",
          "isLock": true,
          "createAt": "2019-08-24T14:15:22Z",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": true
    }
  },
  "corporate": {
    "application": {
      "registeredName": "string",
      "tradingName": "string",
      "registeredNumber": "string",
      "registeredAddress": {
        "unitNumber": "string",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "city": "string",
        "stateIso": "string",
        "postalCode": "string",
        "countryIso": "string"
      },
      "physicalAddress": {
        "unitNumber": "string",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "city": "string",
        "stateIso": "string",
        "postalCode": "string",
        "countryIso": "string"
      },
      "telephoneNumber": "string",
      "websiteAddress": "string",
      "stateOfIncorporation": "string",
      "countryOfIncorporation": "string",
      "corporateEntityType": "ETT_C_CORP_PRIVATE",
      "corporateEntityTypeDescription": "string",
      "emailAddress": "string",
      "establishedOn": "2019-08-24T14:15:22Z",
      "naics": "string",
      "naicsDescription": "string",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_EMPLOYMENT",
        "totalInvestableAssets": "VLM_UPTO_10K",
        "totalAssets": "VLM_UPTO_10K",
        "assetAllocationToCrypto": "VLM_UPTO_10K",
        "investmentExperienceCrypto": "INE_LITTLE",
        "investmentStrategyCrypto": "INS_LOW_RISK",
        "initialDepositSource": "DEP_DEPOSIT",
        "initialDepositSourceCryptoDetails": "string",
        "initialDepositSourceFiatDetails": "string",
        "ongoingDepositSource": "DEP_DEPOSIT",
        "frequencyOfCryptoTransactions": "FRQ_DAILY",
        "cryptoInvestmentPlans": "INP_CUSTODY",
        "investmentProceedsUse": "string",
        "expectedCryptoAssets": "string",
        "performTransfersWithUnhostedWallets": true,
        "knownUnhostedWalletAddresses": "string",
        "tradesPerMonth": "TRL_UPTO_20",
        "usdValueOfCrypto": "VLM_UPTO_10K",
        "frequencyOfTransactions": "FRQ_DAILY",
        "monthlyCryptoInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyCryptoDeposits": "CLM_UPTO_5",
        "monthlyDeposits": "CLM_UPTO_5",
        "monthlyCryptoInvestmentWithdrawal": "ILM_UPTO_1K",
        "monthlyInvestmentWithdrawal": "ILM_UPTO_1K",
        "monthlyCryptoWithdrawals": "CLM_UPTO_5",
        "monthlyWithdrawals": "CLM_UPTO_5",
        "tradeInternationally": true,
        "tradeJurisdictions": [
          "string"
        ],
        "primarySourceOfFundsDescription": "string",
        "usdValueOfFiat": "VLM_UPTO_10K"
      },
      "kycProfile": {
        "primaryBusiness": "BSN_SOFTWARE",
        "descriptionOfBusinessNature": "string",
        "isCharitable": true,
        "businessJurisdictions": [
          "string"
        ],
        "fundsSendReceiveJurisdictions": [
          "string"
        ],
        "newYorkOffice": true,
        "engageInActivities": [
          "ACT_NONE"
        ],
        "regulatedStatus": "RGS_REGULATED",
        "regulationAgency": "string",
        "regulationAgencyRegulationNumber": "string",
        "controlExemptionReason": "CRL_REGULATED",
        "numberOfOperation": "CLM_UPTO_5",
        "aggregateUsdVolume1stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume3stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume6stMonth": "VLM_UPTO_10K",
        "regulatedNoLicenseExplain": "string",
        "requireClientAccount": true,
        "vendorsAndCounterparties": [
          "VND_SELF"
        ]
      },
      "guid": "string",
      "taxReferenceNumber": "string",
      "reasons": {
        "bankStatementMissing": "string"
      },
      "documents": [
        {
          "id": "string",
          "customerId": "string",
          "fileName": "string",
          "size": 0,
          "mime": "string",
          "docType": "UNSET",
          "info": "string",
          "isLock": true,
          "createAt": "2019-08-24T14:15:22Z",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": true,
      "legalStructureDescription": "string"
    },
    "individuals": [
      {
        "individualType": [
          "IND_INDIVIDUAL"
        ],
        "firstName": "string",
        "middleName": "string",
        "lastName": "string",
        "emailAddress": "string",
        "mailingAddress": {
          "unitNumber": "string",
          "addressLine1": "string",
          "addressLine2": "string",
          "addressLine3": "string",
          "city": "string",
          "stateIso": "string",
          "postalCode": "string",
          "countryIso": "string"
        },
        "telephoneNumber": "string",
        "taxReferenceNumber": "string",
        "passportNumber": "string",
        "nationality": "string",
        "dateOfBirth": "2019-08-24T14:15:22Z",
        "percentageOwnership": 0,
        "title": "string",
        "usResidencyStatus": "RES_US_CITIZEN",
        "guid": "string",
        "documents": [
          {
            "id": "string",
            "customerId": "string",
            "fileName": "string",
            "size": 0,
            "mime": "string",
            "docType": "UNSET",
            "info": "string",
            "isLock": true,
            "createAt": "2019-08-24T14:15:22Z",
            "status": "DST_APPROVED"
          }
        ]
      }
    ]
  }
}
```

**Real respose**

json

```
{
  "corporate": {
    "application": {
      "registeredName": "Demo",
      "tradingName": "Demo",
      "registeredNumber": "123123",
      "registeredAddress": {
        "unitNumber": "string",
        "addressLine1": "Address",
        "addressLine2": "Address2",
        "addressLine3": "string",
        "city": "New York",
        "stateIso": "NY",
        "postalCode": "1111",
        "countryIso": "US"
      },
      "physicalAddress": {
        "unitNumber": "string",
        "addressLine1": "Address",
        "addressLine2": "Address2",
        "addressLine3": "string",
        "city": "New York",
        "stateIso": "NY",
        "postalCode": "1111",
        "countryIso": "US"
      },
      "telephoneNumber": "+19879878787",
      "websiteAddress": "https://test.com",
      "stateOfIncorporation": "NY",
      "countryOfIncorporation": "US",
      "corporateEntityType": "ETT_C_CORP_PRIVATE",
      "corporateEntityTypeDescription": "Test",
      "emailAddress": "test@gmail.com",
      "establishedOn": "2008-02-03T13:58:19.053Z",
      "naics": "123123",
      "naicsDescription": "Test",
      "investmentProfile": {
        "primarySourceOfFunds": "SFD_EMPLOYMENT",
        "totalInvestableAssets": "VLM_UPTO_10K",
        "totalAssets": "VLM_UPTO_10K",
        "assetAllocationToCrypto": "VLM_UPTO_10K",
        "investmentExperienceCrypto": "INE_LITTLE",
        "investmentStrategyCrypto": "INS_LOW_RISK",
        "initialDepositSource": "DEP_DEPOSIT",
        "initialDepositSourceCryptoDetails": "test",
        "initialDepositSourceFiatDetails": "test",
        "ongoingDepositSource": "DEP_DEPOSIT",
        "frequencyOfCryptoTransactions": "FRQ_DAILY",
        "cryptoInvestmentPlans": "INP_CUSTODY",
        "investmentProceedsUse": "test",
        "expectedCryptoAssets": "test",
        "performTransfersWithUnhostedWallets": true,
        "knownUnhostedWalletAddresses": "test",
        "tradesPerMonth": "TRL_UPTO_20",
        "usdValueOfCrypto": "VLM_UPTO_10K",
        "frequencyOfTransactions": "FRQ_DAILY",
        "monthlyCryptoInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyInvestmentDeposit": "ILM_UPTO_1K",
        "monthlyCryptoDeposits": "CLM_UPTO_5",
        "monthlyDeposits": "CLM_UPTO_5",
        "monthlyCryptoInvestmentWithdrawal": "ILM_UPTO_1K",
        "monthlyInvestmentWithdrawal": "ILM_UPTO_1K",
        "monthlyCryptoWithdrawals": "CLM_UPTO_5",
        "monthlyWithdrawals": "CLM_UPTO_5",
        "tradeInternationally": false,
        "tradeJurisdictions": [
          "US",
          "AE"
        ],
        "primarySourceOfFundsDescription": "Test",
        "usdValueOfFiat": "VLM_UPTO_10K"
      },
      "kycProfile": {
        "primaryBusiness": "BSN_SOFTWARE",
        "descriptionOfBusinessNature": "string",
        "isCharitable": false,
        "businessJurisdictions": [
          "US",
          "AE"
        ],
        "fundsSendReceiveJurisdictions": [
          "US",
          "AE"
        ],
        "newYorkOffice": true,
        "engageInActivities": [
          "ACT_NONE"
        ],
        "regulatedStatus": "RGS_REGULATED",
        "regulationAgency": "test",
        "regulationAgencyRegulationNumber": "test",
        "controlExemptionReason": "CRL_REGULATED",
        "numberOfOperation": "CLM_UPTO_5",
        "aggregateUsdVolume1stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume3stMonth": "VLM_UPTO_10K",
        "aggregateUsdVolume6stMonth": "VLM_UPTO_10K",
        "regulatedNoLicenseExplain": "test",
        "requireClientAccount": false,
        "vendorsAndCounterparties": [
          "VND_SELF"
        ]
      },
      "guid": "",
      "taxReferenceNumber": "123123",
      "reasons": {
        "bankStatementMissing": ""
      },
      "documents": [
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "INCORPORATION_DOCUMENTS",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "80613f4f-6e66-4387-beff-cda168b1da2a",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Bank",
          "size": 4902,
          "mime": "string",
          "docType": "BANK_STATEMENT",
          "info": "string",
          "isLock": true,
          "createAt": "2003-08-20T13:45:04.597Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "BENEFICIAL_CERTIFICATE",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "DIRECTORSHIP_CONFIRMATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "DIRECTORSHIP_CONFIRMATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "DIRECTORSHIP_CONFIRMATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "DIRECTORSHIP_CONFIRMATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "DIRECTORSHIP_CONFIRMATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "LEASE_AGREEMENT",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "POWER_OF_ATTORNEY",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "ANNUAL_REPORT",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "PARTNERSHIP_AGREEMENT",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "LLC_AGREEMENT",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "ARTICLES_OF_INCORPORATION",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        },
        {
          "id": "2aa885de-eb9b-402a-9a7b-873111712321",
          "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
          "fileName": "Document",
          "size": 5530,
          "mime": "string",
          "docType": "LAYER2_ACCOUNT_AGREEMENT",
          "info": "string",
          "isLock": false,
          "createAt": "2021-03-07T01:57:24.517Z",
          "status": "DST_APPROVED"
        }
      ],
      "informationAttested": false,
      "legalStructureDescription": "TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest"
    },
    "individuals": [
      {
        "individualType": [
          "IND_BENEFICIAL_OWNER"
        ],
        "firstName": "Second",
        "middleName": "string",
        "lastName": "Name",
        "emailAddress": "sec@gmail.com",
        "mailingAddress": {
          "unitNumber": "string",
          "addressLine1": "address",
          "addressLine2": "address2",
          "addressLine3": "string",
          "city": "New York",
          "stateIso": "NY",
          "postalCode": "1111",
          "countryIso": "US"
        },
        "telephoneNumber": "+14564564545",
        "taxReferenceNumber": "1111",
        "passportNumber": "323232",
        "nationality": "US",
        "dateOfBirth": "2007-04-22T15:35:17.215Z",
        "percentageOwnership": 10,
        "title": "mr",
        "usResidencyStatus": "RES_US_CITIZEN",
        "guid": "",
        "documents": [
          {
            "id": "942da27e-1075-44e3-aa9f-625894157bb0",
            "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
            "fileName": "License",
            "size": 1585,
            "mime": "string",
            "docType": "DRIVERS_LICENCE_FRONT",
            "info": "string",
            "isLock": true,
            "createAt": "1967-12-30T00:24:37.769Z",
            "status": "DST_APPROVED"
          },
          {
            "id": "942da27e-1075-44e3-aa9f-625894157bb0",
            "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
            "fileName": "PASSPORT",
            "size": 3476,
            "mime": "string",
            "docType": "PASSPORT",
            "info": "string",
            "isLock": false,
            "createAt": "1972-10-18T05:03:37.570Z",
            "status": "DST_APPROVED"
          }
        ]
      },
      {
        "individualType": [
          "IND_CONTROL_PERSON"
        ],
        "firstName": "First",
        "middleName": "",
        "lastName": "Last",
        "emailAddress": "first@gmail.com",
        "mailingAddress": {
          "unitNumber": "string",
          "addressLine1": "address",
          "addressLine2": "address2",
          "addressLine3": "string",
          "city": "New York",
          "stateIso": "NY",
          "postalCode": "1111",
          "countryIso": "US"
        },
        "telephoneNumber": "+16786786767",
        "taxReferenceNumber": "123123",
        "passportNumber": "321321",
        "nationality": "US",
        "dateOfBirth": "1961-12-02T09:20:55.518Z",
        "percentageOwnership": 100,
        "title": "mr",
        "usResidencyStatus": "RES_US_CITIZEN",
        "guid": "",
        "documents": [
          {
            "id": "942da27e-1075-44e3-aa9f-625894157bb0",
            "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
            "fileName": "License",
            "size": 5141,
            "mime": "string",
            "docType": "DRIVERS_LICENCE_FRONT",
            "info": "string",
            "isLock": true,
            "createAt": "1974-12-20T20:29:59.357Z",
            "status": "DST_APPROVED"
          },
          {
            "id": "942da27e-1075-44e3-aa9f-625894157bb0",
            "customerId": "DPKdUxl-qivE-slKExmuEEEtV",
            "fileName": "passport",
            "size": 2370,
            "mime": "string",
            "docType": "PASSPORT",
            "info": "string",
            "isLock": false,
            "createAt": "1979-08-20T04:24:36.013Z",
            "status": "DST_APPROVED"
          }
        ]
      }
    ]
  }
}
```

***


# Send Customer Application

Submits a previously configured customer application for review and processing. This endpoint finalizes the application submission, triggering the review workflow and moving the application from draft to submitted status.

**Endpoint:** `PATCH /v2/customer/{customerId}/application`

**Link:**&#x20;

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_SendApplication>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                  | Required | Example                       |
| ---------------- | -------- | -------------------------------------------- | -------- | ----------------------------- |
| **`customerId`** | `string` | **Customer ID** whose application to submit. | Yes      | `"D7k3xbc-ERrj-lde9k1t3XuaE"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Request Body**

No request body required for this endpoint. The submission is based on the previously saved application data.

***

### **Response (200 OK)**

Returns the submission status and confirmation message.

#### **Response Fields**

| Field         | Type      | Description                   | Example                                |
| ------------- | --------- | ----------------------------- | -------------------------------------- |
| **`success`** | `boolean` | **Submission status**.        | `true`                                 |
| **`message`** | `string`  | **Operation result message**. | `"Application submitted successfully"` |

### **Error Responses**

1. **Customer Not Found**:

   json

   ```
   {
     "success": false,
     "message": "Customer not found: D7k3xbc-ERrj-lde9k1t3XuaE"
   }
   ```
2. **Application Not Configured**:

   json

   ```
   {
     "success": false,
     "message": "No application found for customer D7k3xbc-ERrj-lde9k1t3XuaE"
   }
   ```
3. **Missing Required Information**:

   json

   ```
   {
     "success": false,
     "message": "Application incomplete: missing required documents"
   }
   ```
4. **Unauthorized**:

   json

   ```
   {
     "success": false,
     "message": "Unauthorized"
   }
   ```
5. **Application Validation Failed**:

   json

   ```
   {
     "success": false,
     "message": "Application validation failed: invalid tax identification number"
   }
   ```

***

### **Notes**

* **Prerequisite**: An application must be previously configured using `POST /v2/customer/{customerId}/application`
* **State Transition**: Moves application from `NEW` to `READY_FOR_MODERATION` status
* **Workflow Trigger**: Initiates KYC/AML review processes
* **Idempotent**: Multiple calls have the same effect (won't resubmit already submitted applications)
* **Validation**: Comprehensive validation performed before submission

**Application Status Flow**:

1. **NEW** → Application created but not submitted
2. **READY\_FOR\_MODERATION** → Application sent for review (this endpoint)
3. **MODERTION** → Being reviewed by compliance team
4. **VERIFICATION** → Waiting for the final status
5. **ACCEPT** / **REJECTED**  → Final statuses

**What Happens After Submission**:

* Application enters review queue
* Compliance team notifications triggered
* Document verification processes initiated
* Review timeline starts

#### Example

**Real request**

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzY1NzgxNTcxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.VCpRI6Xwg0YGEdZRk0JuhDAKkE0mQPK3GSwOHjHKTno
customerId*: D7k3xbc-ERrj-lde9k1t3XuaE
```

**Real response**

200OK

```postman_json
{
  "success": true,
  "message": ""
}
```


# Get account list

This command is to retrieve a list of accounts (payment wallets) for a specific partner or customer. It can be needed to check overall accounts’ balances and statuses for a particular client.

**Endpoint**

&#x20;`GET/v2/account`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Accounts_GetAccounts>" %}

### **Request Parameters**

#### **Query Parameters**

| Parameter           | Type      | Description & Values                                                                                                                                                                                                                                                                                                             | Default                  |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **`associateType`** | `string`  | <p><strong>Filter by account association type</strong>:<br>- <code>NOT\_ASSOCIATE</code>: Standalone account<br>- <code>POOL</code>: Part of a pooled account<br>- <code>COMMISSION</code>: Commission-related account</p>                                                                                                       | `ASSOCIATE_TYPE_NOT_SET` |
| **`balance`**       | `string`  | <p><strong>Filter by balance status</strong>:<br>- <code>POSITIVE</code>: Balance > 0<br>- <code>NEGATIVE</code>: Balance < 0<br>- <code>ZERO</code>: Balance = 0</p>                                                                                                                                                            | `NOTSET` (no filter)     |
| **`currencyIso`**   | `string`  | **Currency code** (ISO 4217, e.g., `USD`, `EUR`). Filters accounts by currency.                                                                                                                                                                                                                                                  | –                        |
| **`customerId`**    | `string`  | **Customer ID** (e.g., <kbd>`DqCsgSE-4e95-ViYbNI7mudVE`</kbd>). Filters accounts by customer.                                                                                                                                                                                                                                    | –                        |
| **`customerName`**  | `string`  | **Customer name** (partial match, e.g., `Test Company`). Filters accounts by client name.                                                                                                                                                                                                                                        | –                        |
| **`fromCreatedAt`** | `string`  | **Start date** (e.g., 2024-08-11). Filters accounts created *starting from* this timestamp.                                                                                                                                                                                                                                      | –                        |
| **`id`**            | `string`  | **Account ID** (e.g., `UhcPVBEpjmtR`). Filters by specific account.                                                                                                                                                                                                                                                              | –                        |
| **`meta.page`**     | `integer` | **Page number** (starts at `1`). Used for pagination.                                                                                                                                                                                                                                                                            | `0`                      |
| **`meta.pageSize`** | `integer` | **Items per page** (e.g., `15`). Max number of accounts returned per request.                                                                                                                                                                                                                                                    | –                        |
| **`name`**          | `string`  | **Account name** (full match, e.g., `Savings`). Filters accounts by name.                                                                                                                                                                                                                                                        | –                        |
| number              | `string`  | (non mandatory)                                                                                                                                                                                                                                                                                                                  | –                        |
| search              | `string`  | (non mandatory)                                                                                                                                                                                                                                                                                                                  | –                        |
| **`status`**        | `string`  | <p><strong>Account status</strong>:<br>- <code>NEW</code>: Newly created<br>- <code>PRE\_MODERATION</code>: Pending review<br>- <code>MODERATION</code>: Under review<br>- <code>ACCEPTED</code>: Approved<br>- <code>REJECTED</code>: Denied<br>- <code>BANNED</code>: Blocked<br>- <code>PROCESSING</code>: Mid-moderation</p> | `ACCOUNT_STATUS_NOTSET`  |
| **`toCreatedAt`**   | `string`  | **End date** (ISO 8601, e.g., `2024-12-31`). Filters accounts created *before* this timestamp.                                                                                                                                                                                                                                   | –                        |
| **withCommission**  | `boolean` | <p><strong>Commission flag</strong>:<br>- <code>true</code>: Only accounts with commissions<br>- <code>false</code>: Exclude accounts with commissions</p>                                                                                                                                                                       | –                        |

***

### **Response Fields**

#### <mark style="color:$success;">**Success (200 OK)**</mark>

Returns an `application/json` object with:

**1. Account Object (`items[]`)**

| Field             | Type      | Description & Values                                                                                                                                                                                                                                                                                                 | Example                                                                                                                                                                                                 |
| ----------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`id`**          | `string`  | Unique account identifier.                                                                                                                                                                                                                                                                                           | `"EBzClby3LdDc"`                                                                                                                                                                                        |
| **`customer`**    | `object`  | <p><strong>Customer details</strong>:<br>- <code>id</code>: Customer ID (e.g., <code>cust\_123</code>)<br>- <code>name</code>: Full name<br>- <code>email</code>: Contact email<br>- <code>phone</code>: Phone number<br>- <code>status</code>: Customer status (<code>NEW</code>, <code>MODERATED</code>, etc.)</p> | `{ "id": "`<kbd>`DqCsgSE-4e95-ViYbNI7m`</kbd>`", "name": "Test Company", "status": "ACCEPT" }`                                                                                                          |
| **`isDefault`**   | `boolean` | Whether this is the user’s default account (`true`/`false`).                                                                                                                                                                                                                                                         | `true`                                                                                                                                                                                                  |
| **`name`**        | `string`  | Account name (e.g., `"Business Account"`).                                                                                                                                                                                                                                                                           | `"Savings Account"`                                                                                                                                                                                     |
| **`status`**      | `string`  | Current account status (same values as `status` filter above).                                                                                                                                                                                                                                                       | `"ACCEPTED"`                                                                                                                                                                                            |
| **`balance`**     | `object`  | <p><strong>Balance details</strong>:<br>- <code>balance</code>: Available funds<br>- <code>hold</code>: Restricted funds (see <em>Money Object</em> below)</p>                                                                                                                                                       | –                                                                                                                                                                                                       |
| **`currencyIso`** | `string`  | Account currency code (ISO 4217, e.g., `USD`).                                                                                                                                                                                                                                                                       | `"EUR"`                                                                                                                                                                                                 |
| **`requisites`**  | `array`   | <p><strong>Bank/payment details</strong> (e.g., IBAN, SWIFT):<br>- <code>title</code>: Section title (e.g., <code>"Bank Account"</code>)<br>- <code>items\[]</code>: Key-value pairs (e.g., <code>{ "key": "iban", "value": "DE89370400440532013000" }</code>)</p>                                                   | <mark style="color:red;">**See Requisites Example**</mark> [<mark style="color:red;">**here**</mark>](https://docs.google.com/document/d/1wsxLCgwdu7wPG7YCkquRY--KMiPOZ-Rw3rYgj4cawxs/edit?usp=sharing) |
| **`createdAt`**   | `string`  | Creation timestamp (ISO 8601).                                                                                                                                                                                                                                                                                       | `"2024-01-15"`                                                                                                                                                                                          |
| **`updatedAt`**   | `string`  | Last update timestamp (ISO 8601).                                                                                                                                                                                                                                                                                    | `"2024-01-20"`                                                                                                                                                                                          |

**2. Money Object**

Nested under `balance` and `hold`:

| Field              | Type      | Description                                                              | Example               |
| ------------------ | --------- | ------------------------------------------------------------------------ | --------------------- |
| **`currencyCode`** | `string`  | 3-letter ISO currency code (e.g., `USD`, `GBP`).                         | `"USD"`               |
| **`units`**        | `string`  | Whole units (e.g., dollars). Negative values indicate debts.             | `"100"` (= $100)      |
| **`nanos`**        | `integer` | Fractional units (1 nano = 10^-9 units). Use for cents/micro-currencies. | `500000000` (= $0.50) |

**3. Meta Object**

Pagination details:

| Field          | Type      | Description                            | Example |
| -------------- | --------- | -------------------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.                        | `10`    |
| **`page`**     | `integer` | Current page (0-indexed).              | `0`     |
| **`total`**    | `string`  | Total accounts available (unfiltered). | `"150"` |

#### **Notes**

1. **Money Handling**:
   * Combine `units` + `nanos` for precise amounts (e.g., `units=-1` + `nanos=-750000000` = `-$1.75`).
   * `nanos` must align with `units` (e.g., negative `units` → negative `nanos`).
2. **Dates**: Use ISO 8601 format (`YYYY-MM-DD`).
3. **Pagination**:
   * First page = `1`.
   * Omit `meta.pageSize` to use the server default.
4. **Empty Fields**: Unset fields (e.g., `hold`) may be omitted or return `null`.

Examples

Real request

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTYyMDMyLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.Ic6JVIMx0HpNeqUrgbeRV17hRZEBW_zEdjYctALGcqA
accountId: UnTtUmiTlATg
associateType: Not SetASSOCIATE_TYPE_NOT_SETNOT_ASSOCIATEPOOLCOMMISSION

select an option
balance: Not SetNOTSETNEGATIVEPOSITIVEZERO

select an option
currencyCode: string

```

Real response example

200 OK

```
{
  "items": [
    {
      "accountId": "UnTtUmiTlATg",
      "customer": {
        "id": "Dt4zZnj-x14s-q6eYgIBDpa4D",
        "name": "sdfsdfsd sdfsdf sdfsdf",
        "email": "sdfsdf@dasdas.rr",
        "phone": "+1888457743",
        "status": "NEW"
      },
      "isDefault": true,
      "name": "",
      "status": "MODERATION",
      "balance": {
        "balance": {
          "money": {
            "currencyCode": "USDT_TRC20",
            "units": "0",
            "nanos": 0
          },
          "default": {
            "currencyCode": "USD",
            "units": "0",
            "nanos": 0
          }
        },
        "hold": {
          "money": {
            "currencyCode": "USDT_TRC20",
            "units": "0",
            "nanos": 0
          },
          "default": {
            "currencyCode": "USD",
            "units": "0",
            "nanos": 0
          }
        }
      },
      "currencyCode": "USDT_TRC20",
      "requisites": [],
      "createdAt": "2025-10-22T08:35:26Z",
      "updatedAt": "2025-10-22T08:35:26Z"
    }
  ],
  "meta": {
    "pageSize": 1,
    "page": 0,
    "total": "1"
  }
}
```


# Create account

This command is to create an account (payment wallet) for a specific customer. Creates a new account with the specified currency and owner. Returns the newly created account details, including balance

**Endpoint**

&#x20;`POST/v2/account`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Accounts_CreateAccount>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field             | Type     | Description & Requirements                                    | Example                            |
| ----------------- | -------- | ------------------------------------------------------------- | ---------------------------------- |
| **`customerId`**  | `string` | **ID of the customer** who owns this account.                 | <kbd>`"DqCsgSE-4e95-ViYbNI"`</kbd> |
| **`name`**        | `string` | **Account name** (e.g., `"Business USD Account"`).            | `"Savings Account"`                |
| **`currencyIso`** | `string` | **Currency code** (ISO 4217, e.g., `USD`, `EUR`). *Required*. | `"EUR"`                            |

**Example Request Body:**

json

```
{
  "customerId": "DqCsgSE-4e95-ViYbNI",
  "name": "Main Business Account",
  "currencyIso": "USD"
}
```

***

### **Response (200 OK)**

Returns the created `Account entity v2` object in JSON format.

#### **Response Fields**

| Field             | Type      | Description & Values                                                                                                                                                                                                                                                               | Example                                                           |
| ----------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **`id`**          | `string`  | Unique account identifier.                                                                                                                                                                                                                                                         | `"UhcPVBEpjmtR"`                                                  |
| **`customer`**    | `object`  | <p><strong>Customer details</strong>:<br>- <code>id</code>: Customer ID<br>- <code>name</code>: Full name<br>- <code>email</code>: Contact email<br>- <code>phone</code>: Phone number<br>- <code>status</code>: Customer status (<code>NEW</code>, <code>ACCEPT</code>, etc.)</p> | `{ "id": "`<kbd>`DqCsgSE-4e95-ViYbNI`</kbd>`", "status": "NEW" }` |
| **`isDefault`**   | `boolean` | Whether this is the user’s default account (`true`/`false`).                                                                                                                                                                                                                       | `false`                                                           |
| **`name`**        | `string`  | Account name (matches request).                                                                                                                                                                                                                                                    | `"Main Business Account"`                                         |
| **`status`**      | `string`  | <p>Initial account status:<br>- <code>NEW</code>: Newly created<br>- <code>PRE\_MODERATION</code>: Pending review<br>- <code>MODERATION</code>: Under review</p>                                                                                                                   | `"NEW"`                                                           |
| **`balance`**     | `object`  | <p><strong>Balance details</strong> (initially zero):<br>- <code>balance</code>: Available funds<br>- <code>hold</code>: Restricted funds (see <em>Money Object</em> below)</p>                                                                                                    | –                                                                 |
| **`currencyIso`** | `string`  | Account currency (matches request).                                                                                                                                                                                                                                                | `"USD"`                                                           |
| **`requisites`**  | `array`   | **Bank/payment details** (empty by default).                                                                                                                                                                                                                                       | `[]`                                                              |
| **`createdAt`**   | `string`  | Creation timestamp (ISO 8601).                                                                                                                                                                                                                                                     | "2024-05-20T10:30:00Z"                                            |
| **`updatedAt`**   | `string`  | Last update timestamp (matches `createdAt` initially).                                                                                                                                                                                                                             | "2024-05-20T10:30:00Z"                                            |

**Money Object**

Nested under `balance` and `hold`:

| Field              | Type      | Description                                             | Example |
| ------------------ | --------- | ------------------------------------------------------- | ------- |
| **`currencyCode`** | `string`  | 3-letter ISO currency code.                             | `"USD"` |
| **`units`**        | `string`  | Whole units (e.g., dollars). Initially `"0"`.           | `"0"`   |
| **`nanos`**        | `integer` | Fractional units (1 nano = 10^-9 units). Initially `0`. | `0`     |

### Error Cases

1. **Missing `currencyIso`**:

   json

   ```
   { "error": "currencyIso is required" }
   ```
2. **Invalid Currency Code**:

   json

   ```
   { "error": "currencyIso must be a valid ISO 4217 code (e.g., USD, EUR)" }
   ```
3. **Customer Not Found**:

   json

   ```
   { "error": "customerId not found" }
   ```

***

### **Notes**

* **Initial Status:** New accounts typically start with `NEW` status. If needed, the status can be changed to MODERATION status
* **Balances**: Initialized to `0` in the specified currency.
* **Requisites**: Added later via separate API calls (e.g., `/v2/account/{id}/requisites`).

### Examples

**Real request**&#x20;

```postman_json
{
  "customerId": "DqCsgSE-4e95-ViYbNI7mudVE",
  "name": "Savings Account",
  "currencyCode": "EUR"
}
```

**Real response**&#x20;

```postman_json
200 OK
{
  "item": {
    "accountId": "E4eon5o2Ehnz",
    "customer": {
      "id": "DqCsgSE-4e95-ViYbNI7mudVE",
      "name": "",
      "email": "",
      "phone": "",
      "status": "NEW"
    },
    "isDefault": false,
    "name": "Savings Account",
    "status": "MODERATION",
    "balance": {
      "balance": {
        "money": {
          "currencyCode": "EUR",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "hold": {
        "money": {
          "currencyCode": "EUR",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      }
    },
    "currencyCode": "EUR",
    "requisites": [],
    "createdAt": "0001-01-01T00:00:00Z",
    "updatedAt": "0001-01-01T00:00:00Z"
  }
}
```


# Get account by ID

**Endpoint**

`GET/v2/account/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Accounts_GetAccount>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                 | Required | Example          |
| --------- | -------- | --------------------------- | -------- | ---------------- |
| **`id`**  | `string` | **Account ID** to retrieve. | Yes      | `"UhcPVBEpjmtR"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns an `Account entity v2` object in JSON format.

#### **Response Fields**

<table><thead><tr><th width="179">Field</th><th width="103">Type</th><th width="215">Description &#x26; Values</th><th width="382">Example</th><th></th></tr></thead><tbody><tr><td><strong><code>id</code></strong></td><td><code>string</code></td><td>Unique account identifier.</td><td><code>"UhcPVBEpjmtR"</code></td><td></td></tr><tr><td><strong><code>customer</code></strong></td><td><code>object</code></td><td><strong>Customer details</strong>:<br>- <code>id</code>: Customer ID<br>- <code>name</code>: Full name<br><mark style="color:red;"><strong>- <code>email</code>: Contact email</strong></mark><br><mark style="color:red;"><strong>- <code>phone</code>: Phone number</strong></mark><br>- <code>status</code>: Customer status (<code>NEW</code>, <code>ACCEPT</code>, etc.)</td><td><code>{ "id": "</code><kbd><code>DqCsgSE-4e95-ViYbNI</code></kbd><code>", "status": "ACCEPT" }</code></td><td></td></tr><tr><td><strong><code>isDefault</code></strong></td><td><code>boolean</code></td><td>Whether this is the user’s default account (<code>true</code>/<code>false</code>).</td><td><code>true</code></td><td></td></tr><tr><td><strong><code>name</code></strong></td><td><code>string</code></td><td>Account name.</td><td><code>"Business Account"</code></td><td></td></tr><tr><td><strong><code>status</code></strong></td><td><code>string</code></td><td>Current account status:<br>- <code>NEW</code><br>- <code>ACCEPTED</code><br>- <code>REJECTED</code><br>- <code>BANNED</code><br>- <code>PROCESSING</code></td><td><code>"ACCEPTED"</code></td><td></td></tr><tr><td><strong><code>balance</code></strong></td><td><code>object</code></td><td><strong>Balance details</strong>:<br>- <code>balance</code>: Available funds<br>- <code>hold</code>: Restricted funds (see <em>Money Object</em> below)</td><td>–</td><td></td></tr><tr><td><strong><code>currencyIso</code></strong></td><td><code>string</code></td><td>Account currency code (ISO 4217).</td><td><code>"USD"</code></td><td></td></tr><tr><td><strong><code>requisites</code></strong></td><td><code>array</code></td><td><strong>Bank/payment details</strong>:<br>- <code>title</code>: Section title (e.g., <code>"Bank Account"</code>)<br>- <code>items[]</code>: Key-value pairs (e.g., IBAN, SWIFT)</td><td>See Requisites Example</td><td></td></tr><tr><td><strong><code>createdAt</code></strong></td><td><code>string</code></td><td>Creation timestamp (ISO 8601).</td><td>"2024-01-15T10:30:00Z"</td><td></td></tr><tr><td><strong><code>updatedAt</code></strong></td><td><code>string</code></td><td>Last update timestamp (ISO 8601).</td><td>"2024-01-20T14:45:00Z"</td><td></td></tr></tbody></table>

**Money Object**

Nested under `balance` and `hold`:

| Field              | Type      | Description                                                              | Example               |
| ------------------ | --------- | ------------------------------------------------------------------------ | --------------------- |
| **`currencyCode`** | `string`  | 3-letter ISO currency code.                                              | `"USD"`               |
| **`units`**        | `string`  | Whole units (e.g., dollars). Negative values indicate debts.             | `"100"` (= $100)      |
| **`nanos`**        | `integer` | Fractional units (1 nano = 10^-9 units). Use for cents/micro-currencies. | `500000000` (= $0.50) |

**Example**:

json

```
"balance": {
  "money": {
    "currencyCode": "USD",
    "units": "100",     // $100
    "nanos": 500000000  // + $0.50 → Total: $100.50
  }
}
```

### **Error Cases**

1. **Invalid Account ID**:

   json

   ```
   { "error": "Account not found" }
   ```
2. **Missing Authorization**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Requisites**: May be empty if no bank details are linked.
* **Hold Balance**: Shows funds temporarily unavailable (e.g., during transactions).
* **Timestamps**: Use ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

### Examples

**Real request**&#x20;

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTYyNjg0LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.sAHIi5o9r3XHxqtAPypxlVIncxr4WsUkhPCHnB0fQus
accountId*: UnTtUmiTlATg
```

**Real response**&#x20;

```postman_json
{
  "item": {
    "accountId": "UnTtUmiTlATg",
    "customer": {
      "id": "Dt4zZnj-x14s-q6eYgIBDpa4D",
      "name": "sdfsdfsd sdfsdf sdfsdf",
      "email": "sdfsdf@dasdas.rr",
      "phone": "+1888457743",
      "status": "NEW"
    },
    "isDefault": true,
    "name": "",
    "status": "MODERATION",
    "balance": {
      "balance": {
        "money": {
          "currencyCode": "USDT_TRC20",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "hold": {
        "money": {
          "currencyCode": "USDT_TRC20",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      }
    },
    "currencyCode": "USDT_TRC20",
    "requisites": [],
    "createdAt": "2025-10-22T08:35:26Z",
    "updatedAt": "2025-10-22T08:35:26Z"
  }
}
```

### Examples of account requisites by currency, provider and rail

**USD Portage**

ACH

| 1 | Currency       | USD                   |
| - | -------------- | --------------------- |
| 2 | Account Holder | NORVELTA HOLDINGS LTD |
| 3 | Account Number | 417925860134          |
| 4 | Routing Number | 071925463             |
| 5 | Account Type   | CHECKING              |
| 6 | Bank Name      | Meridian Bay Bank     |

FEDWIRE

| 1 | Currency               | USD                                                     |
| - | ---------------------- | ------------------------------------------------------- |
| 2 | Account Holder         | NORVELTA HOLDINGS LTD                                   |
| 3 | Account Holder Address | 27 Oakfield Road, Palmers Green, London, London N13 4HX |
| 4 | Account Number         | 417925860134                                            |
| 5 | Routing Number         | 071925463                                               |
| 6 | Bank Name              | Meridian Bay Bank                                       |
| 7 | Bank Address           | 745 116th Ave NE, Bellevue, WA 98005                    |

SWIFT

| 1 | Currency               | USD                                                     |
| - | ---------------------- | ------------------------------------------------------- |
| 2 | Account Holder         | NORVELTA HOLDINGS LTD                                   |
| 3 | Account Holder Address | 27 Oakfield Road, Palmers Green, London, London N13 4HX |
| 4 | Account Number         | 417925860134                                            |
| 5 | SWIFT/BIC              | MERBUS31XXX                                             |
| 6 | Bank Name              | Meridian Bay Bank                                       |
| 7 | Bank Address           | 745 116th Ave NE, Bellevue, WA 98005                    |

**USD Zenus**

SWIFT

| 1 | Currency                     | USD                                                                          |
| - | ---------------------------- | ---------------------------------------------------------------------------- |
| 2 | Account Holder               | Falcon Ridge Trading and Logistics (FZC) SPC                                 |
| 3 | Account Holder Address       | Industrial Court, PB 418 PC 311, Wadi Al-Jizzi Sohar Freezone, OM, 00000, OM |
| 4 | Account Number               | 30000087246                                                                  |
| 5 | Routing Number               | 021734865                                                                    |
| 6 | Bank Name                    | Halden Bank International Inc                                                |
| 7 | SWIFT/BIC                    | HALDPRSJXXX                                                                  |
| 8 | Bank Address                 | Ocean Tower, Floor 12, 480 Ave Ashford, San Juan, Puerto Rico                |
| 9 | Intermediary Bank SWIFT Code | CITIUS41                                                                     |

FEDWIRE

| 1 | Currency               | USD                                                           |
| - | ---------------------- | ------------------------------------------------------------- |
| 2 | Account Holder         | Falcon Ridge Trading and Logistics (FZC) SPC                  |
| 3 | Account Holder Address | Emerald Tower 2104, Business Bay, Dubai, AE                   |
| 4 | Account Number         | 30000004561897                                                |
| 5 | Routing Number         | 021873456                                                     |
| 6 | Bank Name              | Halden Bank International Inc                                 |
| 7 | Bank Address           | Ocean Tower, Floor 12, 480 Ave Ashford, San Juan, Puerto Rico |

**EUR**

SEPA

| 1 | Currency               | EUR                                                                          |
| - | ---------------------- | ---------------------------------------------------------------------------- |
| 2 | Account holder         | MTX Logistics FZCO                                                           |
| 3 | IBAN                   | MT91QUAB28004000000000009284617                                              |
| 4 | SWIFT / BIC            | QUABMTM1                                                                     |
| 5 | Account holder address | Meydan Free Zone, DMZ, PO Box 118742, Dubai, AE                              |
| 6 | Institution name       | Vantage Pay Financial Services MT Ltd                                        |
| 7 | Institution address    | 45 – 46 Portomaso, Triq id-Dragunara, St Julians, North Region, STJ 3108, MT |

**GBP**

SWIFT

| 1 | Currency               | GBP                                                                  |
| - | ---------------------- | -------------------------------------------------------------------- |
| 2 | Account Holder         | Brightlane Services                                                  |
| 3 | SWIFT/BIC              | NRTHGB22XXX                                                          |
| 4 | IBAN                   | GB29NRTH23147058204163                                               |
| 5 | Bank                   | NORTHFIELD BANK LIMITED                                              |
| 6 | Bank Address           | The Anchor Building 58-62, City Road Islington, London, EC1Y 8ND, GB |
| 7 | Account Holder Address | Na Vinici, 842/9, Prague, 15000, CZ                                  |

FPS

| 1 | Currency       | GBP                                                                  |
| - | -------------- | -------------------------------------------------------------------- |
| 2 | Account Holder | Brightlane Services                                                  |
| 3 | Sort Code      | 23-14-70                                                             |
| 4 | Account Number | 58204163                                                             |
| 5 | Bank           | NORTHFIELD BANK LIMITED                                              |
| 6 | Bank Address   | The Anchor Building 58-62, City Road Islington, London, EC1Y 8ND, GB |

CHAPS

| 1 | Currency       | GBP                                                                  |
| - | -------------- | -------------------------------------------------------------------- |
| 2 | Account Holder | Brightlane Services                                                  |
| 3 | Sort Code      | 23-14-70                                                             |
| 4 | Account Number | 58204163                                                             |
| 5 | SWIFT/BIC      | NRTHGB22XXX                                                          |
| 6 | IBAN           | GB29NRTH23147058204163                                               |
| 7 | Bank           | NORTHFIELD BANK LIMITED                                              |
| 8 | Bank Address   | The Anchor Building 58-62, City Road Islington, London, EC1Y 8ND, GB |

**AED**

UAEFTS

| 1 | Currency               | AED                                                                                                          |
| - | ---------------------- | ------------------------------------------------------------------------------------------------------------ |
| 2 | Account Holder         | Solstice Trading Ltd                                                                                         |
| 3 | Account Holder Address | Unit 12 Ferndale Business Park Way, Leicester, United Kingdom, LE193, GB                                     |
| 4 | IBAN                   | AE730510000782640039481                                                                                      |
| 5 | Bank Name              | Alborz Bank PJSC                                                                                             |
| 6 | SWIFT/BIC              | ALBRAEADXXX                                                                                                  |
| 7 | Bank Address           | Al Wasl Tower, Office 305 Floor 3, Sheikh Zayed Road, Building 9, Marina Square, Dubai, United Arab Emirates |

SWIFT

| 1 | Currency               | AED                                                               |
| - | ---------------------- | ----------------------------------------------------------------- |
| 2 | Account holder         | Solstice Trading Ltd                                              |
| 3 | Account holder address | Emerald Tower 2104, Business Bay, Dubai, AE                       |
| 4 | Account number         | AE580510000784620051937                                           |
| 5 | SWIFT Code             | ALBRAEADXXX                                                       |
| 6 | Bank name              | Alborz Bank PJSC                                                  |
| 7 | Bank address           | 3rd Floor, Marina Square, Building 9, Dubai, United Arab Emirates |

**CRYPTO**

BTC

| 0 | Address | bc1q8p30wgx9mzp9dwpv6wu3q2m43fd4x9cxkksza8 |
| - | ------- | ------------------------------------------ |

ETH

| 0 | Address | 0xc29b62179273c8eb5bb682575ec87a171ac826a6 |
| - | ------- | ------------------------------------------ |

USDT\_TRC20

| 0 | Address | TiYSyiWAH9GpcbHpeUzeSQF9ZY6q4x8AhB |
| - | ------- | ---------------------------------- |

USDT\_ERC20

| 0 | Address | 0xd2cce8038a39d5e0853964b50af03b971722f244 |
| - | ------- | ------------------------------------------ |

USDC\_ERC20


# Update Account

Updates an existing account's properties, including its name, default flag, and status. Returns the updated account details.

**Endpoint**

<kbd>`PATCH`</kbd>`/v2/account/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Accounts_UpdateAccount>" %}

### **Request**

#### **Path Parameters**

<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th><th width="108">Required</th><th>Example</th></tr></thead><tbody><tr><td><strong><code>id</code></strong></td><td><code>string</code></td><td><strong>Account ID</strong> to update.</td><td>Yes</td><td><code>"UhcPVBEpjmtR"</code></td></tr></tbody></table>

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

All fields are optional - only include the fields you want to update.

| Field             | Type      | Description & Values                                                                                                                                                                                                        | Example              |
| ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| **`name`**        | `string`  | New account name.                                                                                                                                                                                                           | `"New Account Name"` |
| **`currencyIso`** | `string`  | New currency code (ISO 4217, e.g., `USD`).                                                                                                                                                                                  | `"EUR"`              |
| **`isDefault`**   | `boolean` | Set as default account (`true`/`false`).                                                                                                                                                                                    | `true`               |
| **`status`**      | `string`  | <p>New account status:<br>- <code>NEW</code><br>- <code>PRE\_MODERATION</code><br>- <code>MODERATION</code><br>- <code>ACCEPTED</code><br>- <code>REJECTED</code><br>- <code>BANNED</code><br>- <code>PROCESSING</code></p> | `"ACCEPTED"`         |

**Example Request Body:**

json

```
{
  "name": "Updated Business Account",
  "isDefault": true,
  "status": "ACCEPTED"
}
```

***

### **Response (200 OK)**

Returns the updated `Account entity v2` object in JSON format (same structure as Get Account by ID).

#### **Key Response Fields**

* **`name`**: Updated account name
* **`currencyIso`**: Updated currency (if changed)
* **`isDefault`**: New default status
* **`status`**: Updated account status
* **`updatedAt`**: New timestamp reflecting update time

**Example Response:**

json

```
{
  "item": {
    "id": "UhcPVBEpjmtR",
    "name": "Updated Business Account",
    "isDefault": true,
    "status": "ACCEPTED",
    "currencyIso": "USD",
    "updatedAt": "2024-05-21T09:15:00Z",
    // Other fields unchanged...
  }
}
```

### Error Cases

1. **Invalid Status Transition**:

   json

   ```
   { "error": "Cannot change status from REJECTED to ACCEPTED" }
   ```
2. **Currency Change Restrictions**:

   json

   ```
   { "error": "Currency cannot be modified after account creation" }
   ```
3. **Account Not Found**:

   json

   ```
   { "error": "Account ID not found" }
   ```

***

### **Notes**

* **Partial Updates**: Only included fields are modified; omitted fields remain unchanged.
* **Immutable Fields**: Some fields (e.g., `customerId`) cannot be updated.
* **Status Flow**: Ensure valid status transitions (e.g., `NEW` → `ACCEPTED` is valid, but `BANNED` → `ACCEPTED` may be blocked).

### Examples

**Real request**&#x20;

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYzNTQ3ODk4LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.p4m7Y6i9wSCYm6iVUsqMWD1-idNinUgqDiMn-4E9Uts
accountId*: UrpI6jMzHnsP

{
  "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
  "name": "USDT ERC20 1",
  "currencyCode": "USDT_ERC20",
  "isDefault": true,
  "status": "NEW"
}

```

**Real response**&#x20;

200 OK

```postman_json
{
  "item": {
    "accountId": "UrpI6jMzHnsP",
    "customer": {
      "id": "",
      "name": "",
      "email": "",
      "phone": "",
      "status": "NEW",
      "customerType": "CORPORATE"
    },
    "isDefault": true,
    "name": "USDT ERC20 1",
    "status": "NEW",
    "balance": {
      "balance": {
        "money": {
          "currencyCode": "USDT_ERC20",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "hold": {
        "money": {
          "currencyCode": "USDT_ERC20",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      }
    },
    "currencyCode": "USDT_ERC20",
    "requisites": [],
    "createdAt": "0001-01-01T00:00:00Z",
    "updatedAt": "0001-01-01T00:00:00Z"
  }
}
```


# Get counterparty list

Retrieves a paginated list of counterparties (business partners, clients, or related entities) with comprehensive filtering options and detailed profile information.

**Endpoint**

`GET /v2/counterparty`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_GetList>" %}

### **Request**

#### **Query Parameters**

All parameters are optional. Use them to filter the counterparty list.

| Parameter              | Type      | Description                           | Example                  |
| ---------------------- | --------- | ------------------------------------- | ------------------------ |
| **`counterpartyId`**   | `string`  | Filter by counterparty ID.            | `"cp_12345"`             |
| **`counterpartyName`** | `string`  | Filter by counterparty name.          | `"Tech Supplies"`        |
| **`customerId`**       | `string`  | Filter by customer ID.                | `"cust_67890"`           |
| **`customerName`**     | `string`  | Filter by customer name.              | `"John Doe"`             |
| **`fromCreatedAt`**    | `string`  | Filter from creation date (ISO 8601). | `"2024-01-01T00:00:00Z"` |
| **`toCreatedAt`**      | `string`  | Filter to creation date (ISO 8601).   | `"2024-12-31T23:59:59Z"` |
| **`meta.page`**        | `integer` | Page number (starts from 0).          | `0`                      |
| **`meta.pageSize`**    | `integer` | Items per page.                       | `20`                     |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of counterparties with complete details.

#### **Response Fields**

**1. Meta (Pagination)**

| Field          | Type      | Description               | Example |
| -------------- | --------- | ------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.           | `20`    |
| **`page`**     | `integer` | Current page (0-indexed). | `0`     |
| **`total`**    | `string`  | Total items count.        | `"150"` |

**2. Items (Counterparty Array)**

| Field             | Type     | Description               | Example                          |
| ----------------- | -------- | ------------------------- | -------------------------------- |
| **`id`**          | `string` | Counterparty unique ID.   | `"cp_12345"`                     |
| **`description`** | `string` | Counterparty description. | `"Primary electronics supplier"` |
| **`createdAt`**   | `string` | Creation timestamp.       | `"2024-01-15T10:30:00Z"`         |
| **`updatedAt`**   | `string` | Last update timestamp.    | `"2024-05-20T14:45:00Z"`         |

**3. Customer Object**

| Field        | Type     | Description                                                                                                                                                                                                            | Example              |
| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| **`id`**     | `string` | Customer ID.                                                                                                                                                                                                           | `"cust_67890"`       |
| **`name`**   | `string` | Customer name.                                                                                                                                                                                                         | `"John Doe"`         |
| **`phone`**  | `string` | Customer phone.                                                                                                                                                                                                        | `"+1234567890"`      |
| **`email`**  | `string` | Customer email.                                                                                                                                                                                                        | `"john@example.com"` |
| **`status`** | `string` | <p>Customer status:<br>- <code>NEW</code><br>- <code>READY\_FOR\_MODERATION</code><br>- <code>MODERATED</code><br>- <code>VERIFY</code><br>- <code>ACCEPT</code><br>- <code>REJECT</code><br>- <code>BANNED</code></p> | `"ACCEPT"`           |

**4. Profile Object**

| Field             | Type     | Description                  | Required | Example                      |
| ----------------- | -------- | ---------------------------- | -------- | ---------------------------- |
| **`name`**        | `string` | Legal name.                  | **Yes**  | `"Tech Supplies Corp"`       |
| **`email`**       | `string` | Contact email.               | No       | `"contact@techsupplies.com"` |
| **`phoneNumber`** | `string` | Contact phone.               | No       | `"+19876543210"`             |
| **`taxNumber`**   | `string` | Tax ID number.               | No       | `"TAX-US-12345"`             |
| **`dateOfBirth`** | `string` | Date of birth/incorporation. | No       | `"1985-05-15T00:00:00Z"`     |
| **`website`**     | `string` | Company website.             | No       | `"https://techsupplies.com"` |
| **`lastname`**    | `string` | Last name (individuals).     | No       | `"Smith"`                    |

**5. Address Object**

| Field              | Type     | Description      | Required | Example             |
| ------------------ | -------- | ---------------- | -------- | ------------------- |
| **`addressLine1`** | `string` | Primary address. | **Yes**  | `"123 Main Street"` |
| **`addressLine2`** | `string` | Suite/floor.     | No       | `"Suite 500"`       |
| **`addressLine3`** | `string` | Additional info. | No       | `"Building B"`      |
| **`city`**         | `string` | City.            | No       | `"New York"`        |
| **`stateIso`**     | `string` | State code.      | No       | `"NY"`              |
| **`countryIso`**   | `string` | Country code.    | No       | `"US"`              |
| **`postalCode`**   | `string` | Postal code.     | No       | `"10001"`           |
| **`unitNumber`**   | `string` | Unit number.     | No       | `"5A"`              |

**6. AdditionalInfo Object**

| Field              | Type     | Description            | Allowed Values                                                          | Example                             |
| ------------------ | -------- | ---------------------- | ----------------------------------------------------------------------- | ----------------------------------- |
| **`type`**         | `string` | Legal structure.       | `INDIVIDUAL`, `CORPORATION`                                             | `"CORPORATION"`                     |
| **`businessLine`** | `string` | Industry type.         | `PLB_AUTOMOTIVE`, `PLB_RETAIL`, `PLB_HIGH_TECH_SOFTWARE_TELECOMS`, etc. | `"PLB_HIGH_TECH_SOFTWARE_TELECOMS"` |
| **`relationship`** | `string` | Business relationship. | `PRC_SUPPLIER`, `PRC_CUSTOMER`, `PRC_BUSINESS_PARTNER`, etc.            | `"PRC_SUPPLIER"`                    |

**Example Response:**

json

```
{
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "150"
  },
  "items": [
    {
      "id": "cp_12345",
      "customer": {
        "id": "cust_67890",
        "name": "John Doe",
        "phone": "+1234567890",
        "email": "john.doe@example.com",
        "status": "ACCEPT"
      },
      "description": "Primary electronics supplier",
      "profile": {
        "name": "Tech Supplies Corp",
        "email": "contact@techsupplies.com",
        "phoneNumber": "+19876543210",
        "taxNumber": "TAX-US-12345",
        "dateOfBirth": "1985-05-15T00:00:00Z",
        "address": {
          "addressLine1": "123 Main Street",
          "addressLine2": "Suite 500",
          "addressLine3": "Building B",
          "city": "New York",
          "stateIso": "NY",
          "countryIso": "US",
          "postalCode": "10001",
          "unitNumber": "5A"
        },
        "website": "https://techsupplies.com",
        "additionalInfo": {
          "type": "CORPORATION",
          "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
          "relationship": "PRC_SUPPLIER"
        },
        "lastname": "Smith"
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z"
    }
  ]
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/counterparty?meta.page=0&meta.pageSize=10&customerName=John' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Individual Counterparty Example**

**Response:**

json

```
{
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "25"
  },
  "items": [
    {
      "id": "cp_67890",
      "customer": {
        "id": "cust_12345",
        "name": "Jane Smith",
        "phone": "+441234567890",
        "email": "jane.smith@example.com",
        "status": "MODERATED"
      },
      "description": "Freelance consultant",
      "profile": {
        "name": "Jane",
        "email": "jane@consulting.com",
        "phoneNumber": "+449876543210",
        "taxNumber": "UK123456789",
        "dateOfBirth": "1990-08-20T00:00:00Z",
        "address": {
          "addressLine1": "45 Park Lane",
          "addressLine2": "Flat 3B",
          "city": "London",
          "countryIso": "GB",
          "postalCode": "W1K 7AA"
        },
        "website": "https://janeconsulting.com",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_CONSULTING_PROFESSIONAL_SERVICES",
          "relationship": "PRC_BUSINESS_PARTNER"
        },
        "lastname": "Smith"
      },
      "createdAt": "2024-03-10T14:20:00Z",
      "updatedAt": "2024-05-15T09:30:00Z"
    }
  ]
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
2. **Invalid Parameters**:

   json

   ```
   { "error": "Invalid query parameters" }
   ```

***

### **Notes**

* **Pagination**: Use `meta.page` and `meta.pageSize` for large datasets
* **Filtering**: Combine multiple filters for precise searches
* **Address Validation**: `addressLine1` is required for KYC compliance
* **Business Lines**: Extensive industry classification available
* **Relationships**: Defines the business context of the counterparty

**Common Use Cases**:

* Supplier/vendor management
* Client portfolio review
* Compliance auditing
* Relationship mapping

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjU0NzI1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.IFznwinEJGqxZOXue1XxNenO8Ap8oVCpbzsAx9jKC8U
counterpartyId: string
counterpartyName: string
customerId: Dnewcvn-euuI-vG0FZCRDjLXS
customerName: string
fromCreatedAt: string
meta.page: integer
meta.pageSize: integer
toCreatedAt: string
```

Response sample

```postman_json
{
  "meta": {
    "pageSize": 6,
    "page": 0,
    "total": "6"
  },
  "items": [
    {
      "counterpartyId": "DDpmgVt-kKiC-j6kTFUi0DYoo",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "string",
      "profile": {
        "name": "Test recipient 123",
        "email": "string",
        "phoneNumber": "string",
        "taxNumber": "123123",
        "dateOfBirth": "2019-08-24T14:15:22Z",
        "address": {
          "addressLine1": "Test",
          "addressLine2": "Test",
          "addressLine3": "string",
          "city": "NY",
          "stateIso": "NY",
          "countryIso": "US",
          "postalCode": "0000",
          "unitNumber": "string"
        },
        "website": "string",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_ARTS_AND_ANTIQUES",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": "Test"
      },
      "createdAt": "2025-08-11T09:51:58Z",
      "updatedAt": "2025-08-11T09:51:58Z"
    },
    {
      "counterpartyId": "DMhmXb9-w7xD-Uf9scYzRW0Qw",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "test",
      "profile": {
        "name": "testAPI",
        "email": "string",
        "phoneNumber": "string",
        "taxNumber": "string",
        "dateOfBirth": "2019-08-24T14:15:22Z",
        "address": {
          "addressLine1": "string",
          "addressLine2": "string",
          "addressLine3": "string",
          "city": "string",
          "stateIso": "string",
          "countryIso": "string",
          "postalCode": "string",
          "unitNumber": "string"
        },
        "website": "string",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_ARTS_AND_ANTIQUES",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": "string"
      },
      "createdAt": "2025-04-29T05:44:37Z",
      "updatedAt": "2025-04-29T05:44:37Z"
    },
    {
      "counterpartyId": "DwLxwtt-zxiL-AsUmMYJKMnXx",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "test",
      "profile": {
        "name": "testAPI",
        "email": "string",
        "phoneNumber": "string",
        "taxNumber": "string",
        "dateOfBirth": "2019-08-24T14:15:22Z",
        "address": {
          "addressLine1": "string",
          "addressLine2": "string",
          "addressLine3": "string",
          "city": "string",
          "stateIso": "string",
          "countryIso": "string",
          "postalCode": "string",
          "unitNumber": "string"
        },
        "website": "string",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_ARTS_AND_ANTIQUES",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": "string"
      },
      "createdAt": "2025-04-29T05:44:29Z",
      "updatedAt": "2025-04-29T05:44:29Z"
    },
    {
      "counterpartyId": "DlKei8y-5dOd-M69tp7Gd8K8G",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "string",
      "profile": {
        "name": "Test Finvoka",
        "email": "string",
        "phoneNumber": "string",
        "taxNumber": "string",
        "dateOfBirth": "2019-08-24T14:15:22Z",
        "address": {
          "addressLine1": "string",
          "addressLine2": "string",
          "addressLine3": "string",
          "city": "NY",
          "stateIso": "US",
          "countryIso": "US",
          "postalCode": "string",
          "unitNumber": "string"
        },
        "website": "string",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_ARTS_AND_ANTIQUES",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": "string"
      },
      "createdAt": "2025-03-24T15:47:05Z",
      "updatedAt": "2025-03-24T15:47:05Z"
    },
    {
      "counterpartyId": "DZoDX6z-XIba-eTiF27sCEOho",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "",
      "profile": {
        "name": "",
        "email": "",
        "phoneNumber": "",
        "taxNumber": "",
        "dateOfBirth": "1970-01-01T00:00:00Z",
        "address": {
          "addressLine1": "",
          "addressLine2": "",
          "addressLine3": "",
          "city": "",
          "stateIso": "",
          "countryIso": "",
          "postalCode": "",
          "unitNumber": ""
        },
        "website": "",
        "additionalInfo": {
          "type": "CORPORATION",
          "businessLine": "PLB_ARTS_AND_ANTIQUES",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": ""
      },
      "createdAt": "2025-02-13T08:25:09Z",
      "updatedAt": "2025-02-13T08:25:09Z"
    },
    {
      "counterpartyId": "DkCSHAN-B9nW-HoakBCwCq36I",
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "ACCEPT"
      },
      "description": "",
      "profile": {
        "name": "Test Eugen USD",
        "email": "Test Eugen USD",
        "phoneNumber": "111",
        "taxNumber": "Test Eugen USD",
        "dateOfBirth": "1970-01-01T00:00:00Z",
        "address": {
          "addressLine1": "Test Eugen USD",
          "addressLine2": "Test Eugen USD",
          "addressLine3": "Test Eugen USD",
          "city": "Test Eugen USD",
          "stateIso": "Test Eugen USD",
          "countryIso": "Test Eugen USD",
          "postalCode": "Test Eugen USD",
          "unitNumber": "Test Eugen USD"
        },
        "website": "Test Eugen USD",
        "additionalInfo": {
          "type": "INDIVIDUAL",
          "businessLine": "PLB_TECHNICAL_SUPPORT",
          "relationship": "PRC_SPOUSE"
        },
        "lastname": ""
      },
      "createdAt": "2025-01-28T09:03:54Z",
      "updatedAt": "2025-01-28T12:19:35Z"
    }
  ]
}
```

<br>


# Create counterparty

Creates a new counterparty (business partner, client, or related entity) with comprehensive profile information and associated bank/crypto accounts.

**Endpoint**

`POST/v2/counterparty`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_Create>" %}

### **Request**

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Content-Type`**  | `application/json` | Yes      |
| **`Accept`**        | `application/json` | Yes      |

#### **Request Body**

**Required fields:** \
Required fields — profile

| Field                                 | Type   | Description                                                             | Rules                                                                                                                                                      |
| ------------------------------------- | ------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `customerId`                          | string | ID of the customer that will own this counterparty                      |                                                                                                                                                            |
| `profile.name`                        | string | Legal entity name                                                       | Fewer than 35 characters; no special characters, accents, or leading/trailing spaces.                                                                      |
| `profile.address.addressLine1`        | string | Primary address line                                                    | Fewer than 35 characters.                                                                                                                                  |
| `profile.address.city`                | string | City name                                                               | Fewer than 21 characters                                                                                                                                   |
| `profile.address.stateIso`            | string | State code                                                              | For US addresses, a two-letter ISO code. Can't be the same value as the country code. For countries without states/provinces, use the region name instead. |
| `profile.address.countryIso`          | string | Country code (ISO)                                                      | two-letter ISO code only                                                                                                                                   |
| `profile.address.postalCode`          | string | Postal code                                                             | For US ZIP codes, either 5 digits, or 5 digits + a hyphen + 4 digits.                                                                                      |
| `profile.additionalInfo.type`         | string | Entity type: `INDIVIDUAL` or `CORPORATION`                              |                                                                                                                                                            |
| `profile.additionalInfo.businessLine` | string | Industry classification                                                 | can't be `PLB_OTHER`                                                                                                                                       |
| `profile.additionalInfo.relationship` | string | Relationship to the customer, e.g. `PRC_SUPPLIER`, `PRC_CUSTOMER`, etc. | can't be `PRC_NOT_RELATED`                                                                                                                                 |

<br>

json

```
{
  "customerId": "cust_12345",
  "description": "Primary electronics supplier",
  "profile": {
    "name": "Tech Supplies Corp",
    "email": "contact@techsupplies.com",
    "phoneNumber": "+19876543210",
    "taxNumber": "TAX-US-12345",
    "dateOfBirth": "1985-05-15T00:00:00Z",
    "address": {
      "addressLine1": "123 Main Street",
      "addressLine2": "Suite 500",
      "addressLine3": "Building B",
      "city": "New York",
      "stateIso": "NY",
      "countryIso": "US",
      "postalCode": "10001",
      "unitNumber": "5A"
    },
    "website": "https://techsupplies.com",
    "additionalInfo": {
      "type": "CORPORATION",
      "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
      "relationship": "PRC_SUPPLIER"
    },
    "lastname": "Smith"
  },
  "accounts": [
    {
      "currencyIso": "USD",
      "bank": {
        "name": "Chase Bank",
        "number": "123456789",
        "address": {
          "addressLine1": "456 Bank Street",
          "city": "New York",
          "stateIso": "NY",
          "countryIso": "US",
          "postalCode": "10002"
        },
        "routingNumber": "021000021"
      },
      "fiat": {
        "number": "987654321",
        "routingNumber": "021000021",
        "additionalInformation": {
          "type": "TYPE_FIAT_US",
          "supportedRails": ["ACH", "FEDWIRE"],
          "accountType": "CHECKING"
        }
      }
    }
  ]
}
```

***

### **Request Fields**

**1. Main Counterparty Fields**

| Field             | Type     | Required | Description                             | Example                          |
| ----------------- | -------- | -------- | --------------------------------------- | -------------------------------- |
| **`customerId`**  | `string` | **Yes**  | Customer ID who owns this counterparty. | `"cust_12345"`                   |
| **`description`** | `string` | No       | Counterparty description.               | `"Primary electronics supplier"` |

**2. Profile Object**

| Field             | Type     | Required | Description                  | Example                      |
| ----------------- | -------- | -------- | ---------------------------- | ---------------------------- |
| **`name`**        | `string` | **Yes**  | Legal name.                  | `"Tech Supplies Corp"`       |
| **`email`**       | `string` | No       | Contact email.               | `"contact@techsupplies.com"` |
| **`phoneNumber`** | `string` | No       | Contact phone.               | `"+19876543210"`             |
| **`taxNumber`**   | `string` | No       | Tax ID number.               | `"TAX-US-12345"`             |
| **`dateOfBirth`** | `string` | No       | Date of birth/incorporation. | `"1985-05-15T00:00:00Z"`     |
| **`website`**     | `string` | No       | Company website.             | `"https://techsupplies.com"` |
| **`lastname`**    | `string` | No       | Last name (individuals).     | `"Smith"`                    |

**3. Address Object**

| Field              | Type     | Required | Description                                            | Example             |
| ------------------ | -------- | -------- | ------------------------------------------------------ | ------------------- |
| **`addressLine1`** | `string` | **Yes**  | Primary address, 30 symbols max, no special characters | `"123 Main Street"` |
| **`addressLine2`** | `string` | No       | Suite/floor, 30 symbols max, no special characters     | `"Suite 500"`       |
| **`addressLine3`** | `string` | No       | Additional info, 30 symbols max, no special characters | `"Building B"`      |
| **`city`**         | `string` | **Yes**  | City, no special characters                            | `"New York"`        |
| **`stateIso`**     | `string` | **Yes**  | State code.                                            | `"NY"`              |
| **`countryIso`**   | `string` | **Yes**  | Country code.                                          | `"US"`              |
| **`postalCode`**   | `string` | **Yes**  | Postal code.                                           | `"10001"`           |
| **`unitNumber`**   | `string` | No       | Unit number.                                           | `"5A"`              |

**4. Additional Info Object**

| Field              | Type     | Required | Description            | Allowed Values                       | Example                             |
| ------------------ | -------- | -------- | ---------------------- | ------------------------------------ | ----------------------------------- |
| **`type`**         | `string` | **Yes**  | Legal structure.       | `INDIVIDUAL`, `CORPORATION`          | `"CORPORATION"`                     |
| **`businessLine`** | `string` | **Yes**  | Industry type.         | `PLB_AUTOMOTIVE`, `PLB_RETAIL`, etc. | `"PLB_HIGH_TECH_SOFTWARE_TELECOMS"` |
| **`relationship`** | `string` | **Yes**  | Business relationship. | `PRC_SUPPLIER`, `PRC_CUSTOMER`, etc. | `"PRC_SUPPLIER"`                    |

**5. Accounts Array**

Array of bank/crypto accounts for the counterparty.

| Field             | Type     | Required | Description               | Example |
| ----------------- | -------- | -------- | ------------------------- | ------- |
| **`currencyIso`** | `string` | **Yes**  | Currency code (ISO 4217). | `"USD"` |

**Bank Account (Traditional)**\
**Required**

| Field                                                  | Type   | Description                                                                             |
| ------------------------------------------------------ | ------ | --------------------------------------------------------------------------------------- |
| `accounts[].currencyCode`                              | string | Currency ISO code, e.g. `USD`, `EUR`, `AED`                                             |
| `accounts[].bank.name`                                 | string | Receiving bank's name (fewer than 35 characters)                                        |
| `accounts[].bank.address.addressLine1`                 | string | Bank address — no special characters, accents, or leading/trailing spaces               |
| `accounts[].bank.address.city`                         | string | Fewer than 21 characters                                                                |
| `accounts[].bank.address.countryIso`                   | string | Two-letter ISO code                                                                     |
| `accounts[].bank.address.stateIso`                     | string | Same US/region rule as `profile.address.stateIso`                                       |
| `accounts[].bank.address.postalCode`                   | string | Same US ZIP rule as `profile.address.postalCode`                                        |
| `accounts[].fiat.number`                               | string | Account number/IBAN — must be the correct length and country code if an IBAN            |
| `accounts[].fiat.additionalInformation.type`           | string | Must name the specific currency, e.g. `TYPE_FIAT_US` — can't be the generic `TYPE_FIAT` |
| `accounts[].fiat.additionalInformation.supportedRails` | array  | Exactly one rail, e.g. `["SWIFT"]`                                                      |

**Conditionally required**

| Field                           | Type   | Description                                         |
| ------------------------------- | ------ | --------------------------------------------------- |
| `accounts[].fiat.swift`         | string | **Mandatory for SWIFT beneficiary accounts**        |
| `accounts[].fiat.routingNumber` | string | **Mandatory for domestic USA beneficiary accounts** |

<br>

**Crypto Account**

**Required**

| Field                                                    | Type   | Description                                                   |
| -------------------------------------------------------- | ------ | ------------------------------------------------------------- |
| `accounts[].currencyCode`                                | string | Asset + network in one value, e.g. `USDT_ERC20`, `USDT_TRC20` |
| `accounts[].crypto.address`                              | string | Wallet address                                                |
| `accounts[].crypto.additionalInformation.walletType`     | string | e.g. `CPW_INSTITUTION`, `CPW_UNKNOWN`                         |
| `accounts[].crypto.additionalInformation.type`           | string | `TYPE_CRYPTO`                                                 |
| `accounts[].crypto.additionalInformation.supportedRails` | array  | `["CRYPTO"]`                                                  |

**Conditionally required**

| Field                     | Type   | Description                                                                                                  |
| ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| `accounts[].bank.name`    | string | **Required when `walletType` is `CPW_INSTITUTION`** — identifies the custodian institution behind the wallet |
| `accounts[].bank.address` | object | **Required when `walletType` is `CPW_INSTITUTION`**, same address sub-fields as fiat accounts above          |

\ <br>

**Fiat Account (Detailed)**

| Field                                        | Type     | Required | Description                 | Example              |
| -------------------------------------------- | -------- | -------- | --------------------------- | -------------------- |
| **`fiat.number`**                            | `string` | **Yes**  | Bank account number or IBAN | `"987654321"`        |
| **`fiat.routingNumber`**                     | `string` | No       | Bank's routing number.      | `"021000021"`        |
| **`fiat.swift`**                             | `string` | No       | SWIFT code.                 | `"CHASUS33"`         |
| **`fiat.ifsc`**                              | `string` | No       | IFSC code (India).          | `"SBIN0000001"`      |
| **`fiat.sortCode`**                          | `string` | No       | Sort code (UK).             | `"40-30-20"`         |
| **`fiat.additionalInformation.accountType`** | `string` | No       | Account type.               | `CHECKING`, `SAVING` |

***

### **Response (200 OK)**

Returns the created counterparty with system-generated IDs and timestamps.

**Example Response:**

json

```
{
  "item": {
    "id": "cp_12345",
    "customerId": "cust_12345",
    "description": "Primary electronics supplier",
    "profile": {
      "name": "Tech Supplies Corp",
      "email": "contact@techsupplies.com",
      "phoneNumber": "+19876543210",
      "taxNumber": "TAX-US-12345",
      "dateOfBirth": "1985-05-15T00:00:00Z",
      "address": {
        "addressLine1": "123 Main Street",
        "addressLine2": "Suite 500",
        "addressLine3": "Building B",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10001",
        "unitNumber": "5A"
      },
      "website": "https://techsupplies.com",
      "additionalInfo": {
        "type": "CORPORATION",
        "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
        "relationship": "PRC_SUPPLIER"
      },
      "lastname": "Smith"
    },
    "accounts": [
      {
        "id": "acc_67890",
        "currencyIso": "USD",
        "status": "NEW",
        "bank": {
          "name": "Chase Bank",
          "number": "123456789",
          "address": {
            "addressLine1": "456 Bank Street",
            "city": "New York",
            "stateIso": "NY",
            "countryIso": "US",
            "postalCode": "10002"
          },
          "routingNumber": "021000021"
        },
        "fiat": {
          "number": "987654321",
          "routingNumber": "021000021",
          "additionalInformation": {
            "type": "TYPE_FIAT_US",
            "supportedRails": ["ACH", "FEDWIRE"],
            "accountType": "CHECKING"
          }
        }
      }
    ],
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z",
    "customerName": "John Doe"
  }
}
```

***

### **Response Fields**

| Field                        | Type     | Description                       | Example                   |
| ---------------------------- | -------- | --------------------------------- | ------------------------- |
| **`item.id`**                | `string` | System-generated counterparty ID. | `"cp_12345"`              |
| **`item.accounts[].id`**     | `string` | System-generated account ID.      | `"acc_67890"`             |
| **`item.accounts[].status`** | `string` | Account status.                   | `NEW`, `ACCEPT`, `REJECT` |
| **`item.createdAt`**         | `string` | Creation timestamp.               | `"2024-01-15T10:30:00Z"`  |
| **`item.updatedAt`**         | `string` | Last update timestamp.            | `"2024-01-15T10:30:00Z"`  |
| **`item.customerName`**      | `string` | Customer name (auto-populated).   | `"John Doe"`              |

### **Error Responses**

1. **Missing Required Fields**:

   json

   ```
   { "error": "Missing required field: profile.name" }
   ```
2. **Invalid Customer**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
3. **Validation Error**:

   json

   ```
   { "error": "Invalid address format" }
   ```

***

### Notes

* **Account Verification**: New accounts start with `NEW` status and require verification
* **Currency Support**: Multiple accounts with different currencies can be added
* **KYC Compliance**: Complete profile information improves verification success
* **A counterparty** can hold multiple accounts across different currencies.

**Supported Payment Rails**:

* **Traditional**: `ACH`, `FEDWIRE`, `SWIFT`, `SEPA_CT` , `FPS`, `CHAPS`, `UAEFTS`
* **Crypto**: `CRYPTO`

### **Examples**

**Real request**

```json
{
    "profile": {
        "website": "sdfsd.com",
        "phoneNumber": "+11231232323",
        "address": {
            "city": "Test",
            "stateIso": "Test",
            "countryIso": "AI",
            "postalCode": "Test",
            "addressLine1": "Test"
        },
        "name": "Test Recipient",
        "additionalInfo": {
            "type": "CORPORATION"
        },
        "email": "test@test.com"
    },
    "customerId": "D0uCaCN-MwtQ-lqaTXgJ4IGRM",
    "description": "saddadad",
    "accounts": [
        {
            "currencyCode": "EUR",
            "bank": {
                "address": {
                    "addressLine1": "456 Park Avenue",
                    "city": "New York",
                    "countryIso": "US",
                    "postalCode": "10022",
                    "stateIso": "NY"
                },
                "name": "Bank of America",
                "number": "161465165651",
                "routingNumber": null
            },
            "fiat": {
                "ifsc": "SBIN0001234",
                "name": "EUR 0",
                "number": "9876543210",
                "routingNumber": "121000358",
                "sortCode": "65265",
                "swift": "BOFAUS3N",
                "transitNumber": "121000358",
                "additionalInformation": {
                    "type": "TYPE_FIAT_EU",
                    "accountType": "CHECKING",
                    "supportedRails": [
                        "SEPA_CT"
                    ],
                    "intermediary": {
                        "type": "",
                        "bank": {
                            "name": null,
                            "number": "",
                            "routingNumber": "",
                            "address": {
                                "addressLine1": "",
                                "addressLine2": "",
                                "addressLine3": null,
                                "city": "",
                                "stateIso": "",
                                "countryIso": "",
                                "postalCode": "",
                                "unitNumber": null
                            }
                        }
                    }
                }
            }
        }
    ]
}
```

**Real response**

```json
{
    "item": {
        "counterpartyId": "D41dltf-W6r7-MEOCYDRBddho",
        "customerId": "D0uCaCN-MwtQ-lqaTXgJ4IGRM",
        "description": "saddadad",
        "profile": {
            "name": "Test Recipient",
            "email": "test@test.com",
            "phoneNumber": "+11231232323",
            "taxNumber": "",
            "dateOfBirth": "1970-01-01T00:00:00Z",
            "address": {
                "addressLine1": "Test",
                "addressLine2": "",
                "addressLine3": "",
                "city": "Test",
                "stateIso": "Test",
                "countryIso": "AI",
                "postalCode": "Test",
                "unitNumber": ""
            },
            "website": "sdfsd.com",
            "additionalInfo": {
                "type": "CORPORATION",
                "businessLine": "PLB_ARTS_AND_ANTIQUES",
                "relationship": "PRC_SPOUSE"
            },
            "lastname": ""
        },
        "accounts": [
            {
                "accountId": "ECrSuzKfJsCr",
                "currencyCode": "EUR",
                "status": "MODERATION",
                "bank": {
                    "name": "Bank of America",
                    "number": "161465165651",
                    "address": {
                        "addressLine1": "456 Park Avenue",
                        "addressLine2": "",
                        "addressLine3": "",
                        "city": "New York",
                        "stateIso": "NY",
                        "countryIso": "US",
                        "postalCode": "10022",
                        "unitNumber": ""
                    }
                },
                "fiat": {
                    "number": "9876543210",
                    "ifsc": "SBIN0001234",
                    "swift": "BOFAUS3N",
                    "sortCode": "65265",
                    "name": "EUR 0",
                    "transitNumber": "121000358",
                    "routingNumber": "121000358",
                    "additionalInformation": {
                        "type": "TYPE_FIAT_EU",
                        "supportedRails": [
                            "SEPA_CT"
                        ],
                        "intermediary": {
                            "type": "TYPE_CRYPTO",
                            "bank": {
                                "number": "",
                                "address": {
                                    "addressLine1": "",
                                    "addressLine2": "",
                                    "addressLine3": "",
                                    "city": "",
                                    "stateIso": "",
                                    "countryIso": "",
                                    "postalCode": "",
                                    "unitNumber": ""
                                },
                                "routingNumber": ""
                            }
                        },
                        "accountType": "CHECKING"
                    },
                    "accountNumberType": "ANT_NOTSET",
                    "transitNumberCode": "TNC_NOTSET"
                }
            }
        ],
        "createdAt": "2025-11-09T06:18:46Z",
        "updatedAt": "2025-11-09T06:18:46Z",
        "customerName": ""
    }
}
```

## Account fields by currency and rail

### USD — FEDWIRE

#### Required

| Field                                  | Type   | Description                            |
| -------------------------------------- | ------ | -------------------------------------- |
| `routingNumber`                        | string | US ABA routing number                  |
| `additionalInformation.accountType`    | string | e.g. `CHECKING`                        |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_US` for USD accounts |
| `additionalInformation.supportedRails` | array  | Contains `FEDWIRE`                     |

#### Optional

| Field                                        | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| `additionalInformation.intermediary`         | object |             |
| `swift`, `sortCode`, `ifsc`, `transitNumber` | string |             |

### USD — SWIFT

#### Required

| Field                                  | Type   | Description                                               |
| -------------------------------------- | ------ | --------------------------------------------------------- |
| `swift`                                | string | BIC/SWIFT code — mandatory for SWIFT beneficiary accounts |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_US` for USD accounts                    |
| `additionalInformation.supportedRails` | array  | Contains `SWIFT`                                          |
| `additionalInformation.accountType`    | string |                                                           |
| `additionalInformation.intermediary`   | object |                                                           |
| `routingNumber`                        | string |                                                           |

#### Optional

| Field                               | Type   | Description |
| ----------------------------------- | ------ | ----------- |
| `bank.number`                       | string |             |
| `sortCode`, `ifsc`, `transitNumber` | string |             |

### EUR — SEPA\_CT

#### Required

| Field                                  | Type   | Description                                        |
| -------------------------------------- | ------ | -------------------------------------------------- |
| `number`                               | string | IBAN — must be the correct length and country code |
| `swift`                                | string | Receiving bank's BIC/SWIFT code                    |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_EU` for EUR accounts             |
| `additionalInformation.supportedRails` | array  | Contains `SEPA_CT`                                 |
| `additionalInformation.accountType`    | string |                                                    |
| `additionalInformation.intermediary`   | object |                                                    |

#### Optional

| Field                                                | Type   | Description |
| ---------------------------------------------------- | ------ | ----------- |
| `bank.number`                                        | string |             |
| `routingNumber`, `sortCode`, `ifsc`, `transitNumber` | string |             |

### GBP — FPS

#### Required

| Field                                  | Type   | Description                                 |
| -------------------------------------- | ------ | ------------------------------------------- |
| `sortCode`                             | string | UK sort code                                |
| `routingNumber`                        | string | Mirrors `sortCode` in the reference example |
| `additionalInformation.accountType`    | string | e.g. `CHECKING`                             |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_GB` for GBP accounts      |
| `additionalInformation.supportedRails` | array  | Contains `FPS`                              |

#### Optional

| Field                                | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| `swift`, `ifsc`, `transitNumber`     | string |             |
| `bank.number`                        | string |             |
| `additionalInformation.intermediary` | object |             |

### GBP — SWIFT

#### Required

| Field                                  | Type   | Description                            |
| -------------------------------------- | ------ | -------------------------------------- |
| `number`                               | string | IBAN                                   |
| `swift`                                | string | Receiving bank's BIC/SWIFT code        |
| `additionalInformation.accountType`    | string | e.g. `CHECKING`                        |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_GB` for GBP accounts |
| `additionalInformation.supportedRails` | array  | Contains `SWIFT`                       |

#### Optional

| Field                                                | Type   | Description |
| ---------------------------------------------------- | ------ | ----------- |
| `sortCode`, `routingNumber`, `ifsc`, `transitNumber` | string |             |
| `bank.number`                                        | string |             |
| `name`, `fiat.name`                                  | string |             |
| `additionalInformation.intermediary`                 | object |             |

### GBP — CHAPS

#### Required

| Field                                  | Type   | Description                            |
| -------------------------------------- | ------ | -------------------------------------- |
| `sortCode`                             | string | UK sort code                           |
| `additionalInformation.accountType`    | string | e.g. `CHECKING`                        |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_GB` for GBP accounts |
| `additionalInformation.supportedRails` | array  | Contains `CHAPS`                       |

#### Optional

| Field                                             | Type   | Description |
| ------------------------------------------------- | ------ | ----------- |
| `swift`, `routingNumber`, `ifsc`, `transitNumber` | string |             |
| `bank.number`                                     | string |             |
| `name`                                            | string |             |

### AED — UAEFTS

#### Required

| Field                                  | Type   | Description                            |
| -------------------------------------- | ------ | -------------------------------------- |
| `number`                               | string | IBAN                                   |
| `swift`                                | string | Receiving bank's BIC/SWIFT code        |
| `additionalInformation.accountType`    | string | e.g. `CHECKING`                        |
| `additionalInformation.type`           | string | Set to `TYPE_FIAT_AE` for AED accounts |
| `additionalInformation.supportedRails` | array  | Contains `UAEFTS`                      |
| `additionalInformation.intermediary`   | object |                                        |

#### Optional

| Field                                                | Type   | Description |
| ---------------------------------------------------- | ------ | ----------- |
| `bank.number`                                        | string |             |
| `routingNumber`, `sortCode`, `ifsc`, `transitNumber` | string |             |

### Crypto accounts

#### Required

| Field                                         | Type   | Description                                                                                                        |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `currencyCode`                                | string | Encodes both asset and network in one value, e.g. `USDT_TRC20`, `USDT_ERC20` — there's no separate "network" field |
| `crypto.address`                              | string | Wallet address                                                                                                     |
| `crypto.additionalInformation.walletType`     | string | Wallet classification — confirmed values: `CPW_INSTITUTION`, `CPW_UNKNOWN`, `CPW_OTHER`                            |
| `crypto.additionalInformation.type`           | string | Set to `TYPE_CRYPTO`                                                                                               |
| `crypto.additionalInformation.supportedRails` | array  | Contains `CRYPTO`                                                                                                  |

#### Conditionally required

| Field          | Type   | Description                                                                                                     |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `bank.name`    | string | **Required when `walletType` is `CPW_INSTITUTION`** — the name of the custodian institution                     |
| `bank.address` | object | **Required when `walletType` is `CPW_INSTITUTION`** — the custodian's address, same sub-fields as fiat accounts |

<br>


# Get Account List

Retrieves a paginated list of counterparty accounts with comprehensive filtering options.

**Endpoint**

&#x20;`GET/v2/counterparty/account`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_GetAccountList>" %}

This endpoint allows you to search and filter accounts by various criteria including counterparty details, customer information, account status, and more.

***

### **Request**

#### **Query Parameters**

All parameters are optional. Use them to filter the account list.

| Parameter              | Type      | Description                            | Example                  |
| ---------------------- | --------- | -------------------------------------- | ------------------------ |
| **`accountId`**        | `string`  | Filter by specific account ID.         | `"acc_12345"`            |
| **`counterpartyId`**   | `string`  | Filter by counterparty ID.             | `"cp_67890"`             |
| **`counterpartyName`** | `string`  | Filter by counterparty name.           | `"Tech Supplies"`        |
| **`currencyCode`**     | `string`  | Filter by currency code.               | `"USD"`                  |
| **`customerId`**       | `string`  | Filter by customer ID.                 | `"cust_12345"`           |
| **`customerName`**     | `string`  | Filter by customer name.               | `"John Doe"`             |
| **`fromCreatedAt`**    | `string`  | Filter from creation date (ISO 8601).  | `"2024-01-01T00:00:00Z"` |
| **`toCreatedAt`**      | `string`  | Filter to creation date (ISO 8601).    | `"2024-12-31T23:59:59Z"` |
| **`name`**             | `string`  | Filter by account name.                | `"Business Checking"`    |
| **`number`**           | `string`  | Filter by account number.              | `"123456789"`            |
| **`search`**           | `string`  | General search across multiple fields. | `"Chase"`                |
| **`status`**           | `string`  | Filter by account status.              | `"ACCEPT"`               |
| **`meta.page`**        | `integer` | Page number (starts from 0).           | `0`                      |
| **`meta.pageSize`**    | `integer` | Items per page.                        | `20`                     |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of accounts with complete details including counterparty and customer information.

#### **Response Fields**

**1. Meta (Pagination)**

| Field          | Type      | Description               | Example |
| -------------- | --------- | ------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.           | `20`    |
| **`page`**     | `integer` | Current page (0-indexed). | `0`     |
| **`total`**    | `string`  | Total items count.        | `"150"` |

**2. Items (Account Array)**

| Field                | Type     | Description                      | Example                       |
| -------------------- | -------- | -------------------------------- | ----------------------------- |
| **`accountId`**      | `string` | Unique account identifier.       | `"acc_12345"`                 |
| **`name`**           | `string` | Account name/description.        | `"Business Checking Account"` |
| **`number`**         | `string` | Account number.                  | `"123456789"`                 |
| **`currencyCode`**   | `string` | Currency code (ISO 4217).        | `"USD"`                       |
| **`type`**           | `string` | Account type.                    | `"CHECKING"`                  |
| **`status`**         | `string` | Account status.                  | `"ACCEPT"`                    |
| **`bankName`**       | `string` | Bank/financial institution name. | `"Chase Bank"`                |
| **`createdAt`**      | `string` | Creation timestamp.              | `"2024-01-15T10:30:00Z"`      |
| **`updatedAt`**      | `string` | Last update timestamp.           | `"2024-05-20T14:45:00Z"`      |
| **`supportedRails`** | `array`  | Supported payment rails.         | `["ACH", "FEDWIRE"]`          |

**3. Counterparty Object**

| Field       | Type     | Description         | Example                      |
| ----------- | -------- | ------------------- | ---------------------------- |
| **`id`**    | `string` | Counterparty ID.    | `"cp_67890"`                 |
| **`name`**  | `string` | Counterparty name.  | `"Tech Supplies Corp"`       |
| **`phone`** | `string` | Counterparty phone. | `"+19876543210"`             |
| **`email`** | `string` | Counterparty email. | `"contact@techsupplies.com"` |

**4. Customer Object**

| Field        | Type     | Description      | Example              |
| ------------ | -------- | ---------------- | -------------------- |
| **`id`**     | `string` | Customer ID.     | `"cust_12345"`       |
| **`name`**   | `string` | Customer name.   | `"John Doe"`         |
| **`phone`**  | `string` | Customer phone.  | `"+1234567890"`      |
| **`email`**  | `string` | Customer email.  | `"john@example.com"` |
| **`status`** | `string` | Customer status. | `"ACCEPT"`           |

**5. BankAddress Object**

| Field              | Type     | Description      | Example             |
| ------------------ | -------- | ---------------- | ------------------- |
| **`addressLine1`** | `string` | Primary address. | `"456 Bank Street"` |
| **`addressLine2`** | `string` | Suite/floor.     | `"Floor 15"`        |
| **`addressLine3`** | `string` | Additional info. | `"Main Office"`     |
| **`city`**         | `string` | City.            | `"New York"`        |
| **`stateIso`**     | `string` | State code.      | `"NY"`              |
| **`countryIso`**   | `string` | Country code.    | `"US"`              |
| **`postalCode`**   | `string` | Postal code.     | `"10002"`           |
| **`unitNumber`**   | `string` | Unit number.     | `"1501"`            |

**Example Response:**

json

```
{
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "85"
  },
  "items": [
    {
      "accountId": "acc_12345",
      "name": "Business Checking Account",
      "number": "123456789",
      "currencyCode": "USD",
      "type": "CHECKING",
      "counterparty": {
        "id": "cp_67890",
        "name": "Tech Supplies Corp",
        "phone": "+19876543210",
        "email": "contact@techsupplies.com"
      },
      "customer": {
        "id": "cust_12345",
        "name": "John Doe",
        "phone": "+1234567890",
        "email": "john@example.com",
        "status": "ACCEPT"
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z",
      "status": "ACCEPT",
      "bankName": "Chase Bank",
      "bankAddress": {
        "addressLine1": "456 Bank Street",
        "addressLine2": "Floor 15",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10002"
      },
      "supportedRails": ["ACH", "FEDWIRE"]
    }
  ]
}
```

***

### **Field Details**

#### **Account Status Values**

| Status             | Description                                   |
| ------------------ | --------------------------------------------- |
| **`NEW`**          | Account newly created, pending verification   |
| **`AWAIT`**        | Awaiting additional information/documentation |
| **`MODERATION`**   | Under review by compliance team               |
| **`ACCEPT`**       | Approved and active for transactions          |
| **`REJECT`**       | Rejected during verification                  |
| **`BANNED`**       | Permanently blocked from transactions         |
| **`VERIFICATION`** | In verification process                       |

#### **Supported Payment Rails**

| Rail          | Description                       |
| ------------- | --------------------------------- |
| **`ACH`**     | Automated Clearing House (US)     |
| **`FEDWIRE`** | Federal Wire Transfer (US)        |
| **`SWIFT`**   | International wire transfers      |
| **`SEPA_CT`** | SEPA Credit Transfer (EU)         |
| **`FPS`**     | Faster Payments (UK)              |
| **`IMPS`**    | Immediate Payment Service (India) |
| **`EFT`**     | Electronic Funds Transfer         |
| **`CRYPTO`**  | Cryptocurrency transfers          |
| **`NFT`**     | Non-fungible token transfers      |
| **`UP`**      | Unified Payments (Various)        |

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/counterparty/account?currencyCode=USD&status=ACCEPT&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **UK Bank Account Example**

**Response:**

json

```
{
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "23"
  },
  "items": [
    {
      "accountId": "acc_67890",
      "name": "Sterling Business Account",
      "number": "98765432",
      "currencyCode": "GBP",
      "type": "CHECKING",
      "counterparty": {
        "id": "cp_11111",
        "name": "London Consulting Ltd",
        "phone": "+442076543210",
        "email": "accounts@londonconsulting.com"
      },
      "customer": {
        "id": "cust_22222",
        "name": "Sarah Wilson",
        "phone": "+447123456789",
        "email": "sarah@example.com",
        "status": "ACCEPT"
      },
      "createdAt": "2024-03-10T14:20:00Z",
      "updatedAt": "2024-04-15T09:30:00Z",
      "status": "ACCEPT",
      "bankName": "Barclays Bank",
      "bankAddress": {
        "addressLine1": "1 Churchill Place",
        "city": "London",
        "countryIso": "GB",
        "postalCode": "E14 5HP"
      },
      "supportedRails": ["FPS", "SWIFT", "SEPA_CT"]
    }
  ]
}
```

#### **Crypto Account Example**

**Response:**

json

```
{
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "12"
  },
  "items": [
    {
      "accountId": "acc_99999",
      "name": "Bitcoin Wallet",
      "number": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
      "currencyCode": "BTC",
      "type": "CRYPTO_WALLET",
      "counterparty": {
        "id": "cp_33333",
        "name": "Crypto Ventures LLC",
        "phone": "+17864567890",
        "email": "info@cryptoventures.com"
      },
      "customer": {
        "id": "cust_44444",
        "name": "Michael Chen",
        "phone": "+16504561234",
        "email": "michael@example.com",
        "status": "ACCEPT"
      },
      "createdAt": "2024-02-28T11:15:00Z",
      "updatedAt": "2024-05-10T16:45:00Z",
      "status": "ACCEPT",
      "bankName": "Digital Asset Platform",
      "supportedRails": ["CRYPTO", "NFT"]
    }
  ]
}
```

#### **Account Under Moderation Example**

**Response:**

json

```
{
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "5"
  },
  "items": [
    {
      "accountId": "acc_55555",
      "name": "New Supplier Account",
      "number": "555666777",
      "currencyCode": "EUR",
      "type": "CHECKING",
      "counterparty": {
        "id": "cp_66666",
        "name": "Berlin Manufacturing GmbH",
        "phone": "+493012345678",
        "email": "finance@berlinmanufacturing.de"
      },
      "customer": {
        "id": "cust_77777",
        "name": "Global Imports Inc",
        "phone": "+13125551212",
        "email": "payments@globalimports.com",
        "status": "ACCEPT"
      },
      "createdAt": "2024-05-01T09:00:00Z",
      "updatedAt": "2024-05-18T14:20:00Z",
      "status": "MODERATION",
      "bankName": "Deutsche Bank",
      "bankAddress": {
        "addressLine1": "Taunusanlage 12",
        "city": "Frankfurt",
        "countryIso": "DE",
        "postalCode": "60325"
      },
      "supportedRails": ["SEPA_CT", "SWIFT"]
    }
  ]
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
2. **Invalid Parameters**:

   json

   ```
   { "error": "Invalid status value: INVALID_STATUS" }
   ```

***

### **Notes**

* **Search Functionality**: The `search` parameter searches across account name, number, counterparty name, and customer name
* **Status Filtering**: Use status to find accounts in specific verification states
* **Currency Support**: Filter by specific currencies or view all multi-currency accounts
* **Pagination**: Essential for large datasets - always check `meta.total` for result count
* **Real-time Status**: Account status reflects current verification state

**Common Use Cases**:

* Compliance auditing and verification tracking
* Payment processing eligibility checks
* Customer relationship management
* Multi-currency account overview

Real request:

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNzI4OTg5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.Txpfgr99OZ8vSeLU6o7YF6-rZBo81puftG8Gcp2rJ5c
accountId: string
counterpartyId: DkCSHAN-B9nW-HoakBCwCq36I
counterpartyName: string
currencyCode: string
customerId: Dnewcvn-euuI-vG0FZCRDjLXS
customerName: string
fromCreatedAt: string
meta.page: integer
meta.pageSize: integer
name: string
number: string
search: string
status: Not Set NEW AWAIT MODERATION ACCEPT REJECT BANNED VERIFICATION
select an option
toCreatedAt: string

```

Real response:

200 OK

```postman_json
{
  "meta": {
    "pageSize": 1,
    "page": 0,
    "total": "1"
  },
  "items": [
    {
      "accountId": "UDHW6vxOePli",
      "name": "Test Eugen USD",
      "number": "Test Eugen USD",
      "currencyCode": "USD",
      "type": "Fiat",
      "counterparty": {
        "id": "DkCSHAN-B9nW-HoakBCwCq36I",
        "name": "Test Eugen USD",
        "phone": "111",
        "email": "Test Eugen USD"
      },
      "customer": {
        "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "name": "Test Eugen Test Eugen",
        "phone": "",
        "email": "",
        "status": "NEW"
      },
      "createdAt": "2025-01-28T09:20:30Z",
      "updatedAt": "2025-02-21T12:57:19Z",
      "status": "ACCEPT",
      "bankName": "Test Eugen USD",
      "bankAddress": {
        "addressLine1": "Test Eugen USD",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Test Eugen USD",
        "stateIso": "Test Eugen USD",
        "countryIso": "Test Eugen USD",
        "postalCode": "Test Eugen USD",
        "unitNumber": "Test Eugen USD"
      },
      "supportedRails": [
        "SWIFT"
      ]
    }
  ]
}
```


# Get Account

Retrieves detailed information about a specific counterparty account, including comprehensive bank details, crypto wallet information, counterparty and customer relationships, and account status.

**Endpoint**

`GET/v2/counterparty/account/{accountId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_GetAccount>" %}

### **Request**

#### **Path Parameters**

| Parameter       | Type     | Description                             | Required | Example          |
| --------------- | -------- | --------------------------------------- | -------- | ---------------- |
| **`accountId`** | `string` | **Account ID** to retrieve details for. | Yes      | `"`UvYqyrDwqI`"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a complete account object with all associated details including bank information, crypto details, and relationship information.

#### **Response Fields**

**1. Account Information**

| Field              | Type     | Description                | Example                       |
| ------------------ | -------- | -------------------------- | ----------------------------- |
| **`accountId`**    | `string` | Unique account identifier. | `"UvYqyrDwqIn1"`              |
| **`currencyCode`** | `string` | Currency code (ISO 4217).  | `"USD"`                       |
| **`status`**       | `string` | Current account status.    | `"ACCEPT"`                    |
| **`name`**         | `string` | Account name/description.  | `"Business Checking Account"` |
| **`number`**       | `string` | Account number.            | `"123456789"`                 |
| **`type`**         | `string` | Account type.              | `"CHECKING"`                  |
| **`createdAt`**    | `string` | Creation timestamp.        | `"2024-01-15T10:30:00Z"`      |
| **`updatedAt`**    | `string` | Last update timestamp.     | `"2024-05-20T14:45:00Z"`      |

**2. Bank Object (Traditional Banking)**

| Field                    | Type     | Description          | Example        |
| ------------------------ | -------- | -------------------- | -------------- |
| **`bank.name`**          | `string` | Bank name.           | `"Chase Bank"` |
| **`bank.number`**        | `string` | Account number.      | `"123456789"`  |
| **`bank.routingNumber`** | `string` | Routing number (US). | `"021000021"`  |

**Bank Address Object**

| Field                           | Type     | Description      | Example             |
| ------------------------------- | -------- | ---------------- | ------------------- |
| **`bank.address.addressLine1`** | `string` | Primary address. | `"456 Bank Street"` |
| **`bank.address.addressLine2`** | `string` | Suite/floor.     | `"Floor 15"`        |
| **`bank.address.addressLine3`** | `string` | Additional info. | `"Main Office"`     |
| **`bank.address.city`**         | `string` | City.            | `"New York"`        |
| **`bank.address.stateIso`**     | `string` | State code.      | `"NY"`              |
| **`bank.address.countryIso`**   | `string` | Country code.    | `"US"`              |
| **`bank.address.postalCode`**   | `string` | Postal code.     | `"10002"`           |
| **`bank.address.unitNumber`**   | `string` | Unit number.     | `"1501"`            |

**3. Crypto Object (Cryptocurrency)**

| Field                | Type     | Description            | Example                                        |
| -------------------- | -------- | ---------------------- | ---------------------------------------------- |
| **`crypto.address`** | `string` | Crypto wallet address. | `"0x742d35Cc6634C0532925a3b8D6B3985f8e091be1"` |

**Crypto Additional Information**

| Field                                             | Type     | Description                | Allowed Values                                | Example             |
| ------------------------------------------------- | -------- | -------------------------- | --------------------------------------------- | ------------------- |
| **`crypto.additionalInformation.walletType`**     | `string` | Type of wallet.            | `CPW_INSTITUTION`, `CPW_OTHER`, `CPW_UNKNOWN` | `"CPW_INSTITUTION"` |
| **`crypto.additionalInformation.type`**           | `string` | Account type.              | `TYPE_CRYPTO`                                 | `"TYPE_CRYPTO"`     |
| **`crypto.additionalInformation.supportedRails`** | `array`  | Supported payment methods. | `CRYPTO`, `NFT`                               | `["CRYPTO"]`        |

**4. Fiat Object (Detailed Banking)**

| Field                    | Type     | Description              | Example              |
| ------------------------ | -------- | ------------------------ | -------------------- |
| **`fiat.number`**        | `string` | Account number.          | `"987654321"`        |
| **`fiat.ifsc`**          | `string` | IFSC code (India).       | `"SBIN0000001"`      |
| **`fiat.swift`**         | `string` | SWIFT/BIC code.          | `"CHASUS33"`         |
| **`fiat.sortCode`**      | `string` | Sort code (UK).          | `"40-30-20"`         |
| **`fiat.name`**          | `string` | Account name.            | `"Business Account"` |
| **`fiat.transitNumber`** | `string` | Transit number (Canada). | `"12345"`            |
| **`fiat.routingNumber`** | `string` | Routing number (US).     | `"021000021"`        |

**Fiat Additional Information**

| Field                                           | Type     | Description              | Allowed Values                       | Example              |
| ----------------------------------------------- | -------- | ------------------------ | ------------------------------------ | -------------------- |
| **`fiat.additionalInformation.type`**           | `string` | Regional account type.   | `TYPE_FIAT_US`, `TYPE_FIAT_GB`, etc. | `"TYPE_FIAT_US"`     |
| **`fiat.additionalInformation.supportedRails`** | `array`  | Supported payment rails. | `ACH`, `FEDWIRE`, `SWIFT`, etc.      | `["ACH", "FEDWIRE"]` |
| **`fiat.additionalInformation.accountType`**    | `string` | Account type.            | `CHECKING`, `SAVING`                 | `"CHECKING"`         |

**Intermediary Bank (for International Transfers)**

| Field                                                            | Type     | Description             | Example           |
| ---------------------------------------------------------------- | -------- | ----------------------- | ----------------- |
| **`fiat.additionalInformation.intermediary.bank.name`**          | `string` | Intermediary bank name. | `"Citibank N.A."` |
| **`fiat.additionalInformation.intermediary.bank.number`**        | `string` | Intermediary account.   | `"876543210"`     |
| **`fiat.additionalInformation.intermediary.bank.routingNumber`** | `string` | Intermediary routing.   | `"021000089"`     |

**5. Counterparty Object**

| Field                    | Type     | Description         | Example                      |
| ------------------------ | -------- | ------------------- | ---------------------------- |
| **`counterparty.id`**    | `string` | Counterparty ID.    | `"cp_67890"`                 |
| **`counterparty.name`**  | `string` | Counterparty name.  | `"Tech Supplies Corp"`       |
| **`counterparty.phone`** | `string` | Counterparty phone. | `"+19876543210"`             |
| **`counterparty.email`** | `string` | Counterparty email. | `"contact@techsupplies.com"` |

**6. Customer Object**

| Field                 | Type     | Description      | Example              |
| --------------------- | -------- | ---------------- | -------------------- |
| **`customer.id`**     | `string` | Customer ID.     | `"cust_12345"`       |
| **`customer.name`**   | `string` | Customer name.   | `"John Doe"`         |
| **`customer.phone`**  | `string` | Customer phone.  | `"+1234567890"`      |
| **`customer.email`**  | `string` | Customer email.  | `"john@example.com"` |
| **`customer.status`** | `string` | Customer status. | `"ACCEPT"`           |

### **Field Details**

#### **Account Status Values**

| Status             | Description                                   |
| ------------------ | --------------------------------------------- |
| **`NEW`**          | Account newly created, pending verification   |
| **`AWAIT`**        | Awaiting additional information/documentation |
| **`MODERATION`**   | Under review by compliance team               |
| **`ACCEPT`**       | Approved and active for transactions          |
| **`REJECT`**       | Rejected during verification                  |
| **`BANNED`**       | Permanently blocked from transactions         |
| **`VERIFICATION`** | In verification process                       |

#### **Supported Fiat Types**

| TYPE\_FIAT\_GB | United Kingdom       | UK banking system          |
| -------------- | -------------------- | -------------------------- |
| TYPE\_FIAT\_EU | European Union       | SEPA region                |
| TYPE\_FIAT\_IN | India                | Indian banking system      |
| TYPE\_FIAT\_CA | Canada               | Canadian banking           |
| TYPE\_FIAT\_SG | Singapore            | Singapore banking          |
| TYPE\_FIAT\_HK | Hong Kong            | Hong Kong banking          |
| TYPE\_CRYPTO   | Global               | Cryptocurrency network     |
| TYPE\_FIAT\_BS | Bahamas              | Bahamian banking system    |
| TYPE\_FIAT\_PA | Panama               | Panamanian banking system  |
| TYPE\_FIAT\_MY | Malaysia             | Malaysian banking system   |
| TYPE\_FIAT\_JP | Japan                | Japanese banking system    |
| TYPE\_FIAT\_CN | China                | Chinese banking system     |
| TYPE\_FIAT\_BR | Brazil               | Brazilian banking system   |
| TYPE\_FIAT\_AE | United Arab Emirates | UAE banking system         |
| TYPE\_FIAT\_CH | Switzerland          | Swiss banking system       |
| TYPE\_FIAT\_SA | Saudi Arabia         | Saudi banking system       |
| TYPE\_FIAT\_GT | Guatemala            | Guatemalan banking system  |
| TYPE\_FIAT\_QA | Qatar                | Qatari banking system      |
| TYPE\_FIAT\_BH | Bahrain              | Bahraini banking system    |
| TYPE\_FIAT\_CR | Costa Rica           | Costa Rican banking system |
| TYPE\_FIAT\_TR | Turkey               | Turkish banking system     |
| TYPE\_FIAT\_GL | Greenland            | Greenlandic banking system |
| TYPE\_FIAT\_PL | Poland               | Polish banking system      |
| TYPE\_FIAT\_MX | Mexico               | Mexican banking system     |

#### **Supported Payment Rails**

| Rail          | Description                  | Region |
| ------------- | ---------------------------- | ------ |
| **`ACH`**     | Automated Clearing House     | US     |
| **`FEDWIRE`** | Federal Wire Transfer        | US     |
| **`SWIFT`**   | International wire transfers | Global |
| **`SEPA_CT`** | SEPA Credit Transfer         | EU     |
| **`CRYPTO`**  | Cryptocurrency transfers     | Global |

***

### **Sender Data Availability by Payment Rail**

Sender/originator data completeness depends on what the sending bank and the rail itself transmit at the time the payment is initiated. Each rail has its own message format, and these formats differ in which fields are mandatory versus optional. Delos passes through and displays the data exactly as received from the sending bank/rail — nothing is withheld or lost during processing.

<table><thead><tr><th width="101.93359375">Rail</th><th width="119.75390625">Sender Name</th><th width="122.09765625">Account No. / IBAN</th><th width="116.00390625">BIC/SWIFT</th><th width="120.55078125">Routing/Sort Code</th><th>Sender Bank Name</th><th>Bank Address</th></tr></thead><tbody><tr><td><strong>SWIFT</strong></td><td>Guaranteed</td><td>Guaranteed</td><td>Best-effort</td><td>n/a</td><td>Best-effort</td><td>Best-effort</td></tr><tr><td><strong>SEPA_CT</strong></td><td>Guaranteed</td><td>Guaranteed (IBAN)</td><td>Best-effort</td><td>n/a</td><td>Best-effort</td><td>Best-effort</td></tr><tr><td><strong>UAEFTS</strong></td><td>Guaranteed</td><td>Guaranteed (IBAN)</td><td>Best-effort</td><td>n/a</td><td>Best-effort</td><td>Best-effort</td></tr><tr><td><strong>FPS</strong></td><td>Guaranteed</td><td>Guaranteed</td><td>Best-effort</td><td>Best-effort</td><td>Best-effort</td><td>Best-effort</td></tr><tr><td><strong>FEDWIRE</strong></td><td>Guaranteed</td><td>Guaranteed</td><td>Best-effort</td><td>Guaranteed (routing no.)</td><td>Guaranteed (intermediary)</td><td>Best-effort</td></tr><tr><td><strong>CRYPTO</strong></td><td>n/a¹</td><td>Guaranteed (wallet address)</td><td>n/a</td><td>n/a</td><td>n/a</td><td>n/a</td></tr></tbody></table>

¹ For crypto rails, there is no banking relationship involved, so there is no equivalent of a legal sender name. The "name" field is a fixed `{currency} Sender` label rather than actual sender data; the wallet address is the only reliable identifier.

**Guaranteed vs. best-effort, by rail:**

* Guaranteed across all fiat rails: sender name (account\_name) and account number/IBAN.
* Best-effort, and varies depending on the sending bank and rail: BIC, sender bank name, bank address. These fields are frequently not populated by the sending bank itself, particularly on SEPA, UAEFTS, and FPS.
* Fedwire is the exception — it consistently includes a routing number and a separately identified sender bank. This is a feature of how the Fedwire message format is structured, not something present on other rails.
* Crypto works fundamentally differently: there's no banking relationship involved at all, so the only reliable identifier is the sender's wallet address.

**What determines whether the data is present:**

* This depends on what the sending bank and the rail itself transmit at the time the payment is initiated. Fields like BIC or bank address are often optional in the message specification itself, so whether they're populated depends entirely on the sending bank's own practices.
* We pass through and display the data exactly as we receive it from the sending bank/rail, so what you see reflects what was actually transmitted to us.

### **Notes**

* **Account Verification**: Status indicates current verification state
* **Multi-format Support**: Accounts can have traditional bank, fiat, and/or crypto details
* **International Transfers**: Intermediary bank information required for certain cross-border payments
* **Compliance**: All accounts undergo verification based on regional regulations
* **Payment Rails**: Supported rails determine available transfer methods

**Common Use Cases**:

* Payment processing setup and verification
* Compliance and audit reporting
* Customer relationship management
* Multi-currency account management

#### Examples

Real request

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNzI5MTkzLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.kvjGbh4yRxE8qrD79710RiAM2spjqeSv6v0pJ9Pr7VY
accountId*: UDHW6vxOePli

```

Real response

```postman_json
{
  "item": {
    "accountId": "UDHW6vxOePli",
    "currencyCode": "USD",
    "status": "ACCEPT",
    "bank": {
      "name": "Test Eugen USD",
      "number": "Test Eugen USD",
      "address": {
        "addressLine1": "Test Eugen USD",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Test Eugen USD",
        "stateIso": "Test Eugen USD",
        "countryIso": "Test Eugen USD",
        "postalCode": "Test Eugen USD",
        "unitNumber": "Test Eugen USD"
      }
    },
    "name": "Test Eugen USD",
    "number": "Test Eugen USD",
    "type": "Fiat",
    "fiat": {
      "number": "Test Eugen USD",
      "ifsc": "1234",
      "swift": "Test Eugen USD",
      "sortCode": "",
      "name": "Test Eugen USD",
      "transitNumber": "Test Eugen USD",
      "routingNumber": "Test Eugen USD",
      "additionalInformation": {
        "type": "TYPE_FIAT",
        "supportedRails": [
          "SWIFT"
        ],
        "accountType": "CHECKING"
      },
      "accountNumberType": "ANT_NOTSET",
      "transitNumberCode": "TNC_NOTSET"
    },
    "counterparty": {
      "id": "DkCSHAN-B9nW-HoakBCwCq36I",
      "name": "Test Eugen USD",
      "phone": "111",
      "email": "Test Eugen USD"
    },
    "customer": {
      "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "name": "Test Eugen Test Eugen",
      "phone": "",
      "email": "",
      "status": "ACCEPT"
    },
    "createdAt": null,
    "updatedAt": null
  }
}
```


# Get counterparty

Retrieves detailed information about a specific counterparty, including complete profile information, customer relationship details, and all associated accounts with comprehensive banking and crypto information.

**Endpoint**

`GET/v2/counterparty/{counterpartyId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_Get>" %}

### **Request**

#### **Path Parameters**

| Parameter            | Type     | Description                                  | Required | Example      |
| -------------------- | -------- | -------------------------------------------- | -------- | ------------ |
| **`counterpartyId`** | `string` | **Counterparty ID** to retrieve details for. | Yes      | `"cp_12345"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a complete counterparty object with profile information, customer details, and all associated accounts.

#### **Response Fields**

**1. Main Counterparty Information**

| Field                | Type     | Description                     | Example                          |
| -------------------- | -------- | ------------------------------- | -------------------------------- |
| **`counterpartyId`** | `string` | Unique counterparty identifier. | `"cp_12345"`                     |
| **`description`**    | `string` | Counterparty description.       | `"Primary electronics supplier"` |
| **`createdAt`**      | `string` | Creation timestamp.             | `"2024-01-15T10:30:00Z"`         |
| **`updatedAt`**      | `string` | Last update timestamp.          | `"2024-05-20T14:45:00Z"`         |

**2. Profile Object**

| Field             | Type     | Required | Description                  | Example                      |
| ----------------- | -------- | -------- | ---------------------------- | ---------------------------- |
| **`name`**        | `string` | **Yes**  | Legal name.                  | `"Tech Supplies Corp"`       |
| **`email`**       | `string` | No       | Contact email.               | `"contact@techsupplies.com"` |
| **`phoneNumber`** | `string` | No       | Contact phone.               | `"+19876543210"`             |
| **`taxNumber`**   | `string` | No       | Tax ID number.               | `"TAX-US-12345"`             |
| **`dateOfBirth`** | `string` | No       | Date of birth/incorporation. | `"1985-05-15T00:00:00Z"`     |
| **`website`**     | `string` | No       | Company website.             | `"https://techsupplies.com"` |
| **`lastname`**    | `string` | No       | Last name (individuals).     | `"Smith"`                    |

**3. Address Object**

| Field              | Type     | Required | Description      | Example             |
| ------------------ | -------- | -------- | ---------------- | ------------------- |
| **`addressLine1`** | `string` | **Yes**  | Primary address. | `"123 Main Street"` |
| **`addressLine2`** | `string` | No       | Suite/floor.     | `"Suite 500"`       |
| **`addressLine3`** | `string` | No       | Additional info. | `"Building B"`      |
| **`city`**         | `string` | No       | City.            | `"New York"`        |
| **`stateIso`**     | `string` | No       | State code.      | `"NY"`              |
| **`countryIso`**   | `string` | No       | Country code.    | `"US"`              |
| **`postalCode`**   | `string` | No       | Postal code.     | `"10001"`           |
| **`unitNumber`**   | `string` | No       | Unit number.     | `"5A"`              |

**4. AdditionalInfo Object**

| Field              | Type     | Description            | Allowed Values                       | Example                             |
| ------------------ | -------- | ---------------------- | ------------------------------------ | ----------------------------------- |
| **`type`**         | `string` | Legal structure.       | `INDIVIDUAL`, `CORPORATION`          | `"CORPORATION"`                     |
| **`businessLine`** | `string` | Industry type.         | `PLB_AUTOMOTIVE`, `PLB_RETAIL`, etc. | `"PLB_HIGH_TECH_SOFTWARE_TELECOMS"` |
| **`relationship`** | `string` | Business relationship. | `PRC_SUPPLIER`, `PRC_CUSTOMER`, etc. | `"PRC_SUPPLIER"`                    |

**5. Customer Object**

| Field        | Type     | Description      | Example              |
| ------------ | -------- | ---------------- | -------------------- |
| **`id`**     | `string` | Customer ID.     | `"cust_12345"`       |
| **`name`**   | `string` | Customer name.   | `"John Doe"`         |
| **`email`**  | `string` | Customer email.  | `"john@example.com"` |
| **`phone`**  | `string` | Customer phone.  | `"+1234567890"`      |
| **`status`** | `string` | Customer status. | `"ACCEPT"`           |

**6. Accounts Array**

Array of all accounts associated with this counterparty.

| Field              | Type     | Description                    | Example                       |
| ------------------ | -------- | ------------------------------ | ----------------------------- |
| **`accountId`**    | `string` | Unique account identifier.     | `"acc_12345"`                 |
| **`currencyCode`** | `string` | Currency code (ISO 4217).      | `"USD"`                       |
| **`status`**       | `string` | Account status.                | `"ACCEPT"`                    |
| **`name`**         | `string` | Account name/description.      | `"Business Checking Account"` |
| **`number`**       | `string` | Account number.                | `"123456789"`                 |
| **`type`**         | `string` | Account type.                  | `"CHECKING"`                  |
| **`createdAt`**    | `string` | Account creation timestamp.    | `"2024-01-15T10:30:00Z"`      |
| **`updatedAt`**    | `string` | Account last update timestamp. | `"2024-05-20T14:45:00Z"`      |

**Bank Account Details**

| Field                    | Type     | Description     | Example        |
| ------------------------ | -------- | --------------- | -------------- |
| **`bank.name`**          | `string` | Bank name.      | `"Chase Bank"` |
| **`bank.number`**        | `string` | Account number. | `"123456789"`  |
| **`bank.routingNumber`** | `string` | Routing number. | `"021000021"`  |

**Crypto Account Details**

| Field                                             | Type     | Description                | Example                                        |
| ------------------------------------------------- | -------- | -------------------------- | ---------------------------------------------- |
| **`crypto.address`**                              | `string` | Crypto wallet address.     | `"0x742d35Cc6634C0532925a3b8D6B3985f8e091be1"` |
| **`crypto.additionalInformation.walletType`**     | `string` | Wallet type.               | `"CPW_INSTITUTION"`                            |
| **`crypto.additionalInformation.type`**           | `string` | Account type.              | `"TYPE_CRYPTO"`                                |
| **`crypto.additionalInformation.supportedRails`** | `array`  | Supported payment methods. | `["CRYPTO"]`                                   |

**Fiat Account Details**

| Field                                        | Type     | Description     | Example       |
| -------------------------------------------- | -------- | --------------- | ------------- |
| **`fiat.number`**                            | `string` | Account number. | `"987654321"` |
| **`fiat.swift`**                             | `string` | SWIFT/BIC code. | `"CHASUS33"`  |
| **`fiat.routingNumber`**                     | `string` | Routing number. | `"021000021"` |
| **`fiat.additionalInformation.accountType`** | `string` | Account type.   | `"CHECKING"`  |

**Example Response:**

json

```
{
  "item": {
    "counterpartyId": "cp_12345",
    "description": "Primary electronics supplier",
    "profile": {
      "name": "Tech Supplies Corp",
      "email": "contact@techsupplies.com",
      "phoneNumber": "+19876543210",
      "taxNumber": "TAX-US-12345",
      "dateOfBirth": "1985-05-15T00:00:00Z",
      "address": {
        "addressLine1": "123 Main Street",
        "addressLine2": "Suite 500",
        "addressLine3": "Building B",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10001",
        "unitNumber": "5A"
      },
      "website": "https://techsupplies.com",
      "additionalInfo": {
        "type": "CORPORATION",
        "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
        "relationship": "PRC_SUPPLIER"
      },
      "lastname": "Smith"
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-05-20T14:45:00Z",
    "customer": {
      "id": "cust_12345",
      "name": "John Doe",
      "email": "john@example.com",
      "phone": "+1234567890",
      "status": "ACCEPT"
    }
  },
  "accounts": [
    {
      "accountId": "acc_12345",
      "currencyCode": "USD",
      "status": "ACCEPT",
      "bank": {
        "name": "Chase Bank",
        "number": "123456789",
        "address": {
          "addressLine1": "456 Bank Street",
          "city": "New York",
          "stateIso": "NY",
          "countryIso": "US",
          "postalCode": "10002"
        },
        "routingNumber": "021000021"
      },
      "name": "Business Checking Account",
      "number": "123456789",
      "type": "CHECKING",
      "fiat": {
        "number": "123456789",
        "routingNumber": "021000021",
        "additionalInformation": {
          "type": "TYPE_FIAT_US",
          "supportedRails": ["ACH", "FEDWIRE"],
          "accountType": "CHECKING"
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z"
    },
    {
      "accountId": "acc_67890",
      "currencyCode": "BTC",
      "status": "ACCEPT",
      "name": "Bitcoin Wallet",
      "number": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
      "type": "CRYPTO_WALLET",
      "crypto": {
        "address": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
        "additionalInformation": {
          "walletType": "CPW_INSTITUTION",
          "type": "TYPE_CRYPTO",
          "supportedRails": ["CRYPTO"]
        }
      },
      "createdAt": "2024-02-15T14:20:00Z",
      "updatedAt": "2024-05-18T09:15:00Z"
    }
  ]
}
```

***

### **Field Details**

#### **Account Status Values**

| Status             | Description                                   |
| ------------------ | --------------------------------------------- |
| **`NEW`**          | Account newly created, pending verification   |
| **`AWAIT`**        | Awaiting additional information/documentation |
| **`MODERATION`**   | Under review by compliance team               |
| **`ACCEPT`**       | Approved and active for transactions          |
| **`REJECT`**       | Rejected during verification                  |
| **`BANNED`**       | Permanently blocked from transactions         |
| **`VERIFICATION`** | In verification process                       |

#### **Customer Status Values**

| Status                     | Description                 |
| -------------------------- | --------------------------- |
| **`NEW`**                  | Customer newly created      |
| **`READY_FOR_MODERATION`** | Ready for compliance review |
| **`MODERATED`**            | Under moderation            |
| **`VERIFY`**               | In verification process     |
| **`ACCEPT`**               | Approved and active         |
| **`REJECT`**               | Rejected                    |
| **`BANNED`**               | Permanently blocked         |

#### **Business Line Examples**

| Business Line                              | Description                       |
| ------------------------------------------ | --------------------------------- |
| **`PLB_HIGH_TECH_SOFTWARE_TELECOMS`**      | Technology and telecommunications |
| **`PLB_FINANCIAL_AND_CORPORATE_SERVICES`** | Financial services                |
| **`PLB_MANUFACTURING`**                    | Manufacturing industry            |
| **`PLB_RETAIL`**                           | Retail businesses                 |
| **`PLB_CONSULTING_PROFESSIONAL_SERVICES`** | Professional services             |

#### **Relationship Types**

| Relationship               | Description                  |
| -------------------------- | ---------------------------- |
| **`PRC_SUPPLIER`**         | Vendor/supplier relationship |
| **`PRC_CUSTOMER`**         | Client/customer relationship |
| **`PRC_BUSINESS_PARTNER`** | Strategic business partner   |
| **`PRC_EMPLOYEE`**         | Employee relationship        |
| **`PRC_NOT_RELATED`**      | No specific relationship     |

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/counterparty/cp_12345' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Individual Counterparty Example**

**Response:**

json

```
{
  "item": {
    "counterpartyId": "cp_67890",
    "description": "Freelance consultant",
    "profile": {
      "name": "Jane",
      "email": "jane@consulting.com",
      "phoneNumber": "+449876543210",
      "taxNumber": "UK123456789",
      "dateOfBirth": "1990-08-20T00:00:00Z",
      "address": {
        "addressLine1": "45 Park Lane",
        "addressLine2": "Flat 3B",
        "city": "London",
        "countryIso": "GB",
        "postalCode": "W1K 7AA"
      },
      "website": "https://janeconsulting.com",
      "additionalInfo": {
        "type": "INDIVIDUAL",
        "businessLine": "PLB_CONSULTING_PROFESSIONAL_SERVICES",
        "relationship": "PRC_BUSINESS_PARTNER"
      },
      "lastname": "Smith"
    },
    "createdAt": "2024-03-10T14:20:00Z",
    "updatedAt": "2024-05-15T09:30:00Z",
    "customer": {
      "id": "cust_22222",
      "name": "Sarah Wilson",
      "email": "sarah@example.com",
      "phone": "+447123456789",
      "status": "ACCEPT"
    }
  },
  "accounts": [
    {
      "accountId": "acc_77777",
      "currencyCode": "GBP",
      "status": "ACCEPT",
      "name": "Personal Current Account",
      "number": "98765432",
      "type": "CHECKING",
      "fiat": {
        "number": "98765432",
        "sortCode": "40-30-20",
        "additionalInformation": {
          "type": "TYPE_FIAT_GB",
          "supportedRails": ["FPS", "SWIFT"],
          "accountType": "CHECKING"
        }
      },
      "createdAt": "2024-03-10T14:20:00Z",
      "updatedAt": "2024-04-15T09:30:00Z"
    }
  ]
}
```

#### **Counterparty with Multiple Accounts Example**

**Response:**

json

```
{
  "item": {
    "counterpartyId": "cp_99999",
    "description": "International trading partner",
    "profile": {
      "name": "Global Imports Ltd",
      "email": "finance@globalimports.com",
      "phoneNumber": "+442076543210",
      "taxNumber": "GB123456789",
      "address": {
        "addressLine1": "1 Canada Square",
        "city": "London",
        "countryIso": "GB",
        "postalCode": "E14 5AB"
      },
      "additionalInfo": {
        "type": "CORPORATION",
        "businessLine": "PLB_RETAIL",
        "relationship": "PRC_SUPPLIER"
      }
    },
    "createdAt": "2024-02-01T09:00:00Z",
    "updatedAt": "2024-05-10T16:30:00Z",
    "customer": {
      "id": "cust_33333",
      "name": "International Trade Corp",
      "email": "payments@intltrade.com",
      "phone": "+13125551212",
      "status": "ACCEPT"
    }
  },
  "accounts": [
    {
      "accountId": "acc_88888",
      "currencyCode": "USD",
      "status": "ACCEPT",
      "name": "USD Business Account",
      "number": "400500600",
      "type": "CHECKING",
      "fiat": {
        "number": "400500600",
        "swift": "CITIUS33",
        "additionalInformation": {
          "type": "TYPE_FIAT_US",
          "supportedRails": ["ACH", "FEDWIRE", "SWIFT"],
          "accountType": "CHECKING"
        }
      },
      "createdAt": "2024-02-01T09:00:00Z",
      "updatedAt": "2024-03-15T11:20:00Z"
    },
    {
      "accountId": "acc_99999",
      "currencyCode": "EUR",
      "status": "ACCEPT",
      "name": "Euro Account",
      "number": "DE89370400440532013000",
      "type": "CHECKING",
      "fiat": {
        "number": "DE89370400440532013000",
        "swift": "DEUTDEFF",
        "additionalInformation": {
          "type": "TYPE_FIAT_EU",
          "supportedRails": ["SEPA_CT", "SWIFT"],
          "accountType": "CHECKING"
        }
      },
      "createdAt": "2024-02-15T14:30:00Z",
      "updatedAt": "2024-04-20T10:45:00Z"
    }
  ]
}
```

***

### **Error Responses**

1. **Counterparty Not Found**:

   json

   ```
   { "error": "Counterparty not found: cp_99999" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Complete Profile**: Returns all counterparty details including profile, addresses, and relationships
* **Account Relationships**: Includes all accounts associated with the counterparty
* **Multi-Currency Support**: Counterparties can have accounts in multiple currencies
* **Status Tracking**: Both counterparty and account statuses are included for compliance tracking
* **Audit Trail**: Creation and update timestamps provide complete audit history

**Common Use Cases**:

* Due diligence and KYC verification
* Payment processing setup
* Relationship management
* Compliance reporting
* Multi-account management

Real reply

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNzI5MzA3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.ZN7xLzRxRUn-bK67tmoKVcRj-uFwGpYtrQh_LcN0hWE
counterpartyId*: DkCSHAN-B9nW-HoakBCwCq36I

```

Real response

```postman_json
{
  "item": {
    "counterpartyId": "DkCSHAN-B9nW-HoakBCwCq36I",
    "description": "",
    "profile": {
      "name": "Test Eugen USD",
      "email": "Test Eugen USD",
      "phoneNumber": "111",
      "taxNumber": "Test Eugen USD",
      "dateOfBirth": "1970-01-01T00:00:00Z",
      "address": {
        "addressLine1": "Test Eugen USD",
        "addressLine2": "Test Eugen USD",
        "addressLine3": "Test Eugen USD",
        "city": "Test Eugen USD",
        "stateIso": "Test Eugen USD",
        "countryIso": "Test Eugen USD",
        "postalCode": "Test Eugen USD",
        "unitNumber": "Test Eugen USD"
      },
      "website": "Test Eugen USD",
      "additionalInfo": {
        "type": "INDIVIDUAL",
        "businessLine": "PLB_TECHNICAL_SUPPORT",
        "relationship": "PRC_SPOUSE"
      },
      "lastname": ""
    },
    "createdAt": "2025-01-28T09:03:54Z",
    "updatedAt": "2025-01-28T12:19:35Z",
    "customer": {
      "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "name": "Test Eugen Test Eugen",
      "email": "",
      "phone": "",
      "status": "ACCEPT"
    }
  },
  "accounts": [
    {
      "accountId": "UDHW6vxOePli",
      "currencyCode": "USD",
      "status": "ACCEPT",
      "bank": {
        "name": "Test Eugen USD",
        "number": "Test Eugen USD",
        "address": {
          "addressLine1": "Test Eugen USD",
          "addressLine2": "",
          "addressLine3": "",
          "city": "Test Eugen USD",
          "stateIso": "Test Eugen USD",
          "countryIso": "Test Eugen USD",
          "postalCode": "Test Eugen USD",
          "unitNumber": "Test Eugen USD"
        }
      },
      "name": "Test Eugen USD",
      "number": "Test Eugen USD",
      "type": "Fiat",
      "fiat": {
        "number": "Test Eugen USD",
        "ifsc": "1234",
        "swift": "Test Eugen USD",
        "sortCode": "",
        "name": "Test Eugen USD",
        "transitNumber": "Test Eugen USD",
        "routingNumber": "Test Eugen USD",
        "additionalInformation": {
          "type": "TYPE_FIAT",
          "supportedRails": [
            "SWIFT"
          ],
          "accountType": "CHECKING"
        },
        "accountNumberType": "ANT_NOTSET",
        "transitNumberCode": "TNC_NOTSET"
      },
      "createdAt": null,
      "updatedAt": null
    }
  ]
}
```


# Update counterparty

Updates an existing counterparty's information including profile details, addresses, business relationships, and associated accounts.

This endpoint supports partial updates - only include the fields you want to modify.

**Endpoint**

`PATCH/v2/counterparty/{counterpartyId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_Update>" %}

### **Request**

#### **Path Parameters**

| Parameter            | Type     | Description                    | Required | Example      |
| -------------------- | -------- | ------------------------------ | -------- | ------------ |
| **`counterpartyId`** | `string` | **Counterparty ID** to update. | Yes      | `"cp_12345"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Content-Type`**  | `application/json` | Yes      |
| **`Accept`**        | `application/json` | Yes      |

#### **Request Body**

All fields are optional - only include fields that need to be updated.

json

```
{
  "description": "Updated description for primary electronics supplier",
  "profile": {
    "name": "Tech Supplies Corp Updated",
    "email": "updated-contact@techsupplies.com",
    "phoneNumber": "+19876543211",
    "taxNumber": "TAX-US-12345-UPDATED",
    "dateOfBirth": "1985-05-15T00:00:00Z",
    "address": {
      "addressLine1": "456 Updated Street",
      "addressLine2": "Suite 600",
      "city": "New York",
      "stateIso": "NY",
      "countryIso": "US",
      "postalCode": "10002"
    },
    "website": "https://updated.techsupplies.com",
    "additionalInfo": {
      "type": "CORPORATION",
      "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
      "relationship": "PRC_SUPPLIER"
    },
    "lastname": "Smith"
  },
  "accounts": [
    {
      "accountId": "acc_12345",
      "currencyCode": "USD",
      "bank": {
        "name": "Updated Bank Name",
        "number": "987654321",
        "address": {
          "addressLine1": "789 Bank Avenue",
          "city": "New York",
          "stateIso": "NY",
          "countryIso": "US",
          "postalCode": "10003"
        },
        "routingNumber": "021000022"
      },
      "fiat": {
        "number": "987654321",
        "routingNumber": "021000022",
        "additionalInformation": {
          "type": "TYPE_FIAT_US",
          "supportedRails": ["ACH", "FEDWIRE", "SWIFT"],
          "accountType": "CHECKING"
        }
      }
    }
  ]
}
```

***

### **Request Fields**

**1. Main Counterparty Fields**

| Field             | Type     | Required | Description                       | Example                          |
| ----------------- | -------- | -------- | --------------------------------- | -------------------------------- |
| **`description`** | `string` | No       | Updated counterparty description. | `"Updated supplier description"` |

**2. Profile Object**

| Field             | Type     | Required | Description                          | Example                  |
| ----------------- | -------- | -------- | ------------------------------------ | ------------------------ |
| **`name`**        | `string` | No       | Updated legal name.                  | `"Updated Corp Name"`    |
| **`email`**       | `string` | No       | Updated contact email.               | `"updated@example.com"`  |
| **`phoneNumber`** | `string` | No       | Updated contact phone.               | `"+19876543211"`         |
| **`taxNumber`**   | `string` | No       | Updated tax ID number.               | `"TAX-UPDATED-123"`      |
| **`dateOfBirth`** | `string` | No       | Updated date of birth/incorporation. | `"1985-05-15T00:00:00Z"` |
| **`website`**     | `string` | No       | Updated company website.             | `"https://updated.com"`  |
| **`lastname`**    | `string` | No       | Updated last name (individuals).     | `"Updated Lastname"`     |

**3. Address Object**

| Field              | Type     | Required | Description              | Example                |
| ------------------ | -------- | -------- | ------------------------ | ---------------------- |
| **`addressLine1`** | `string` | No       | Updated primary address. | `"456 Updated Street"` |
| **`addressLine2`** | `string` | No       | Updated suite/floor.     | `"Suite 600"`          |
| **`addressLine3`** | `string` | No       | Updated additional info. | `"Building C"`         |
| **`city`**         | `string` | No       | Updated city.            | `"New York"`           |
| **`stateIso`**     | `string` | No       | Updated state code.      | `"NY"`                 |
| **`countryIso`**   | `string` | No       | Updated country code.    | `"US"`                 |
| **`postalCode`**   | `string` | No       | Updated postal code.     | `"10002"`              |
| **`unitNumber`**   | `string` | No       | Updated unit number.     | `"6B"`                 |

**4. AdditionalInfo Object**

| Field              | Type     | Description                    | Allowed Values                       | Example                             |
| ------------------ | -------- | ------------------------------ | ------------------------------------ | ----------------------------------- |
| **`type`**         | `string` | Updated legal structure.       | `INDIVIDUAL`, `CORPORATION`          | `"CORPORATION"`                     |
| **`businessLine`** | `string` | Updated industry type.         | `PLB_AUTOMOTIVE`, `PLB_RETAIL`, etc. | `"PLB_HIGH_TECH_SOFTWARE_TELECOMS"` |
| **`relationship`** | `string` | Updated business relationship. | `PRC_SUPPLIER`, `PRC_CUSTOMER`, etc. | `"PRC_SUPPLIER"`                    |

**5. Accounts Array**

Update existing accounts or add new ones. **Required fields for account updates:** `accountId`, `currencyCode`

| Field              | Type     | Required | Description                    | Example       |
| ------------------ | -------- | -------- | ------------------------------ | ------------- |
| **`accountId`**    | `string` | **Yes**  | Existing account ID to update. | `"acc_12345"` |
| **`currencyCode`** | `string` | **Yes**  | Currency code (ISO 4217).      | `"USD"`       |

**Bank Account Updates**

| Field                    | Type     | Required | Description             | Example          |
| ------------------------ | -------- | -------- | ----------------------- | ---------------- |
| **`bank.name`**          | `string` | No       | Updated bank name.      | `"Updated Bank"` |
| **`bank.number`**        | `string` | No       | Updated account number. | `"987654321"`    |
| **`bank.routingNumber`** | `string` | No       | Updated routing number. | `"021000022"`    |

**Crypto Account Updates**

| Field                                         | Type     | Required | Description                    | Example                 |
| --------------------------------------------- | -------- | -------- | ------------------------------ | ----------------------- |
| **`crypto.address`**                          | `string` | No       | Updated crypto wallet address. | `"0xupdatedAddress..."` |
| **`crypto.additionalInformation.walletType`** | `string` | No       | Updated wallet type.           | `"CPW_INSTITUTION"`     |

**Fiat Account Updates**

| Field                                        | Type     | Required | Description             | Example        |
| -------------------------------------------- | -------- | -------- | ----------------------- | -------------- |
| **`fiat.number`**                            | `string` | No       | Updated account number. | `"987654321"`  |
| **`fiat.swift`**                             | `string` | No       | Updated SWIFT code.     | `"UPDATEDBIC"` |
| **`fiat.routingNumber`**                     | `string` | No       | Updated routing number. | `"021000022"`  |
| **`fiat.additionalInformation.accountType`** | `string` | No       | Updated account type.   | `"SAVING"`     |

***

### **Response (200 OK)**

Returns the updated counterparty object with all current information.

**Example Response:**

json

```
{
  "item": {
    "counterpartyId": "cp_12345",
    "customerId": "cust_12345",
    "description": "Updated description for primary electronics supplier",
    "profile": {
      "name": "Tech Supplies Corp Updated",
      "email": "updated-contact@techsupplies.com",
      "phoneNumber": "+19876543211",
      "taxNumber": "TAX-US-12345-UPDATED",
      "dateOfBirth": "1985-05-15T00:00:00Z",
      "address": {
        "addressLine1": "456 Updated Street",
        "addressLine2": "Suite 600",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10002"
      },
      "website": "https://updated.techsupplies.com",
      "additionalInfo": {
        "type": "CORPORATION",
        "businessLine": "PLB_HIGH_TECH_SOFTWARE_TELECOMS",
        "relationship": "PRC_SUPPLIER"
      },
      "lastname": "Smith"
    },
    "accounts": [
      {
        "accountId": "acc_12345",
        "currencyCode": "USD",
        "status": "ACCEPT",
        "bank": {
          "name": "Updated Bank Name",
          "number": "987654321",
          "address": {
            "addressLine1": "789 Bank Avenue",
            "city": "New York",
            "stateIso": "NY",
            "countryIso": "US",
            "postalCode": "10003"
          },
          "routingNumber": "021000022"
        },
        "fiat": {
          "number": "987654321",
          "routingNumber": "021000022",
          "additionalInformation": {
            "type": "TYPE_FIAT_US",
            "supportedRails": ["ACH", "FEDWIRE", "SWIFT"],
            "accountType": "CHECKING"
          }
        }
      }
    ],
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-05-21T14:20:00Z",
    "customerName": "John Doe"
  }
}
```

***

### **Response Fields**

| Field                        | Type     | Description                                | Example                    |
| ---------------------------- | -------- | ------------------------------------------ | -------------------------- |
| **`item.counterpartyId`**    | `string` | Counterparty ID (unchanged).               | `"cp_12345"`               |
| **`item.customerId`**        | `string` | Customer ID (unchanged).                   | `"cust_12345"`             |
| **`item.customerName`**      | `string` | Customer name (auto-populated).            | `"John Doe"`               |
| **`item.updatedAt`**         | `string` | New update timestamp.                      | `"2024-05-21T14:20:00Z"`   |
| **`item.accounts[].status`** | `string` | Account status (may change after updates). | `"ACCEPT"`, `"MODERATION"` |

***

### **Examples**

#### **Request**

bash

```
curl -X PATCH 'https://stagep.tst-apidmndelss.com/v2/counterparty/cp_12345' \
  -H 'Authorization: 123' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "description": "Updated supplier with new contact information",
    "profile": {
      "phoneNumber": "+19876543211",
      "email": "new-contact@supplier.com"
    }
  }'
```

#### **Minimal Update Example**

**Request (update only phone number):**

json

```
{
  "profile": {
    "phoneNumber": "+449876543210"
  }
}
```

**Response:**

json

```
{
  "item": {
    "counterpartyId": "cp_67890",
    "customerId": "cust_22222",
    "description": "Freelance consultant",
    "profile": {
      "name": "Jane",
      "email": "jane@consulting.com",
      "phoneNumber": "+449876543210",
      "taxNumber": "UK123456789",
      "address": {
        "addressLine1": "45 Park Lane",
        "addressLine2": "Flat 3B",
        "city": "London",
        "countryIso": "GB",
        "postalCode": "W1K 7AA"
      },
      "additionalInfo": {
        "type": "INDIVIDUAL",
        "businessLine": "PLB_CONSULTING_PROFESSIONAL_SERVICES",
        "relationship": "PRC_BUSINESS_PARTNER"
      },
      "lastname": "Smith"
    },
    "accounts": [
      {
        "accountId": "acc_77777",
        "currencyCode": "GBP",
        "status": "ACCEPT",
        "fiat": {
          "number": "98765432",
          "sortCode": "40-30-20",
          "additionalInformation": {
            "type": "TYPE_FIAT_GB",
            "supportedRails": ["FPS", "SWIFT"],
            "accountType": "CHECKING"
          }
        }
      }
    ],
    "createdAt": "2024-03-10T14:20:00Z",
    "updatedAt": "2024-05-21T15:30:00Z",
    "customerName": "Sarah Wilson"
  }
}
```

#### **Account Update Example**

**Request (update bank account details):**

json

```
{
  "accounts": [
    {
      "accountId": "acc_88888",
      "currencyCode": "USD",
      "bank": {
        "name": "New Bank Name",
        "number": "555666777",
        "routingNumber": "021000033"
      },
      "fiat": {
        "number": "555666777",
        "routingNumber": "021000033",
        "additionalInformation": {
          "type": "TYPE_FIAT_US",
          "supportedRails": ["ACH", "FEDWIRE"],
          "accountType": "SAVING"
        }
      }
    }
  ]
}
```

#### **Add Crypto Account Example**

**Request (add new crypto account):**

json

```
{
  "accounts": [
    {
      "accountId": "acc_99999",
      "currencyCode": "BTC",
      "crypto": {
        "address": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
        "additionalInformation": {
          "walletType": "CPW_INSTITUTION",
          "type": "TYPE_CRYPTO",
          "supportedRails": ["CRYPTO"]
        }
      }
    }
  ]
}
```

***

### **Error Responses**

1. **Counterparty Not Found**:

   json

   ```
   { "error": "Counterparty not found: cp_99999" }
   ```
2. **Account Not Found**:

   json

   ```
   { "error": "Account not found: acc_99999" }
   ```
3. **Validation Error**:

   json

   ```
   { "error": "Invalid currency code: INVALID_CURRENCY" }
   ```
4. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Partial Updates**: Only include fields that need to be changed
* **Account Updates**: Use existing `accountId` to update accounts; new accounts without ID will be created
* **Status Impact**: Account updates may trigger re-verification (status change to `MODERATION`)
* **Audit Trail**: `updatedAt` timestamp reflects when changes were applied
* **Field Validation**: All updated fields undergo the same validation as creation

**Update Scenarios**:

* Contact information changes
* Address updates
* Business relationship modifications
* Account detail corrections
* Adding new payment methods/accounts


# Create counterparty account

Creates a new bank or cryptocurrency account for an existing counterparty. This allows counterparties to have multiple accounts in different currencies and payment methods.

**Endpoint**

&#x20;`POST/v2/counterparty/{counterpartyId}/account`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_CreateAccount>" %}

### **Request**

#### **Path Parameters**

| Parameter            | Type     | Description                            | Required | Example      |
| -------------------- | -------- | -------------------------------------- | -------- | ------------ |
| **`counterpartyId`** | `string` | **Counterparty ID** to add account to. | Yes      | `"cp_12345"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Content-Type`**  | `application/json` | Yes      |
| **`Accept`**        | `application/json` | Yes      |

#### **Request Body**

**Required field:** `item.currencyCode`

json

```
{
  "item": {
    "currencyCode": "USD",
    "status": "NEW",
    "bank": {
      "name": "Chase Bank",
      "number": "123456789",
      "address": {
        "addressLine1": "456 Bank Street",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10002"
      },
      "routingNumber": "021000021"
    },
    "fiat": {
      "number": "123456789",
      "routingNumber": "021000021",
      "additionalInformation": {
        "type": "TYPE_FIAT_US",
        "supportedRails": ["ACH", "FEDWIRE"],
        "accountType": "CHECKING"
      }
    }
  }
}
```

***

### **Request Fields**

**1. Main Account Fields**

| Field              | Type     | Required | Description               | Example |
| ------------------ | -------- | -------- | ------------------------- | ------- |
| **`currencyCode`** | `string` | **Yes**  | Currency code (ISO 4217). | `"USD"` |
| **`status`**       | `string` | No       | Initial account status.   | `"NEW"` |

**2. Bank Object (Traditional Banking)**

| Field                    | Type     | Required | Description          | Example        |
| ------------------------ | -------- | -------- | -------------------- | -------------- |
| **`bank.name`**          | `string` | **Yes**  | Bank name.           | `"Chase Bank"` |
| **`bank.number`**        | `string` | **Yes**  | Account number.      | `"123456789"`  |
| **`bank.routingNumber`** | `string` | **Yes**  | Routing number (US). | `"021000021"`  |

**Bank Address Object**

| Field                           | Type     | Required | Description                                                                                   | Example             |
| ------------------------------- | -------- | -------- | --------------------------------------------------------------------------------------------- | ------------------- |
| **`bank.address.addressLine1`** | `string` | Yes      | Primary address, 30 symbols max, no special characters, 30 symbols max, no special characters | `"456 Bank Street"` |
| **`bank.address.addressLine2`** | `string` | Yes      | Suite/floor, 30 symbols max, no special characters                                            | `"Floor 15"`        |
| **`bank.address.city`**         | `string` | Yes      | City, no special characters                                                                   | `"New York"`        |
| **`bank.address.stateIso`**     | `string` | Yes      | State code.                                                                                   | `"NY"`              |
| **`bank.address.countryIso`**   | `string` | Yes      | Country code.                                                                                 | `"US"`              |
| **`bank.address.postalCode`**   | `string` | Yes      | Postal code.                                                                                  | `"10002"`           |

**3. Crypto Object (Cryptocurrency)**

| Field                | Type     | Required | Description            | Example                                        |
| -------------------- | -------- | -------- | ---------------------- | ---------------------------------------------- |
| **`crypto.address`** | `string` | Yes      | Crypto wallet address. | `"0x742d35Cc6634C0532925a3b8D6B3985f8e091be1"` |

**Crypto Additional Information**

| Field                                             | Type     | Required | Description                | Allowed Values                                | Example             |
| ------------------------------------------------- | -------- | -------- | -------------------------- | --------------------------------------------- | ------------------- |
| **`crypto.additionalInformation.walletType`**     | `string` | Yes      | Type of wallet.            | `CPW_INSTITUTION`, `CPW_OTHER`, `CPW_UNKNOWN` | `"CPW_INSTITUTION"` |
| **`crypto.additionalInformation.type`**           | `string` | Yes      | Account type.              | `TYPE_CRYPTO`                                 | `"TYPE_CRYPTO"`     |
| **`crypto.additionalInformation.supportedRails`** | `array`  | Yes      | Supported payment methods. | `CRYPTO`, `NFT`                               | `["CRYPTO"]`        |

**4. Fiat Object (Detailed Banking)**

| Field                    | Type     | Required                              | Description              | Example              |
| ------------------------ | -------- | ------------------------------------- | ------------------------ | -------------------- |
| **`fiat.number`**        | `string` | Yes                                   | Account number.          | `"123456789"`        |
| **`fiat.swift`**         | `string` | Required only for SWIFT, UAEFTS, SEPA | SWIFT/BIC code.          | `"CHASUS33"`         |
| **`fiat.sortCode`**      | `string` | No                                    | Sort code (UK).          | `"40-30-20"`         |
| **`fiat.name`**          | `string` | No                                    | Account name.            | `"Business Account"` |
| **`fiat.transitNumber`** | `string` | No                                    | Transit number (Canada). | `"12345"`            |
| **`fiat.routingNumber`** | `string` | No                                    | Routing number (US).     | `"021000021"`        |

**Fiat Additional Information**

| Field                                           | Type     | Required | Description              | Allowed Values                       | Example              |
| ----------------------------------------------- | -------- | -------- | ------------------------ | ------------------------------------ | -------------------- |
| **`fiat.additionalInformation.type`**           | `string` | Yes      | Regional account type.   | `TYPE_FIAT_US`, `TYPE_FIAT_GB`, etc. | `"TYPE_FIAT_US"`     |
| **`fiat.additionalInformation.supportedRails`** | `array`  | Yes      | Supported payment rails. | `ACH`, `FEDWIRE`, `SWIFT`, etc.      | `["ACH", "FEDWIRE"]` |
| **`fiat.additionalInformation.accountType`**    | `string` | Yes      | Account type.            | `CHECKING`, `SAVING`                 | `"CHECKING"`         |

**Intermediary Bank (for International Transfers)**

| Field                                                            | Type     | Required | Description             | Example           |
| ---------------------------------------------------------------- | -------- | -------- | ----------------------- | ----------------- |
| **`fiat.additionalInformation.intermediary.bank.name`**          | `string` | No       | Intermediary bank name. | `"Citibank N.A."` |
| **`fiat.additionalInformation.intermediary.bank.number`**        | `string` | No       | Intermediary account.   | `"876543210"`     |
| **`fiat.additionalInformation.intermediary.bank.routingNumber`** | `string` | No       | Intermediary routing.   | `"021000089"`     |

***

### **Response (200 OK)**

Returns the created account with system-generated ID and complete details including counterparty and customer information.

**Example Response:**

json

```
{
  "item": {
    "accountId": "acc_12345",
    "currencyCode": "USD",
    "status": "NEW",
    "bank": {
      "name": "Chase Bank",
      "number": "123456789",
      "address": {
        "addressLine1": "456 Bank Street",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10002"
      },
      "routingNumber": "021000021"
    },
    "name": "Business Checking Account",
    "number": "123456789",
    "type": "CHECKING",
    "fiat": {
      "number": "123456789",
      "routingNumber": "021000021",
      "additionalInformation": {
        "type": "TYPE_FIAT_US",
        "supportedRails": ["ACH", "FEDWIRE"],
        "accountType": "CHECKING"
      }
    },
    "counterparty": {
      "id": "cp_12345",
      "name": "Tech Supplies Corp",
      "phone": "+19876543210",
      "email": "contact@techsupplies.com"
    },
    "customer": {
      "id": "cust_12345",
      "name": "John Doe",
      "phone": "+1234567890",
      "email": "john@example.com",
      "status": "ACCEPT"
    },
    "createdAt": "2024-05-21T14:30:00Z",
    "updatedAt": "2024-05-21T14:30:00Z"
  }
}
```

***

### **Response Fields**

| Field                   | Type     | Description                  | Example                       |
| ----------------------- | -------- | ---------------------------- | ----------------------------- |
| **`item.accountId`**    | `string` | System-generated account ID. | `"acc_12345"`                 |
| **`item.name`**         | `string` | Account name/description.    | `"Business Checking Account"` |
| **`item.number`**       | `string` | Account number.              | `"123456789"`                 |
| **`item.type`**         | `string` | Account type.                | `"CHECKING"`                  |
| **`item.createdAt`**    | `string` | Creation timestamp.          | `"2024-05-21T14:30:00Z"`      |
| **`item.updatedAt`**    | `string` | Last update timestamp.       | `"2024-05-21T14:30:00Z"`      |
| **`item.counterparty`** | `object` | Counterparty details.        | -                             |
| **`item.customer`**     | `object` | Customer details.            | -                             |

***

### **Field Details**

#### **Account Status Values**

| Status             | Description                                   |
| ------------------ | --------------------------------------------- |
| **`NEW`**          | Account newly created, pending verification   |
| **`AWAIT`**        | Awaiting additional information/documentation |
| **`MODERATION`**   | Under review by compliance team               |
| **`ACCEPT`**       | Approved and active for transactions          |
| **`REJECT`**       | Rejected during verification                  |
| **`BANNED`**       | Permanently blocked from transactions         |
| **`VERIFICATION`** | In verification process                       |

#### **Supported Fiat Types**

| Type               | Region         | Description           |
| ------------------ | -------------- | --------------------- |
| **`TYPE_FIAT_US`** | United States  | US banking system     |
| **`TYPE_FIAT_GB`** | United Kingdom | UK banking system     |
| **`TYPE_FIAT_EU`** | European Union | SEPA region           |
| **`TYPE_FIAT_IN`** | India          | Indian banking system |
| **`TYPE_FIAT_CA`** | Canada         | Canadian banking      |
| **`TYPE_FIAT_SG`** | Singapore      | Singapore banking     |

#### **Supported Payment Rails**

| Rail          | Description                  | Region |
| ------------- | ---------------------------- | ------ |
| **`ACH`**     | Automated Clearing House     | US     |
| **`FEDWIRE`** | Federal Wire Transfer        | US     |
| **`SWIFT`**   | International wire transfers | Global |
| **`SEPA_CT`** | SEPA Credit Transfer         | EU     |

***

### **Notes**

* **Currency Requirement**: `currencyCode` is mandatory for all account types
* **Verification Process**: New accounts start with `NEW` status and require verification
* **Multi-Currency Support**: Counterparties can have multiple accounts in different currencies
* **Payment Rails**: Specify supported payment methods based on account type and region, one account can only support one type of payment rails
* **Compliance**: All accounts undergo KYC/AML verification based on regional regulations

**Common Use Cases**:

* Adding additional payment methods for existing counterparties
* Supporting multi-currency transactions
* Expanding payment options (traditional + crypto)

#### Examples

Real request sample

```json
{
    "item": {
        "currencyCode": "EUR",
        "bank": {
            "address": {
                "addressLine1": "456 Park Avenue",
                "city": "New York",
                "countryIso": "US",
                "postalCode": "10022",
                "stateIso": "NY"
            },
            "name": "Bank of America",
            "number": "161465165651",
            "routingNumber": null
        },
        "fiat": {
            "ifsc": "SBIN0001234",
            "name": "EUR 0",
            "number": "9876543210",
            "routingNumber": "121000358",
            "sortCode": "65265",
            "swift": "BOFAUS3N",
            "transitNumber": "121000358",
            "additionalInformation": {
                "type": "TYPE_FIAT_EU",
                "accountType": "CHECKING",
                "supportedRails": [
                    "SEPA_CT"
                ],
                "intermediary": {
                    "type": "",
                    "bank": {
                        "name": null,
                        "number": "",
                        "routingNumber": "",
                        "address": {
                            "addressLine1": "",
                            "addressLine2": "",
                            "addressLine3": null,
                            "city": "",
                            "stateIso": "",
                            "countryIso": "",
                            "postalCode": "",
                            "unitNumber": null
                        }
                    }
                }
            }
        }
    }
}
```

Real response sample

```json
{
    "item": {
        "accountId": "E5YoALwL60jK",
        "currencyCode": "EUR",
        "status": "MODERATION",
        "bank": {
            "name": "Bank of America",
            "number": "161465165651",
            "address": {
                "addressLine1": "456 Park Avenue",
                "addressLine2": "",
                "addressLine3": "",
                "city": "New York",
                "stateIso": "NY",
                "countryIso": "US",
                "postalCode": "10022",
                "unitNumber": ""
            }
        },
        "name": "EUR 0",
        "number": "9876543210",
        "type": "Fiat",
        "fiat": {
            "number": "9876543210",
            "ifsc": "SBIN0001234",
            "swift": "BOFAUS3N",
            "sortCode": "65265",
            "name": "EUR 0",
            "transitNumber": "121000358",
            "routingNumber": "121000358",
            "additionalInformation": {
                "type": "TYPE_FIAT_EU",
                "supportedRails": [
                    "SEPA_CT"
                ],
                "intermediary": {
                    "type": "TYPE_CRYPTO",
                    "bank": {
                        "number": "",
                        "address": {
                            "addressLine1": "",
                            "addressLine2": "",
                            "addressLine3": "",
                            "city": "",
                            "stateIso": "",
                            "countryIso": "",
                            "postalCode": "",
                            "unitNumber": ""
                        },
                        "routingNumber": ""
                    }
                },
                "accountType": "CHECKING"
            },
            "accountNumberType": "ANT_NOTSET",
            "transitNumberCode": "TNC_NOTSET"
        },
        "counterparty": {
            "id": "",
            "name": "",
            "phone": "",
            "email": ""
        },
        "customer": {
            "id": "",
            "name": "",
            "phone": "",
            "email": "",
            "status": "NEW"
        },
        "createdAt": null,
        "updatedAt": null
    }
}
```


# Update counterparty account

Updates an existing counterparty account's information including bank details, crypto wallet information, account status, and payment configurations.

This endpoint supports partial updates - only include the fields you want to modify.

**Endpoint**

`PATCH/v2/counterparty/{counterpartyId}/account/{accountId`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Counterparties_UpdateAccount>" %}

### **Request**

#### **Path Parameters**

| Parameter            | Type     | Description                                | Required | Example       |
| -------------------- | -------- | ------------------------------------------ | -------- | ------------- |
| **`counterpartyId`** | `string` | **Counterparty ID** that owns the account. | Yes      | `"cp_12345"`  |
| **`accountId`**      | `string` | **Account ID** to update.                  | Yes      | `"acc_12345"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Content-Type`**  | `application/json` | Yes      |
| **`Accept`**        | `application/json` | Yes      |

#### **Request Body**

All fields are optional - only include fields that need to be updated.

json

```
{
  "item": {
    "currencyCode": "USD",
    "status": "ACCEPT",
    "bank": {
      "name": "Updated Bank Name",
      "number": "987654321",
      "address": {
        "addressLine1": "789 Updated Bank Street",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10003"
      },
      "routingNumber": "021000022"
    },
    "fiat": {
      "number": "987654321",
      "routingNumber": "021000022",
      "additionalInformation": {
        "type": "TYPE_FIAT_US",
        "supportedRails": ["ACH", "FEDWIRE", "SWIFT"],
        "accountType": "SAVING"
      }
    }
  }
}
```

***

### **Request Fields**

**1. Main Account Fields**

| Field              | Type     | Required | Description                       | Example    |
| ------------------ | -------- | -------- | --------------------------------- | ---------- |
| **`currencyCode`** | `string` | No       | Updated currency code (ISO 4217). | `"USD"`    |
| **`status`**       | `string` | No       | Updated account status.           | `"ACCEPT"` |

**2. Bank Object (Traditional Banking)**

| Field                    | Type     | Required | Description             | Example               |
| ------------------------ | -------- | -------- | ----------------------- | --------------------- |
| **`bank.name`**          | `string` | No       | Updated bank name.      | `"Updated Bank Name"` |
| **`bank.number`**        | `string` | No       | Updated account number. | `"987654321"`         |
| **`bank.routingNumber`** | `string` | No       | Updated routing number. | `"021000022"`         |

**Bank Address Object**

| Field                           | Type     | Required | Description              | Example                     |
| ------------------------------- | -------- | -------- | ------------------------ | --------------------------- |
| **`bank.address.addressLine1`** | `string` | No       | Updated primary address. | `"789 Updated Bank Street"` |
| **`bank.address.addressLine2`** | `string` | No       | Updated suite/floor.     | `"Floor 20"`                |
| **`bank.address.city`**         | `string` | No       | Updated city.            | `"New York"`                |
| **`bank.address.stateIso`**     | `string` | No       | Updated state code.      | `"NY"`                      |
| **`bank.address.countryIso`**   | `string` | No       | Updated country code.    | `"US"`                      |
| **`bank.address.postalCode`**   | `string` | No       | Updated postal code.     | `"10003"`                   |

**3. Crypto Object (Cryptocurrency)**

| Field                | Type     | Required | Description                    | Example                    |
| -------------------- | -------- | -------- | ------------------------------ | -------------------------- |
| **`crypto.address`** | `string` | No       | Updated crypto wallet address. | `"0xupdatedAddress123..."` |

**Crypto Additional Information**

| Field                                             | Type     | Required | Description              | Allowed Values                                | Example             |
| ------------------------------------------------- | -------- | -------- | ------------------------ | --------------------------------------------- | ------------------- |
| **`crypto.additionalInformation.walletType`**     | `string` | No       | Updated wallet type.     | `CPW_INSTITUTION`, `CPW_OTHER`, `CPW_UNKNOWN` | `"CPW_INSTITUTION"` |
| **`crypto.additionalInformation.type`**           | `string` | No       | Updated account type.    | `TYPE_CRYPTO`                                 | `"TYPE_CRYPTO"`     |
| **`crypto.additionalInformation.supportedRails`** | `array`  | No       | Updated payment methods. | `CRYPTO`, `NFT`                               | `["CRYPTO"]`        |

**4. Fiat Object (Detailed Banking)**

| Field                    | Type     | Required | Description                      | Example                  |
| ------------------------ | -------- | -------- | -------------------------------- | ------------------------ |
| **`fiat.number`**        | `string` | No       | Updated account number.          | `"987654321"`            |
| **`fiat.ifsc`**          | `string` | No       | Updated IFSC code (India).       | `"SBIN0000002"`          |
| **`fiat.swift`**         | `string` | No       | Updated SWIFT/BIC code.          | `"UPDATEDBIC"`           |
| **`fiat.sortCode`**      | `string` | No       | Updated sort code (UK).          | `"50-40-30"`             |
| **`fiat.name`**          | `string` | No       | Updated account name.            | `"Updated Account Name"` |
| **`fiat.transitNumber`** | `string` | No       | Updated transit number (Canada). | `"54321"`                |
| **`fiat.routingNumber`** | `string` | No       | Updated routing number (US).     | `"021000022"`            |

**Fiat Additional Information**

| Field                                           | Type     | Required | Description                    | Allowed Values                       | Example                       |
| ----------------------------------------------- | -------- | -------- | ------------------------------ | ------------------------------------ | ----------------------------- |
| **`fiat.additionalInformation.type`**           | `string` | No       | Updated regional account type. | `TYPE_FIAT_US`, `TYPE_FIAT_GB`, etc. | `"TYPE_FIAT_US"`              |
| **`fiat.additionalInformation.supportedRails`** | `array`  | No       | Updated payment rails.         | `ACH`, `FEDWIRE`, `SWIFT`, etc.      | `["ACH", "FEDWIRE", "SWIFT"]` |
| **`fiat.additionalInformation.accountType`**    | `string` | No       | Updated account type.          | `CHECKING`, `SAVING`                 | `"SAVING"`                    |

**Intermediary Bank Updates**

| Field                                                            | Type     | Required | Description                     | Example                       |
| ---------------------------------------------------------------- | -------- | -------- | ------------------------------- | ----------------------------- |
| **`fiat.additionalInformation.intermediary.bank.name`**          | `string` | No       | Updated intermediary bank name. | `"Updated Intermediary Bank"` |
| **`fiat.additionalInformation.intermediary.bank.number`**        | `string` | No       | Updated intermediary account.   | `"999888777"`                 |
| **`fiat.additionalInformation.intermediary.bank.routingNumber`** | `string` | No       | Updated intermediary routing.   | `"021000099"`                 |

***

### **Response (200 OK)**

Returns the updated account object with all current information including counterparty and customer details.

**Example Response:**

json

```
{
  "item": {
    "accountId": "acc_12345",
    "currencyCode": "USD",
    "status": "ACCEPT",
    "bank": {
      "name": "Updated Bank Name",
      "number": "987654321",
      "address": {
        "addressLine1": "789 Updated Bank Street",
        "city": "New York",
        "stateIso": "NY",
        "countryIso": "US",
        "postalCode": "10003"
      },
      "routingNumber": "021000022"
    },
    "name": "Updated Business Account",
    "number": "987654321",
    "type": "SAVING",
    "fiat": {
      "number": "987654321",
      "routingNumber": "021000022",
      "additionalInformation": {
        "type": "TYPE_FIAT_US",
        "supportedRails": ["ACH", "FEDWIRE", "SWIFT"],
        "accountType": "SAVING"
      }
    },
    "counterparty": {
      "id": "cp_12345",
      "name": "Tech Supplies Corp",
      "phone": "+19876543210",
      "email": "contact@techsupplies.com"
    },
    "customer": {
      "id": "cust_12345",
      "name": "John Doe",
      "phone": "+1234567890",
      "email": "john@example.com",
      "status": "ACCEPT"
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-05-21T16:45:00Z"
  }
}
```

***

### **Response Fields**

| Field                   | Type     | Description             | Example                      |
| ----------------------- | -------- | ----------------------- | ---------------------------- |
| **`item.accountId`**    | `string` | Account ID (unchanged). | `"acc_12345"`                |
| **`item.name`**         | `string` | Updated account name.   | `"Updated Business Account"` |
| **`item.number`**       | `string` | Updated account number. | `"987654321"`                |
| **`item.type`**         | `string` | Updated account type.   | `"SAVING"`                   |
| **`item.updatedAt`**    | `string` | New update timestamp.   | `"2024-05-21T16:45:00Z"`     |
| **`item.counterparty`** | `object` | Counterparty details.   | -                            |
| **`item.customer`**     | `object` | Customer details.       | -                            |

***

### **Field Details**

#### **Account Status Values**

| Status             | Description                                   |
| ------------------ | --------------------------------------------- |
| **`NEW`**          | Account newly created, pending verification   |
| **`AWAIT`**        | Awaiting additional information/documentation |
| **`MODERATION`**   | Under review by compliance team               |
| **`ACCEPT`**       | Approved and active for transactions          |
| **`REJECT`**       | Rejected during verification                  |
| **`BANNED`**       | Permanently blocked from transactions         |
| **`VERIFICATION`** | In verification process                       |

#### **Account Type Values**

| Type           | Description                                     |
| -------------- | ----------------------------------------------- |
| **`CHECKING`** | Checking/current account for daily transactions |
| **`SAVING`**   | Savings account for storing funds               |

#### **Supported Payment Rails**

| Rail          | Description                  | Region |
| ------------- | ---------------------------- | ------ |
| **`ACH`**     | Automated Clearing House     | US     |
| **`FEDWIRE`** | Federal Wire Transfer        | US     |
| **`SWIFT`**   | International wire transfers | Global |
| **`SEPA_CT`** | SEPA Credit Transfer         | EU     |
| **`FPS`**     | Faster Payments              | UK     |
| **`IMPS`**    | Immediate Payment Service    | India  |

***

### **Examples**

#### **Request**

bash

```
curl -X PATCH 'https://stagep.tst-apidmndelss.com/v2/counterparty/cp_12345/account/acc_12345' \
  -H 'Authorization: 123' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "item": {
      "status": "ACCEPT",
      "fiat": {
        "additionalInformation": {
          "accountType": "SAVING"
        }
      }
    }
  }'
```

#### **Minimal Update Example**

**Request (update only account type):**

json

```
{
  "item": {
    "fiat": {
      "additionalInformation": {
        "accountType": "SAVING"
      }
    }
  }
}
```

**Response:**

json

```
{
  "item": {
    "accountId": "acc_67890",
    "currencyCode": "GBP",
    "status": "ACCEPT",
    "name": "Sterling Business Account",
    "number": "98765432",
    "type": "SAVING",
    "fiat": {
      "number": "98765432",
      "sortCode": "40-30-20",
      "additionalInformation": {
        "type": "TYPE_FIAT_GB",
        "supportedRails": ["FPS", "SWIFT"],
        "accountType": "SAVING"
      }
    },
    "counterparty": {
      "id": "cp_67890",
      "name": "London Consulting Ltd",
      "phone": "+442076543210",
      "email": "accounts@londonconsulting.com"
    },
    "customer": {
      "id": "cust_22222",
      "name": "Sarah Wilson",
      "phone": "+447123456789",
      "email": "sarah@example.com",
      "status": "ACCEPT"
    },
    "createdAt": "2024-03-10T14:20:00Z",
    "updatedAt": "2024-05-21T17:30:00Z"
  }
}
```

#### **Bank Details Update Example**

**Request (update bank information):**

json

```
{
  "item": {
    "bank": {
      "name": "New Bank Corporation",
      "number": "555666777",
      "routingNumber": "021000033",
      "address": {
        "addressLine1": "123 New Bank Plaza",
        "city": "Chicago",
        "stateIso": "IL",
        "countryIso": "US",
        "postalCode": "60601"
      }
    },
    "fiat": {
      "number": "555666777",
      "routingNumber": "021000033"
    }
  }
}
```

#### **Crypto Account Update Example**

**Request (update crypto wallet):**

json

```
{
  "item": {
    "crypto": {
      "address": "0xupdatedCryptoAddress456",
      "additionalInformation": {
        "walletType": "CPW_OTHER",
        "supportedRails": ["CRYPTO", "NFT"]
      }
    }
  }
}
```

#### **Status Update Example**

**Request (update account status):**

json

```
{
  "item": {
    "status": "MODERATION"
  }
}
```

**Response:**

json

```
{
  "item": {
    "accountId": "acc_99999",
    "currencyCode": "BTC",
    "status": "MODERATION",
    "name": "Bitcoin Institutional Wallet",
    "number": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
    "type": "CRYPTO_WALLET",
    "crypto": {
      "address": "0x742d35Cc6634C0532925a3b8D6B3985f8e091be1",
      "additionalInformation": {
        "walletType": "CPW_INSTITUTION",
        "type": "TYPE_CRYPTO",
        "supportedRails": ["CRYPTO"]
      }
    },
    "counterparty": {
      "id": "cp_99999",
      "name": "Crypto Ventures LLC",
      "phone": "+17864567890",
      "email": "info@cryptoventures.com"
    },
    "customer": {
      "id": "cust_44444",
      "name": "Michael Chen",
      "phone": "+16504561234",
      "email": "michael@example.com",
      "status": "ACCEPT"
    },
    "createdAt": "2024-02-28T11:15:00Z",
    "updatedAt": "2024-05-21T18:15:00Z"
  }
}
```

***

### **Error Responses**

1. **Counterparty Not Found**:

   json

   ```
   { "error": "Counterparty not found: cp_99999" }
   ```
2. **Account Not Found**:

   json

   ```
   { "error": "Account not found: acc_99999" }
   ```
3. **Invalid Status**:

   json

   ```
   { "error": "Invalid status value: INVALID_STATUS" }
   ```
4. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Partial Updates**: Only include fields that need to be changed
* **Status Impact**: Changing account details may trigger re-verification
* **Verification**: Status updates to `ACCEPT` may require compliance approval
* **Audit Trail**: `updatedAt` timestamp reflects when changes were applied
* **Field Validation**: All updated fields undergo the same validation as creation

**Common Update Scenarios**:

* Correcting bank account information
* Adding additional payment rails
* Changing account status for compliance
* Updating crypto wallet addresses
* Modifying account types


# List Client Operations

Retrieves a paginated list of client financial operations (transactions) with comprehensive filtering options. Includes detailed information about sources, destinations, amounts, and operation status.

**Endpoint**

`GET/v2/billing/operation`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_List>" %}

### **Request**

#### **Query Parameters**

| Parameter              | Type      | Description & Values                                                                                                                                                                                                                                                                        | Required | Example                  |
| ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------ |
| **`account`**          | `string`  | Filter by account ID or number.                                                                                                                                                                                                                                                             | No       | `"acc_12345"`            |
| **`clientCuid`**       | `string`  | Filter by client customer ID.                                                                                                                                                                                                                                                               | No       | `"cust_67890"`           |
| **`clientName`**       | `string`  | Filter by client name (partial match).                                                                                                                                                                                                                                                      | No       | `"John"`                 |
| **`counterpartySuid`** | `string`  | Filter by counterparty SUID.                                                                                                                                                                                                                                                                | No       | `"suid_abc123"`          |
| **`destination`**      | `string`  | Filter by destination account.                                                                                                                                                                                                                                                              | No       | `"dest_account"`         |
| **`fromCreatedAt`**    | `string`  | Filter operations created **after** this date (ISO 8601).                                                                                                                                                                                                                                   | No       | `"2024-01-01T00:00:00Z"` |
| **`fromUpdatedAt`**    | `string`  | Filter operations updated **after** this date (ISO 8601).                                                                                                                                                                                                                                   | No       | `"2024-05-01T00:00:00Z"` |
| **`meta.page`**        | `integer` | **Page number** (starts from 0).                                                                                                                                                                                                                                                            | No       | `0`                      |
| **`meta.pageSize`**    | `integer` | **Items per page**.                                                                                                                                                                                                                                                                         | No       | `20`                     |
| **`opid`**             | `string`  | Filter by specific operation ID.                                                                                                                                                                                                                                                            | No       | `"op_12345"`             |
| **`recipientId`**      | `string`  | Filter by recipient ID.                                                                                                                                                                                                                                                                     | No       | `"rec_67890"`            |
| **`recipientName`**    | `string`  | Filter by recipient name.                                                                                                                                                                                                                                                                   | No       | `"Jane Smith"`           |
| **`senderId`**         | `string`  | Filter by sender ID.                                                                                                                                                                                                                                                                        | No       | `"send_12345"`           |
| **`senderName`**       | `string`  | Filter by sender name.                                                                                                                                                                                                                                                                      | No       | `"John Doe"`             |
| **`source`**           | `string`  | Filter by source account.                                                                                                                                                                                                                                                                   | No       | `"src_account"`          |
| **`status`**           | `string`  | <p>Filter by operation status:<br>- <code>NEW</code>: Created by user/moderator<br>- <code>PENDING</code>: Moderator approved<br>- <code>WORKING</code>: Processing by network<br>- <code>SUCCESS</code>: Completed<br>- <code>FAIL</code>: Failed<br>- <code>CANCELED</code>: Canceled</p> | No       | `"SUCCESS"`              |
| **`toCreatedAt`**      | `string`  | Filter operations created **before** this date (ISO 8601).                                                                                                                                                                                                                                  | No       | `"2024-12-31T23:59:59Z"` |
| **`toUpdatedAt`**      | `string`  | Filter operations updated **before** this date (ISO 8601).                                                                                                                                                                                                                                  | No       | `"2024-05-21T23:59:59Z"` |
| **`type`**             | `string`  | <p>Filter by operation type:<br>- <code>NOTSET</code><br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code><br>- <code>CORRECTING</code></p>                                                              | No       | `"TRANSFER"`             |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of operations with detailed information.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description                 | Example |
| -------------- | --------- | --------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.             | `20`    |
| **`page`**     | `integer` | Current page number.        | `0`     |
| **`total`**    | `string`  | Total operations available. | `"250"` |

**2. Operation Object (`items[]`)**

| Field                   | Type      | Description                            | Example                  |
| ----------------------- | --------- | -------------------------------------- | ------------------------ |
| **`opid`**              | `string`  | **Unique operation ID**.               | `"op_12345"`             |
| **`isVisible`**         | `boolean` | **Visibility status**.                 | `true`                   |
| **`status`**            | `string`  | **Current status** (see values above). | `"SUCCESS"`              |
| **`type`**              | `string`  | **Operation type** (see values above). | `"TRANSFER"`             |
| **`paymentType`**       | `string`  | **Payment method**.                    | `"SWIFT"`                |
| **`createdAt`**         | `string`  | Creation timestamp (ISO 8601).         | `"2024-05-20T10:30:00Z"` |
| **`updatedAt`**         | `string`  | Last update timestamp (ISO 8601).      | `"2024-05-20T14:45:00Z"` |
| **`source`**            | `object`  | **Source details** (see below).        | -                        |
| **`destination`**       | `object`  | **Destination details** (see below).   | -                        |
| **`sourceAmount`**      | `object`  | **Source amount** (Money Object).      | -                        |
| **`destinationAmount`** | `object`  | **Destination amount** (Money Object). | -                        |
| **`commissionAmount`**  | `object`  | **Commission amount** (Money Object).  | -                        |
| **`comment`**           | `string`  | **Operation comment/notes**.           | `"Monthly payment"`      |
| **`reference`**         | `string`  | **Reference number**.                  | `"REF202405201234"`      |
| **`isParent`**          | `boolean` | **Parent operation flag**.             | `true`                   |
| **`customer`**          | `object`  | **Customer details** (see below).      | -                        |
| **`documents`**         | `array`   | **Associated documents** (see below).  | -                        |

**3. Source/Destination Objects**

Contains nested objects for:

* **`account`**: Account details (id, name, number, customer)
* **`counterpartyAccount`**: Counterparty details with bank information
* **`customer`**: Customer information (cuid, name, type)

**4. Money Object**

Used in `sourceAmount`, `destinationAmount`, `commissionAmount`:

| Field              | Type      | Description               | Example               |
| ------------------ | --------- | ------------------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code (ISO 4217). | `"USD"`               |
| **`units`**        | `string`  | Whole units.              | `"1000"`              |
| **`nanos`**        | `integer` | Fractional units (10^-9). | `500000000` (= $0.50) |

**5. Document Object**

| Field          | Type      | Description                               | Example                  |
| -------------- | --------- | ----------------------------------------- | ------------------------ |
| **`guid`**     | `string`  | **Document unique ID**.                   | `"doc_abc123"`           |
| **`fileName`** | `string`  | **Original filename**.                    | `"invoice.pdf"`          |
| **`size`**     | `integer` | **File size in bytes**.                   | `1024000`                |
| **`mime`**     | `string`  | **MIME type**.                            | `"application/pdf"`      |
| **`docType`**  | `string`  | **Document type** (see values in sample). | `"BANK_STATEMENT"`       |
| **`createAt`** | `string`  | **Upload timestamp**.                     | `"2024-05-20T11:00:00Z"` |

**Example Response:**

```json
{
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "45"
  },
  "items": [
    {
      "opid": "op_12345",
      "isVisible": true,
      "status": "SUCCESS",
      "type": "TRANSFER",
      "paymentType": "SWIFT",
      "createdAt": "2024-05-20T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z",
      "source": {
        "account": {
          "id": "acc_12345",
          "name": "Business Account",
          "number": "ACC001",
          "customer": {
            "cuid": "cust_67890",
            "name": "Acme Inc.",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "counterpartyAccount": {
          "id": "cpa_78901",
          "name": "Supplier Account",
          "number": "IBAN123456789",
          "counterparty": {
            "suid": "suid_abc123",
            "name": "Global Suppliers Ltd",
            "bankName": "International Bank",
            "bankAddress": {
              "addressLine1": "123 Main Street",
              "city": "London",
              "countryIso": "GB",
              "postalCode": "SW1A 1AA"
            }
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "5000",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "EUR",
          "units": "4600",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "25",
          "nanos": 0
        }
      },
      "comment": "Q2 supplier payment",
      "reference": "REF202405201234",
      "isParent": true,
      "customer": {
        "cuid": "cust_67890",
        "name": "Acme Inc.",
        "type": "CORPORATE"
      },
      "documents": []
    }
  ]
}
```

***

### **Examples**

#### **Request**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/operation?status=SUCCESS&type=TRANSFER&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request with Date Range**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/operation?fromCreatedAt=2024-05-01T00:00:00Z&toCreatedAt=2024-05-21T23:59:59Z&status=SUCCESS' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Invalid Date Format**:

   ```json
   { "error": "Invalid date format for fromCreatedAt" }
   ```
2. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Status Flow**: `NEW` → `PENDING` → `WORKING` → `SUCCESS/FAIL/CANCELED`
* **Money Precision**: Use `units` + `nanos` for precise amounts (e.g., $100.50 = units="100", nanos=500000000)
* **Document Types**: Various document types supported for compliance and verification
* **Pagination**: Use for large datasets to manage performance

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjUzMTMxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.f9GPGrvNiPbn3PZGwTJZQHsM_b_4HH4GxlJzrO-YO68
account: UjmLCEcZCXzb
counterpartyAccountId: string
customerId: D7k3xbc-ERrj-lde9k1t3XuaE
customerName: string
destination: string
fromCreatedAt: string
fromUpdatedAt: string
meta.page: integer
meta.pageSize: integer
operationId: string
recipientId: string
recipientName: string
senderId: string
senderName: string
source: string
status: Not SetNOT_SETNEWPENDINGWORKINGSUCCESSFAILCANCELED
select an option
toCreatedAt: string
toUpdatedAt: string
type: Not SetNOTSETDEPOSITTRANSFERWITHDRAWCOMMISSIONEXCHANGE
select an option


```

Response sample

```postman_json
{
  "meta": {
    "pageSize": 8,
    "page": 0,
    "total": "8"
  },
  "items": [
    {
      "operationId": "290bf59e-a1b5-4a1d-89c1-ce44c2e28246",
      "isVisible": false,
      "status": "PENDING",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-20T09:56:08Z",
      "updatedAt": "2025-10-20T09:58:08Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UcJlzOBpEhCE",
          "name": "Commission Account USD",
          "number": "",
          "customer": {
            "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
            "name": "Test Eugen Test Eugen",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "comment": "Commission for operation: b5b1874a-4df1-453a-b28e-7521e8b38fd6",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "b5b1874a-4df1-453a-b28e-7521e8b38fd6",
      "isVisible": true,
      "status": "PENDING",
      "type": "TRANSFER",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-20T09:56:08Z",
      "updatedAt": "2025-10-20T09:58:08Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UnLHMfwnumW7",
          "name": "USD DELOS",
          "number": "",
          "customer": {
            "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
            "name": "Test Eugen Test Eugen",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "comment": "Test",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "7c7d8aac-d492-49f0-9579-60aa849262d8",
      "isVisible": false,
      "status": "PENDING",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-20T09:53:28Z",
      "updatedAt": "2025-10-20T09:55:29Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UcJlzOBpEhCE",
          "name": "Commission Account USD",
          "number": "",
          "customer": {
            "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
            "name": "Test Eugen Test Eugen",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "comment": "Commission for operation: 3430ee63-42cb-4f4e-a387-a6de9516109c",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "3430ee63-42cb-4f4e-a387-a6de9516109c",
      "isVisible": true,
      "status": "PENDING",
      "type": "TRANSFER",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-20T09:53:28Z",
      "updatedAt": "2025-10-20T09:55:29Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UavUkRR7OBzh",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        },
        "default": {
          "currencyCode": "USD",
          "units": "12",
          "nanos": 99999999
        }
      },
      "comment": "Test",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "a2af0244-c004-4759-952d-f3cd778c00df",
      "isVisible": false,
      "status": "PENDING",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-02T09:04:58Z",
      "updatedAt": "2025-10-02T09:06:58Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UcJlzOBpEhCE",
          "name": "Commission Account USD",
          "number": "",
          "customer": {
            "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
            "name": "Test Eugen Test Eugen",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "comment": "Commission for operation: 9576a85e-a0a6-4dc5-a81e-d1921c6fd271",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "9576a85e-a0a6-4dc5-a81e-d1921c6fd271",
      "isVisible": true,
      "status": "PENDING",
      "type": "EXCHANGE",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-02T09:04:58Z",
      "updatedAt": "2025-10-02T09:06:58Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UrpI6jMzHnsP",
          "name": "USDT ERC20",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USDT_ERC20",
          "units": "98",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        }
      },
      "comment": "Test",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "379e65d1-b260-4f8a-b81e-dbeb187927bc",
      "isVisible": false,
      "status": "SUCCESS",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-02T09:03:51Z",
      "updatedAt": "2025-10-02T09:04:23Z",
      "source": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "destination": {
        "account": {
          "id": "UcJlzOBpEhCE",
          "name": "Commission Account USD",
          "number": "",
          "customer": {
            "id": "Dnewcvn-euuI-vG0FZCRDjLXS",
            "name": "Test Eugen Test Eugen",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "comment": "Commission for operation: 7e01efe7-2adc-4dfb-8552-bb1837665209",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    },
    {
      "operationId": "7e01efe7-2adc-4dfb-8552-bb1837665209",
      "isVisible": true,
      "status": "SUCCESS",
      "type": "DEPOSIT",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-02T09:03:51Z",
      "updatedAt": "2025-10-02T09:04:30Z",
      "source": null,
      "destination": {
        "account": {
          "id": "UjmLCEcZCXzb",
          "name": "USD",
          "number": "",
          "customer": {
            "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
            "name": "NOVA HORIZON LTD",
            "type": "CORPORATE"
          }
        }
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "1000",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "1000",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "1000",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "1000",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "20",
          "nanos": 0
        }
      },
      "comment": "Test payment for covert client",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": "NOVA HORIZON LTD",
        "type": "CORPORATE"
      },
      "documents": []
    }
  ]
}
```


# Add Client Operation

Creates a new financial operation for a client. Supports various operation types including transfers, deposits, withdrawals, and exchanges with flexible source/destination configurations.

**Endpoint**

`POST/v2/billing/operation`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_Add>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field                     | Type      | Description & Requirements                                                                                                                                                                                                                                         | Required            | Example                       |
| ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | ----------------------------- |
| **`customerId`**          | `string`  | **Customer ID** initiating the operation.                                                                                                                                                                                                                          | Yes                 | `"D7k3xbc-ERrj-lde9k1t3XuaE"` |
| **`paymentType`**         | `string`  | <p><strong>Payment method</strong>:<br>- <code>EMPTY</code><br>- <code>ACH</code><br>- <code>FEDWIRE</code><br>- <code>SWIFT</code><br>- <code>CRYPTO</code><br>- <code>UAEFTS</code><br>- <code>SEPA\_CT</code><br>- <code>CHAPS</code><br>- <code>FPS</code></p> | No                  | `"SWIFT"`                     |
| **`type`**                | `string`  | <p><strong>Operation type</strong>:<br>- <code>NOTSET</code><br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code></p>                                                           | Yes                 | `"TRANSFER"`                  |
| **`sourceRequisit`**      | `object`  | **Source account details** (see rules below).                                                                                                                                                                                                                      | Yes                 | -                             |
| → `account`               | `string`  | **Deposit Account ID** (for source).                                                                                                                                                                                                                               | Conditional         | `"UjmLCEcZCXzb"`              |
| → `beneficiar`            | `string`  | **Beneficiary Account ID** (not used for source).                                                                                                                                                                                                                  | No                  | -                             |
| **`destinationRequisit`** | `object`  | **Destination account details** (see rules below).                                                                                                                                                                                                                 | Yes                 | -                             |
| → `account`               | `string`  | **Deposit Account ID** (for transfers/exchanges).                                                                                                                                                                                                                  | Conditional         | <kbd>`"UjmLCEcZCXzb`</kbd>`"` |
| → `beneficiar`            | `string`  | **Beneficiary Account ID** (for withdrawals).                                                                                                                                                                                                                      | Conditional         | `"UjmLCEcZCXzb"`              |
| **`amount`**              | `object`  | **Transaction amount** (see Money Object below).                                                                                                                                                                                                                   | Yes                 | -                             |
| → `units`                 | `string`  | **Whole units** of amount.                                                                                                                                                                                                                                         | Yes                 | `"1000"`                      |
| → `nanos`                 | `integer` | **Fractional units** (nanos = 10^-9).                                                                                                                                                                                                                              | Yes                 | `500000000`                   |
| **`comment`**             | `string`  | **Operation comment/description**.                                                                                                                                                                                                                                 | No                  | `"Supplier payment"`          |
| **`reference`**           | `string`  | **Reference number** for tracking.                                                                                                                                                                                                                                 | Yes, 30 symbols max | `"INV20240521"`               |
| **`documents`**           | `array`   | **Associated documents** (see below).                                                                                                                                                                                                                              | Highly recommended  | -                             |

**Account Selection Rules**

**For Source (always):**

* Must set `sourceRequisit.account` (Deposit Account ID)

**For Destination:**

* **`TRANSFER`, `EXCHANGE`, `DEPOSIT`**: Set `destinationRequisit.account` (Deposit Account ID)
* **`WITHDRAW`**: Set `destinationRequisit.beneficiar` (Beneficiary Account ID)

**Money Object**

| Field       | Type      | Description                  | Example               |
| ----------- | --------- | ---------------------------- | --------------------- |
| **`units`** | `string`  | Whole units (e.g., dollars). | `"1000"`              |
| **`nanos`** | `integer` | Fractional units (10^-9).    | `500000000` (= $0.50) |

**Document Object**

| Field      | Type     | Description                            | Example         |
| ---------- | -------- | -------------------------------------- | --------------- |
| **`id`**   | `string` | **Document ID** (if already uploaded). | `"doc_123"`     |
| **`name`** | `string` | **Document name**.                     | `"invoice.pdf"` |

***

### **Response (200 OK)**

Returns the created operation with full details including calculated amounts and system-generated fields.

#### **Response Fields**

| Field                      | Type      | Description                           | Example                  |
| -------------------------- | --------- | ------------------------------------- | ------------------------ |
| **`opid`**                 | `string`  | **System-generated operation ID**.    | `"op_abc123"`            |
| **`isVisible`**            | `boolean` | **Visibility status**.                | `true`                   |
| **`status`**               | `string`  | **Initial status**: `NEW`.            | `"NEW"`                  |
| **`type`**                 | `string`  | Operation type from request.          | `"TRANSFER"`             |
| **`paymentType`**          | `string`  | Payment method from request.          | `"SWIFT"`                |
| **`createdAt`**            | `string`  | Creation timestamp (ISO 8601).        | `"2024-05-21T10:30:00Z"` |
| **`updatedAt`**            | `string`  | Update timestamp (ISO 8601).          | `"2024-05-21T10:30:00Z"` |
| **`source`**               | `object`  | **Source account details**.           | -                        |
| **`destination`**          | `object`  | **Destination account details**.      | -                        |
| **`sourceAmount`**         | `object`  | **Source amount** with currency.      | -                        |
| **`destinationAmount`**    | `object`  | **Destination amount** with currency. | -                        |
| **`commissionAmount`**     | `object`  | **Calculated commission**.            | -                        |
| **`currentBalanceAmount`** | `object`  | **Current balance** after operation.  | -                        |
| **`comment`**              | `string`  | Comment from request.                 | `"Supplier payment"`     |
| **`isParent`**             | `boolean` | **Parent operation flag**.            | `true`                   |
| **`reference`**            | `string`  | Reference from request.               | `"SWIFT20240521001"`     |
| **`customer`**             | `object`  | **Customer details**.                 | -                        |
| **`documents`**            | `array`   | **Associated documents**.             | -                        |

***

### **Error Responses**

1. **Invalid Account**:

   ```json
   { "error": "Source account not found: UjmLCEcZCXzb" }
   ```
2. **Insufficient Funds**:

   ```json
   { "error": "Insufficient funds in source account" }
   ```
3. **Invalid Configuration**:

   ```json
   { "error": "Withdrawal operations require beneficiary account for destination" }
   ```

***

### **Notes**

* **Status Flow**: New operations start with `NEW` status and progress through approval workflow
* **Amount Precision**: Use `units` + `nanos` for precise amounts
* **Currency Conversion**: For exchanges, system calculates destination amount automatically
* **Commission**: Calculated based on operation type and payment method
* **Validation**: Operations are validated against limits and account permissions
* "units" is a whole number, for example: 10 / 100 / 1000 / 0  \\

  "nanos" is a decimal number and is filled in a specific way, for example: 500000000 / 100000000  &#x20;  \
  If you want to specify the amount as 10.5, you should enter it as follows:  \
  "units": 10,  \
  "nanos": 500000000

### Examples

Request sample

```postman_json
{
  "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
  "paymentType": "EMPTY",
  "type": "EXCHANGE",
  "sourceRequisit": {
    "account": "UjmLCEcZCXzb",
    "beneficiar": "string"
  },
  "destinationRequisit": {
    "account": "UrpI6jMzHnsP",
    "beneficiar": "string"
  },
  "amount": {
    "units": "100",
    "nanos": 0
  },
  "comment": "testapi",
  "reference": "string",
  "documents": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}
```

Response sample

```postman_json
{
  "item": {
    "operationId": "8248956e-a002-4404-aafc-be8fd8dc16b6",
    "isVisible": true,
    "status": "NEW",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2025-10-28T12:09:33Z",
    "updatedAt": "2025-10-28T12:09:33Z",
    "source": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USDT_ERC20",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      },
      "default": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      }
    },
    "comment": "testapi",
    "isParent": false,
    "reference": "string",
    "customer": {
      "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "name": ""
    },
    "documents": []
  }
}
```


# Prepare Client Operation

Simulates and validates a financial operation without executing it.

Returns detailed preview including calculated amounts, commissions, and validation results. Necessary for showing users the exact outcome before confirming the operation.

**Endpoint**

`POST/v2/billing/operation/prepare`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_Prepare>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field                     | Type      | Description & Requirements                                                                                                                                                                                                                                         | Required    | Example              |
| ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | -------------------- |
| **`customerId`**          | `string`  | **Customer ID** initiating the operation.                                                                                                                                                                                                                          | Yes         | `"cust_12345"`       |
| **`paymentType`**         | `string`  | <p><strong>Payment method</strong>:<br>- <code>EMPTY</code><br>- <code>ACH</code><br>- <code>FEDWIRE</code><br>- <code>SWIFT</code><br>- <code>CRYPTO</code><br>- <code>UAEFTS</code><br>- <code>SEPA\_CT</code><br>- <code>CHAPS</code><br>- <code>FPS</code></p> | No          | `"SWIFT"`            |
| **`type`**                | `string`  | <p><strong>Operation type</strong>:<br>- <code>NOTSET</code><br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code></p>                                                           | Yes         | `"TRANSFER"`         |
| **`sourceRequisit`**      | `object`  | **Source account details** (see rules below).                                                                                                                                                                                                                      | Yes         | -                    |
| → `account`               | `string`  | **Deposit Account ID** (for source).                                                                                                                                                                                                                               | Conditional | `"acc_12345"`        |
| → `beneficiar`            | `string`  | **Beneficiary Account ID** (not used for source).                                                                                                                                                                                                                  | No          | -                    |
| **`destinationRequisit`** | `object`  | **Destination account details** (see rules below).                                                                                                                                                                                                                 | Yes         | -                    |
| → `account`               | `string`  | **Deposit Account ID** (for transfers/exchanges).                                                                                                                                                                                                                  | Conditional | `"acc_67890"`        |
| → `beneficiar`            | `string`  | **Beneficiary Account ID** (for withdrawals).                                                                                                                                                                                                                      | Conditional | `"benef_abc123"`     |
| **`amount`**              | `object`  | **Transaction amount** (see Money Object below).                                                                                                                                                                                                                   | Yes         | -                    |
| → `units`                 | `string`  | **Whole units** of amount.                                                                                                                                                                                                                                         | Yes         | `"1000"`             |
| → `nanos`                 | `integer` | **Fractional units** (nanos = 10^-9).                                                                                                                                                                                                                              | Yes         | `500000000`          |
| **`comment`**             | `string`  | **Operation comment/description**.                                                                                                                                                                                                                                 | No          | `"Supplier payment"` |
| **`reference`**           | `string`  | **Reference number** for tracking.                                                                                                                                                                                                                                 | No          | `"INV20240521"`      |
| **`documents`**           | `array`   | **Associated documents** (see below).                                                                                                                                                                                                                              | No          | -                    |

**Account Selection Rules**

**For Source (always):**

* Must set `sourceRequisit.account` (Deposit Account ID)

**For Destination:**

* **`TRANSFER`, `EXCHANGE`, `DEPOSIT`**: Set `destinationRequisit.account` (Deposit Account ID)
* **`WITHDRAW`**: Set `destinationRequisit.beneficiar` (Beneficiary Account ID)

**Money Object**

| Field       | Type      | Description                  | Example               |
| ----------- | --------- | ---------------------------- | --------------------- |
| **`units`** | `string`  | Whole units (e.g., dollars). | `"1000"`              |
| **`nanos`** | `integer` | Fractional units (10^-9).    | `500000000` (= $0.50) |

**Document Object**

| Field      | Type     | Description                            | Example         |
| ---------- | -------- | -------------------------------------- | --------------- |
| **`id`**   | `string` | **Document ID** (if already uploaded). | `"doc_123"`     |
| **`name`** | `string` | **Document name**.                     | `"invoice.pdf"` |

**Example Request Body (Transfer preview):**

```json
{
  "customerId": "cust_12345",
  "paymentType": "EMPTY",
  "type": "TRANSFER",
  "sourceRequisit": {
    "account": "acc_12345"
  },
  "destinationRequisit": {
    "account": "acc_67890"
  },
  "amount": {
    "units": "1000",
    "nanos": 0
  },
  "comment": "Internal transfer preview",
  "reference": "PREVIEW001"
}
```

**Example Request Body (Withdrawal preview):**

```json
{
  "customerId": "cust_12345",
  "paymentType": "SWIFT",
  "type": "WITHDRAW",
  "sourceRequisit": {
    "account": "acc_12345"
  },
  "destinationRequisit": {
    "beneficiar": "benef_abc123"
  },
  "amount": {
    "units": "5000",
    "nanos": 0
  },
  "comment": "SWIFT withdrawal preview",
  "reference": "SWIFT_PREVIEW001"
}
```

**Example Request Body (Exchange preview):**

```json
{
  "customerId": "cust_12345",
  "paymentType": "EMPTY",
  "type": "EXCHANGE",
  "sourceRequisit": {
    "account": "acc_usd123"
  },
  "destinationRequisit": {
    "account": "acc_eur456"
  },
  "amount": {
    "units": "1000",
    "nanos": 0
  },
  "comment": "USD to EUR exchange preview"
}
```

***

### **Response (200 OK)**

Returns a preview of the operation with calculated amounts, commissions, and validation results. **No actual transaction is executed.**

#### **Response Fields**

| Field                      | Type      | Description                                                  | Example                  |
| -------------------------- | --------- | ------------------------------------------------------------ | ------------------------ |
| **`opid`**                 | `string`  | **Preview operation ID** (for reference only).               | `"preview_op_abc123"`    |
| **`isVisible`**            | `boolean` | **Visibility status**.                                       | `true`                   |
| **`status`**               | `string`  | **Preview status**: `NEW`.                                   | `"NEW"`                  |
| **`type`**                 | `string`  | Operation type from request.                                 | `"TRANSFER"`             |
| **`paymentType`**          | `string`  | Payment method from request.                                 | `"SWIFT"`                |
| **`createdAt`**            | `string`  | Preview timestamp (ISO 8601).                                | `"2024-05-21T10:30:00Z"` |
| **`updatedAt`**            | `string`  | Preview timestamp (ISO 8601).                                | `"2024-05-21T10:30:00Z"` |
| **`source`**               | `object`  | **Source account details**.                                  | -                        |
| **`destination`**          | `object`  | **Destination account details**.                             | -                        |
| **`sourceAmount`**         | `object`  | **Source amount** with currency.                             | -                        |
| **`destinationAmount`**    | `object`  | **Calculated destination amount** (includes exchange rates). | -                        |
| **`commissionAmount`**     | `object`  | **Calculated commission**.                                   | -                        |
| **`currentBalanceAmount`** | `object`  | **Projected balance** after operation.                       | -                        |
| **`comment`**              | `string`  | Comment from request.                                        | `"Supplier payment"`     |
| **`isParent`**             | `boolean` | **Parent operation flag**.                                   | `true`                   |
| **`reference`**            | `string`  | Reference from request.                                      | `"SWIFT_PREVIEW001"`     |
| **`customer`**             | `object`  | **Customer details**.                                        | -                        |
| **`documents`**            | `array`   | **Associated documents**.                                    | -                        |

**Example Response (Transfer Preview):**

```json
{
  "item": {
    "opid": "preview_op_abc123",
    "isVisible": true,
    "status": "NEW",
    "type": "TRANSFER",
    "paymentType": "EMPTY",
    "createdAt": "2024-05-21T10:30:00Z",
    "updatedAt": "2024-05-21T10:30:00Z",
    "source": {
      "account": {
        "id": "acc_12345",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "account": {
        "id": "acc_67890",
        "name": "Savings Account",
        "number": "ACC002",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "1000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "1000",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "15000",
        "nanos": 0
      }
    },
    "comment": "Internal transfer preview",
    "isParent": true,
    "reference": "PREVIEW001",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": []
  }
}
```

**Example Response (Exchange Preview):**

```json
{
  "item": {
    "opid": "preview_op_exchange123",
    "isVisible": true,
    "status": "NEW",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2024-05-21T10:30:00Z",
    "updatedAt": "2024-05-21T10:30:00Z",
    "source": {
      "account": {
        "id": "acc_usd123",
        "name": "USD Account",
        "number": "USD001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "account": {
        "id": "acc_eur456",
        "name": "EUR Account",
        "number": "EUR001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "1000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "920",
        "nanos": 500000000
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "10",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "9000",
        "nanos": 0
      }
    },
    "comment": "USD to EUR exchange preview",
    "isParent": true,
    "reference": "",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": []
  }
}
```

***

### **Examples**

#### **Request**

```bash
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/operation/prepare' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "customerId": "cust_12345",
    "paymentType": "SWIFT",
    "type": "WITHDRAW",
    "sourceRequisit": {
      "account": "acc_12345"
    },
    "destinationRequisit": {
      "beneficiar": "benef_abc123"
    },
    "amount": {
      "units": "5000",
      "nanos": 0
    },
    "comment": "International payment preview",
    "reference": "PREVIEW001"
  }'
```

***

### **Error Responses**

1. **Invalid Account**:

   ```json
   { "error": "Source account not found: acc_99999" }
   ```
2. **Insufficient Funds**:

   ```json
   { "error": "Insufficient funds in source account" }
   ```
3. **Limit Exceeded**:

   ```json
   { "error": "Amount exceeds maximum limit of 10000.00" }
   ```
4. **Invalid Configuration**:

   ```json
   { "error": "Withdrawal operations require beneficiary account for destination" }
   ```

***

### **Notes**

* **Simulation Only**: No funds are moved, no database records are created
* **Real-time Rates**: Uses current exchange rates for currency conversions
* **Commission Calculation**: Includes all applicable fees and commissions
* **Validation**: Performs full validation including limits, permissions, and account status
* **Use Case**: Ideal for showing users exact costs before confirming transactions

**Typical Workflow**:

1. User fills operation details in UI
2. Call `prepare` endpoint to get preview
3. Show user calculated amounts and commissions
4. User confirms and calls `create` endpoint

Real request

`"{`\
`""customerId"": ""D7k3xbc-ERrj-lde9k1t3XuaE"",`\
`""type"": ""WITHDRAW"",`\
`""amount"": {`\
`""units"": 10,`\
`""nanos"": 0`\
`},`\
`""paymentType"": ""SWIFT"",`\
`""sourceRequisit"": {`\
`""account"": ""UjmLCEcZCXzb""`\
`},`\
`""destinationRequisit"": {`\
`""beneficiar"": ""UuLoWhjZEtJQ""`\
`},`\
`""comment"": ""Test"",`\
`""reference"": ""Test"",`\
`""documents"": [`\
`{`\
`""id"": ""string"",`\
`""name"": ""string""`\
`},`\
`{`\
`""id"": ""string"",`\
`""name"": ""string""`\
`}`\
`]`\
`}"`\
\
Real response

`"{`\
`""item"": {`\
`""operationId"": ""944723c9-5510-4d40-8093-14e83986c1fc"",`\
`""isVisible"": true,`\
`""status"": ""NEW"",`\
`""type"": ""WITHDRAW"",`\
`""paymentType"": ""SWIFT"",`\
`""createdAt"": ""0001-01-01T00:00:00Z"",`\
`""updatedAt"": ""0001-01-01T00:00:00Z"",`\
`""source"": {`\
`""account"": {`\
`""id"": ""UjmLCEcZCXzb"",`\
`""name"": """",`\
`""number"": """",`\
`""customer"": null`\
`}`\
`},`\
`""destination"": {`\
`""counterpartyAccount"": {`\
`""id"": ""UuLoWhjZEtJQ"",`\
`""name"": """",`\
`""number"": """",`\
`""counterparty"": null,`\
`""customer"": null`\
`}`\
`},`\
`""sourceAmount"": {`\
`""sum"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""10"",`\
`""nanos"": 0`\
`},`\
`""default"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""10"",`\
`""nanos"": 0`\
`}`\
`},`\
`""destinationAmount"": {`\
`""sum"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""10"",`\
`""nanos"": 0`\
`},`\
`""default"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""10"",`\
`""nanos"": 0`\
`}`\
`},`\
`""commissionAmount"": {`\
`""sum"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""30"",`\
`""nanos"": 10000000`\
`},`\
`""default"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""30"",`\
`""nanos"": 10000000`\
`}`\
`},`\
`""currentBalanceAmount"": {`\
`""sum"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""695"",`\
`""nanos"": 790000002`\
`},`\
`""default"": {`\
`""currencyCode"": ""USD"",`\
`""units"": ""695"",`\
`""nanos"": 790000002`\
`}`\
`},`\
`""comment"": ""Test"",`\
`""isParent"": false,`\
`""reference"": ""Test"",`\
`""customer"": {`\
`""id"": ""D7k3xbc-ERrj-lde9k1t3XuaE"",`\
`""name"": """"`\
`},`\
`""documents"": []`\
`}`\
`}"`


# Get Operation

Retrieves detailed information about a specific financial operation, including complete transaction details, amounts, status, and associated documents.

**Endpoint**

`GET/v2/billing/operation/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_GetOperation>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                   | Required | Example      |
| --------- | -------- | ----------------------------- | -------- | ------------ |
| **`id`**  | `string` | **Operation ID** to retrieve. | Yes      | `"op_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the complete operation object with all details.

#### **Response Fields**

**Operation Object**

| Field                      | Type      | Description                                                                                                                                                                                                                                                   | Example                  |
| -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **`opid`**                 | `string`  | **Unique operation ID**.                                                                                                                                                                                                                                      | `"op_12345"`             |
| **`isVisible`**            | `boolean` | **Visibility status**.                                                                                                                                                                                                                                        | `true`                   |
| **`status`**               | `string`  | <p><strong>Current status</strong>:<br>- <code>NEW</code>: Created<br>- <code>PENDING</code>: Under review<br>- <code>WORKING</code>: Processing<br>- <code>SUCCESS</code>: Completed<br>- <code>FAIL</code>: Failed<br>- <code>CANCELED</code>: Canceled</p> | `"SUCCESS"`              |
| **`type`**                 | `string`  | <p><strong>Operation type</strong>:<br>- <code>NOTSET</code><br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code><br>- <code>CORRECTING</code></p>                         | `"TRANSFER"`             |
| **`paymentType`**          | `string`  | <p><strong>Payment method</strong>:<br>- <code>EMPTY</code><br>- <code>ACH</code><br>- <code>FEDWIRE</code><br>- <code>SWIFT</code><br>- <code>CRYPTO</code><br>- <code>EFT</code><br>- <code>SEPA\_CT</code><br>- <code>IMPS</code></p>                      | `"SWIFT"`                |
| **`createdAt`**            | `string`  | Creation timestamp (ISO 8601).                                                                                                                                                                                                                                | `"2024-05-20T10:30:00Z"` |
| **`updatedAt`**            | `string`  | Last update timestamp (ISO 8601).                                                                                                                                                                                                                             | `"2024-05-20T14:45:00Z"` |
| **`source`**               | `object`  | **Source account details**.                                                                                                                                                                                                                                   | -                        |
| **`destination`**          | `object`  | **Destination account details**.                                                                                                                                                                                                                              | -                        |
| **`sourceAmount`**         | `object`  | **Source amount** with currency.                                                                                                                                                                                                                              | -                        |
| **`destinationAmount`**    | `object`  | **Destination amount** with currency.                                                                                                                                                                                                                         | -                        |
| **`commissionAmount`**     | `object`  | **Commission amount** with currency.                                                                                                                                                                                                                          | -                        |
| **`currentBalanceAmount`** | `object`  | **Current balance** after operation.                                                                                                                                                                                                                          | -                        |
| **`comment`**              | `string`  | **Operation comment/notes**.                                                                                                                                                                                                                                  | `"Supplier payment"`     |
| **`isParent`**             | `boolean` | **Parent operation flag**.                                                                                                                                                                                                                                    | `true`                   |
| **`reference`**            | `string`  | **Reference number**.                                                                                                                                                                                                                                         | `"REF202405201234"`      |
| **`customer`**             | `object`  | **Customer details**.                                                                                                                                                                                                                                         | -                        |
| **`documents`**            | `array`   | **Associated documents**.                                                                                                                                                                                                                                     | -                        |

**Source/Destination Objects**

Contains nested objects for:

* **`account`**: Account details (id, name, number, customer)
* **`counterpartyAccount`**: Counterparty details with bank information
* **`customer`**: Customer information (cuid, name)

**Money Object**

Used in amount fields:

| Field              | Type      | Description               | Example               |
| ------------------ | --------- | ------------------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code (ISO 4217). | `"USD"`               |
| **`units`**        | `string`  | Whole units.              | `"1000"`              |
| **`nanos`**        | `integer` | Fractional units (10^-9). | `500000000` (= $0.50) |

**Document Object**

| Field          | Type      | Description                               | Example                  |
| -------------- | --------- | ----------------------------------------- | ------------------------ |
| **`guid`**     | `string`  | **Document unique ID**.                   | `"doc_abc123"`           |
| **`fileName`** | `string`  | **Original filename**.                    | `"invoice.pdf"`          |
| **`size`**     | `integer` | **File size in bytes**.                   | `1024000`                |
| **`mime`**     | `string`  | **MIME type**.                            | `"application/pdf"`      |
| **`docType`**  | `string`  | **Document type** (see values in sample). | `"BANK_STATEMENT"`       |
| **`createAt`** | `string`  | **Upload timestamp**.                     | `"2024-05-20T11:00:00Z"` |

**Example Response (Successful Transfer):**

```json
{
  "item": {
    "opid": "op_12345",
    "isVisible": true,
    "status": "SUCCESS",
    "type": "TRANSFER",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-20T14:45:00Z",
    "source": {
      "account": {
        "id": "acc_12345",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "cpa_78901",
        "name": "Supplier Account",
        "number": "IBAN123456789",
        "counterparty": {
          "suid": "suid_abc123",
          "name": "Global Suppliers Ltd",
          "bankName": "International Bank",
          "bankAddress": {
            "addressLine1": "123 Main Street",
            "city": "London",
            "countryIso": "GB",
            "postalCode": "SW1A 1AA"
          }
        },
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "4600",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "Q2 supplier payment",
    "isParent": true,
    "reference": "REF202405201234",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": [
      {
        "guid": "doc_abc123",
        "fileName": "invoice_2024_q2.pdf",
        "size": 1024000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "createAt": "2024-05-20T11:00:00Z"
      }
    ]
  }
}
```

**Example Response (Pending Withdrawal):**

```json
{
  "item": {
    "opid": "op_67890",
    "isVisible": true,
    "status": "PENDING",
    "type": "WITHDRAW",
    "paymentType": "CRYPTO",
    "createdAt": "2024-05-21T09:15:00Z",
    "updatedAt": "2024-05-21T09:15:00Z",
    "source": {
      "account": {
        "id": "acc_btc123",
        "name": "BTC Wallet",
        "number": "BTC001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "cpa_crypto456",
        "name": "External Wallet",
        "number": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
        "counterparty": {
          "suid": "suid_crypto789",
          "name": "External BTC Wallet"
        },
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "BTC",
        "units": "1",
        "nanos": 500000000
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "BTC",
        "units": "1",
        "nanos": 500000000
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "BTC",
        "units": "0",
        "nanos": 10000000
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "BTC",
        "units": "5",
        "nanos": 250000000
      }
    },
    "comment": "BTC withdrawal to external wallet",
    "isParent": true,
    "reference": "BTC20240521001",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": []
  }
}
```

***

### **Examples**

#### **Request**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Operation Not Found**:

   ```json
   { "error": "Operation not found: op_99999" }
   ```
2. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Status Tracking**: Use to monitor operation progress through status changes
* **Audit Trail**: Provides complete transaction history for compliance
* **Document Management**: Shows all documents associated with the operation
* **Balance Information**: Includes current balance reflecting the operation's impact
* **Real-time Data**: Reflects the most current operation state

**Common Use Cases**:

* Operation status monitoring
* Transaction details for customer support
* Audit and compliance reporting
* Document verification

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjU0MTQ3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.uTzFrsUHSQp0zdU86OnQVlbWafLlJi3tSvx0bKzBRjk
id*: 8248956e-a002-4404-aafc-be8fd8dc16b6

```

Response sample

```postman_json
{
  "item": {
    "operationId": "8248956e-a002-4404-aafc-be8fd8dc16b6",
    "isVisible": true,
    "status": "PENDING",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2025-10-28T12:09:33Z",
    "updatedAt": "2025-10-28T12:11:33Z",
    "source": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USDT_ERC20",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      },
      "default": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      }
    },
    "comment": "testapi",
    "isParent": false,
    "reference": "string",
    "customer": {
      "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "name": ""
    },
    "documents": []
  }
}
```


# Add Document

Attaches an existing document to a specific operation. This is used to associate supporting documentation (invoices, contracts, etc.) with financial operations for compliance, verification, and audit

**Endpoint**

`POST/v2/billing/operation/{id}/document`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_AddDocument>" %}

First, you need to use the **Upload Document** method. In response, we receive a document ID, which we then specify in the **Add Document** method. The URL in the method must include the ID of the operation to which we are attaching the document: `{{baseUrl}}/v2/billing/operation/5b55db86-17e5-4612-81f9-29d3bd5082a1/document`

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                             | Required | Example                                  |
| --------- | -------- | --------------------------------------- | -------- | ---------------------------------------- |
| **`id`**  | `string` | **Operation ID** to attach document to. | Yes      | `"5b55db86-17e5-4612-81f9-29d3bd5082a1"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field            | Type     | Description & Requirements                                          | Required | Example             |
| ---------------- | -------- | ------------------------------------------------------------------- | -------- | ------------------- |
| **`documentId`** | `string` | **ID of the document** (must be previously uploaded to the system). | Yes      | `"doc_abc123"`      |
| **`name`**       | `string` | **Document display name** (for reference).                          | No       | `"Invoice_Q2_2024"` |

**Example Request Body:**

```json
{
  "documentId": "doc_abc123",
  "name": "Supplier Invoice Q2 2024"
}
```

**Example Request Body (Minimal):**

```json
{
  "documentId": "doc_xyz789"
}
```

***

### **Response (200 OK)**

Returns the updated operation object with the newly attached document included in the documents array.

#### **Response Fields**

Returns the complete operation object (same structure as Get Operation), with the documents array updated to include the new document.

**Example Response:**

```json
{
  "item": {
    "opid": "5b55db86-17e5-4612-81f9-29d3bd5082a1",
    "isVisible": true,
    "status": "PENDING",
    "type": "WITHDRAW",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-21T14:20:00Z",
    "source": {
      "account": {
        "id": "	Ug6wl1EwArKX",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "	Uk8wl1EwArKJ",
        "name": "Supplier Account",
        "number": "IBAN123456789",
        "counterparty": {
          "suid": "D8j3xbc-ERrj-lde4k1t3XuaO",
          "name": "Global Suppliers Ltd",
          "bankName": "International Bank"
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "4600",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "Q2 supplier payment",
    "isParent": true,
    "reference": "REF202405201234",
    "customer": {
      "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "name": "Acme Inc."
    },
    "documents": [
      {
        "guid": "doc_abc123",
        "fileName": "invoice_q2_2024.pdf",
        "size": 1024000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "info": "Supplier Invoice Q2 2024",
        "isLock": false,
        "createAt": "2024-05-21T14:20:00Z"
      }
    ]
  }
}
```

**Example Response (Multiple Documents):**

```json
{
  "item": {
    "opid": "5b55db86-17e5-4612-81f9-29d3bd5082a1",
    "isVisible": true,
    "status": "PENDING",
    "type": "WITHDRAW",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-21T14:20:00Z",
    "source": {
      "account": {
        "id": "	Ug6wl1EwArKX",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "	Uk6wl1EwArKr",
        "name": "Supplier Account",
        "number": "IBAN123456789",
        "counterparty": {
          "suid": "D8j3xbc-ERrj-lde4k1t3XuaO",
          "name": "Global Suppliers Ltd",
          "bankName": "International Bank"
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "4600",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "Q2 supplier payment",
    "isParent": true,
    "reference": "REF202405201234",
    "customer": {
      "cuid": "D8j3xbc-ERrj-lde4k1t3XuaO",
      "name": "Acme Inc."
    },
    "documents": [
      {
        "guid": "doc_abc123",
        "fileName": "invoice_q2_2024.pdf",
        "size": 1024000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "info": "Supplier Invoice Q2 2024",
        "isLock": false,
        "createAt": "2024-05-21T14:20:00Z"
      },
      {
        "guid": "doc_def456",
        "fileName": "contract_agreement.pdf",
        "size": 2048000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "info": "Service Contract",
        "isLock": false,
        "createAt": "2024-05-21T14:25:00Z"
      }
    ]
  }
}
```

***

### **Examples**

#### **Request**

```bash
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "documentId": "doc_abc123",
    "name": "Supplier Invoice Q2 2024"
  }'
```

#### <mark style="color:red;">Request with Multiple Documents</mark>

*Note: Call endpoint multiple times to add multiple documents*

```bash
# First document
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "documentId": "doc_abc123",
    "name": "Invoice Q2 2024"
  }'

# Second document  
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "documentId": "doc_def456",
    "name": "Contract Agreement"
  }'
```

***

### <mark style="color:red;">Error Responses</mark>

1. **Operation Not Found**:

   ```json
   { "error": "Operation not found: op_99999" }
   ```
2. **Document Not Found**:

   ```json
   { "error": "Document not found: doc_99999" }
   ```
3. **Document Already Attached**:

   ```json
   { "error": "Document already attached to this operation" }
   ```
4. **Operation Not Editable**:

   ```json
   { "error": "Cannot modify documents for completed operations" }
   ```

***

### **Notes**

* **Document Pre-upload**: Documents must be uploaded to the system first (via separate document upload endpoint)
* **Multiple Documents**: Can attach multiple documents to a single operation
* **Document Types**: Various document types supported (invoices, contracts, statements, etc.)
* **Status Restrictions**: Typically cannot add documents to completed/failed/canceled operations
* **Audit Trail**: Document attachments are logged for compliance

**Typical Workflow**:

1. Upload document via document upload endpoint → returns `documentId`
2. Create operation or get existing operation ID
3. Attach document to operation using this endpoint
4. Operation appears in operation details with attached documents

Request sample

```
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjU0MTQ3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.uTzFrsUHSQp0zdU86OnQVlbWafLlJi3tSvx0bKzBRjk
id*: 8248956e-a002-4404-aafc-be8fd8dc16b6
```

```postman_json
{
  "documentId": "string",
  "name": "string"
}
{
  "documentId": "string",
  "name": "string"
}
```

Response sample

```postman_json
{
  "item": {
    "operationId": "8248956e-a002-4404-aafc-be8fd8dc16b6",
    "isVisible": true,
    "status": "PENDING",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2025-10-28T12:09:33Z",
    "updatedAt": "2025-10-28T12:11:33Z",
    "source": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "string",
        "name": "",
        "number": "",
        "counterparty": null,
        "customer": null
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USDT_ERC20",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      },
      "default": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      }
    },
    "comment": "testapi",
    "isParent": false,
    "reference": "string",
    "customer": {
      "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "name": ""
    },
    "documents": []
  }
}
```


# Remove Document

Removes a previously attached document from a specific operation. This allows for document management and correction of document associations without affecting the operation itself.

**Endpoint**

`DELETE/v2/billing/operation/{id}/document/{documentId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_RemoveDocument>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                               | Required | Example        |
| ---------------- | -------- | ----------------------------------------- | -------- | -------------- |
| **`id`**         | `string` | **Operation ID** to remove document from. | Yes      | `"op_12345"`   |
| **`documentId`** | `string` | **Document ID** to remove from operation. | Yes      | `"doc_abc123"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the updated operation object with the specified document removed from the documents array.

#### **Response Fields**

Returns the complete operation object (same structure as Get Operation), with the documents array updated to exclude the removed document.

**Example Response (After Removing One Document):**

```json
{
  "item": {
    "opid": "op_12345",
    "isVisible": true,
    "status": "PENDING",
    "type": "WITHDRAW",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-21T15:30:00Z",
    "source": {
      "account": {
        "id": "acc_12345",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "cpa_78901",
        "name": "Supplier Account",
        "number": "IBAN123456789",
        "counterparty": {
          "suid": "suid_abc123",
          "name": "Global Suppliers Ltd",
          "bankName": "International Bank"
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "4600",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "Q2 supplier payment",
    "isParent": true,
    "reference": "REF202405201234",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": [
      {
        "guid": "doc_def456",
        "fileName": "contract_agreement.pdf",
        "size": 2048000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "info": "Service Contract",
        "isLock": false,
        "createAt": "2024-05-21T14:25:00Z"
      }
    ]
  }
}
```

**Example Response (After Removing All Documents):**

```json
{
  "item": {
    "opid": "op_12345",
    "isVisible": true,
    "status": "PENDING",
    "type": "WITHDRAW",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-21T15:30:00Z",
    "source": {
      "account": {
        "id": "acc_12345",
        "name": "Business USD Account",
        "number": "ACC001",
        "customer": {
          "cuid": "cust_12345",
          "name": "Acme Inc."
        }
      }
    },
    "destination": {
      "counterpartyAccount": {
        "id": "cpa_78901",
        "name": "Supplier Account",
        "number": "IBAN123456789",
        "counterparty": {
          "suid": "suid_abc123",
          "name": "Global Suppliers Ltd",
          "bankName": "International Bank"
        }
      }
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "4600",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "Q2 supplier payment",
    "isParent": true,
    "reference": "REF202405201234",
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": []
  }
}
```

***

### **Examples**

#### **Request**

```bash
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document/doc_abc123' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Scenario: Removing Multiple Documents**

*Remove documents one by one using separate requests*

```bash
# Remove first document
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document/doc_abc123' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'

# Remove second document
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/document/doc_def456' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Operation Not Found**:

   ```json
   { "error": "Operation not found: op_99999" }
   ```
2. **Document Not Found**:

   ```json
   { "error": "Document not found: doc_99999" }
   ```
3. **Document Not Attached**:

   ```json
   { "error": "Document doc_abc123 is not attached to operation op_12345" }
   ```
4. **Operation Not Editable**:

   ```json
   { "error": "Cannot modify documents for completed operations" }
   ```
5. **Locked Document**:

   ```json
   { "error": "Document is locked and cannot be removed" }
   ```

***

### **Notes**

* **Document Preservation**: The document itself is not deleted from the system, only the association with the operation is removed
* **Multiple Removal**: Can remove multiple documents by calling the endpoint multiple times
* **Status Restrictions**: Typically cannot remove documents from completed/failed/canceled operations
* **Audit Trail**: Document removal is logged for compliance purposes
* **Locked Documents**: Some documents may be locked (e.g., by compliance team) and cannot be removed

**Typical Use Cases**:

* Correcting mistakenly attached documents
* Replacing outdated documents with updated versions
* Removing unnecessary supporting documents
* Compliance cleanup and document management

**Workflow for Document Replacement**:

1. Remove old document using this endpoint
2. Upload new document via document upload endpoint
3. Attach new document to operation using Add Document endpoint

***

### **Security Considerations**

* Requires proper authorization to modify operation documents
* Operations in certain statuses may be restricted from document modifications
* Some documents may have additional protection/locking mechanisms


# Get Customer Operation Tree

Retrieves a hierarchical view of a customer operation, including the main (parent) operation and all its related child operations.

This provides a complete picture of complex transaction chains, such as multi-step transfers, exchanges with commissions, or operations that spawn additional sub-operations.

**Endpoint**

`GET/v2/billing/operation/{id}/tree`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_GetTree>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                            | Required | Example      |
| --------- | -------- | -------------------------------------- | -------- | ------------ |
| **`id`**  | `string` | **Operation ID** to retrieve tree for. | Yes      | `"op_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a hierarchical structure containing the main operation and all its child operations.

#### **Response Fields**

**1. General Object (Parent Operation)**

Contains the main operation details with the same structure as individual operations, plus additional provider information.

| Field                      | Type      | Description                                 | Example                  |
| -------------------------- | --------- | ------------------------------------------- | ------------------------ |
| **`opid`**                 | `string`  | **Unique operation ID**.                    | `"op_12345"`             |
| **`isVisible`**            | `boolean` | **Visibility status**.                      | `true`                   |
| **`status`**               | `string`  | **Current status**.                         | `"SUCCESS"`              |
| **`type`**                 | `string`  | **Operation type**.                         | `"EXCHANGE"`             |
| **`paymentType`**          | `string`  | **Payment method**.                         | `"EMPTY"`                |
| **`createdAt`**            | `string`  | Creation timestamp.                         | `"2024-05-20T10:30:00Z"` |
| **`updatedAt`**            | `string`  | Last update timestamp.                      | `"2024-05-20T14:45:00Z"` |
| **`source`**               | `object`  | **Source details** with provider info.      | -                        |
| **`destination`**          | `object`  | **Destination details** with provider info. | -                        |
| **`sourceAmount`**         | `object`  | **Source amount**.                          | -                        |
| **`destinationAmount`**    | `object`  | **Destination amount**.                     | -                        |
| **`commissionAmount`**     | `object`  | **Commission amount**.                      | -                        |
| **`currentBalanceAmount`** | `object`  | **Current balance**.                        | -                        |
| **`comment`**              | `string`  | **Operation comment**.                      | `"Currency exchange"`    |
| **`reference`**            | `string`  | **Reference number**.                       | `"REF202405201234"`      |
| **`isParent`**             | `boolean` | **Parent operation flag**.                  | `true`                   |
| **`customer`**             | `object`  | **Customer details**.                       | -                        |
| **`documents`**            | `array`   | **Associated documents**.                   | -                        |

**2. Source/Destination Provider Objects**

Enhanced source/destination objects with provider information:

| Field                    | Type     | Description                                  | Example        |
| ------------------------ | -------- | -------------------------------------------- | -------------- |
| **`account`**            | `string` | **Account ID**.                              | `"acc_12345"`  |
| **`beneficiar`**         | `string` | **Beneficiary ID**.                          | `"benef_abc"`  |
| **`accountProvider`**    | `string` | **Account provider**: `UNSET`, `LAYER2`.     | `"LAYER2"`     |
| **`beneficiarProvider`** | `string` | **Beneficiary provider**: `UNSET`, `LAYER2`. | `"LAYER2"`     |
| **`cuid`**               | `string` | **Customer ID**.                             | `"cust_12345"` |

**3. Childs Array**

Array of child operations with the same structure as the parent operation. Child operations are typically:

* Commission operations
* Fee operations
* Related sub-transactions
* Split payments

**4. Money Object**

Same structure as individual operations for all amount fields.

**Example Response (Exchange Operation with Commission Child):**

```json
{
  "general": {
    "opid": "op_12345",
    "isVisible": true,
    "status": "SUCCESS",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2024-05-20T10:30:00Z",
    "updatedAt": "2024-05-20T14:45:00Z",
    "source": {
      "account": "acc_usd123",
      "beneficiar": "",
      "accountProvider": "LAYER2",
      "beneficiarProvider": "UNSET",
      "cuid": "cust_12345"
    },
    "destination": {
      "account": "acc_eur456",
      "beneficiar": "",
      "accountProvider": "LAYER2",
      "beneficiarProvider": "UNSET",
      "cuid": "cust_12345"
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "1000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "EUR",
        "units": "920",
        "nanos": 500000000
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "10",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "15000",
        "nanos": 0
      }
    },
    "comment": "USD to EUR exchange",
    "reference": "EXCH20240520001",
    "isParent": true,
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": []
  },
  "childs": [
    {
      "opid": "op_12346",
      "isVisible": true,
      "status": "SUCCESS",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2024-05-20T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z",
      "source": {
        "account": "acc_usd123",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "cust_12345"
      },
      "destination": {
        "account": "acc_commission",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "system"
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "10",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "currentBalanceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "14990",
          "nanos": 0
        }
      },
      "comment": "Exchange commission",
      "reference": "COMM20240520001",
      "isParent": false,
      "customer": {
        "cuid": "cust_12345",
        "name": "Acme Inc."
      },
      "documents": []
    }
  ]
}
```

**Example Response (Complex Transfer with Multiple Children):**

```json
{
  "general": {
    "opid": "op_78901",
    "isVisible": true,
    "status": "WORKING",
    "type": "TRANSFER",
    "paymentType": "SWIFT",
    "createdAt": "2024-05-21T09:15:00Z",
    "updatedAt": "2024-05-21T09:15:00Z",
    "source": {
      "account": "acc_12345",
      "beneficiar": "",
      "accountProvider": "LAYER2",
      "beneficiarProvider": "UNSET",
      "cuid": "cust_12345"
    },
    "destination": {
      "account": "",
      "beneficiar": "benef_abc123",
      "accountProvider": "UNSET",
      "beneficiarProvider": "LAYER2",
      "cuid": "cust_12345"
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "5000",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "25",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "45000",
        "nanos": 0
      }
    },
    "comment": "International supplier payment",
    "reference": "SWIFT20240521001",
    "isParent": true,
    "customer": {
      "cuid": "cust_12345",
      "name": "Acme Inc."
    },
    "documents": [
      {
        "guid": "doc_abc123",
        "fileName": "invoice.pdf",
        "size": 1024000,
        "mime": "application/pdf",
        "docType": "OPERATION_DOCUMENT",
        "createAt": "2024-05-21T09:10:00Z"
      }
    ]
  },
  "childs": [
    {
      "opid": "op_78902",
      "isVisible": true,
      "status": "SUCCESS",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2024-05-21T09:15:00Z",
      "updatedAt": "2024-05-21T09:15:00Z",
      "source": {
        "account": "acc_12345",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "cust_12345"
      },
      "destination": {
        "account": "acc_fees",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "system"
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "25",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "25",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "comment": "SWIFT transfer fee",
      "isParent": false,
      "customer": {
        "cuid": "cust_12345",
        "name": "Acme Inc."
      },
      "documents": []
    }
  ]
}
```

***

### **Examples**

#### **Request**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/operation/op_12345/tree' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Operation Not Found**:

   ```json
   { "error": "Operation not found: op_99999" }
   ```
2. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Hierarchical View**: Provides complete transaction chain visibility
* **Provider Information**: Includes account/beneficiary provider details for multi-provider environments
* **Child Operations**: Automatically generated operations (commissions, fees) appear as children
* **Status Aggregation**: Child operations may have different statuses than parent
* **Audit Trail**: Complete picture of all related financial movements

**Common Parent-Child Relationships**:

* **Exchange** → **Commission** (fee for currency conversion)
* **Transfer** → **Commission** (transfer fee)
* **Withdrawal** → **Commission** (withdrawal fee)
* **Complex transfers** with multiple legs

**Provider Types**:

* `UNSET`: Standard internal accounts
* `LAYER2`: External layer 2 providers or partner systems

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjU0NjAxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.VKC2LZ4pP-LGZWkK6wAKMkqU0JFmM9lOmI8EeowOkjM
id*: 8248956e-a002-4404-aafc-be8fd8dc16b6

```

Response sample

```postman_json
{
  "general": {
    "operationId": "8248956e-a002-4404-aafc-be8fd8dc16b6",
    "isVisible": true,
    "status": "PENDING",
    "type": "EXCHANGE",
    "paymentType": "EMPTY",
    "createdAt": "2025-10-28T12:09:33Z",
    "updatedAt": "2025-10-28T12:11:33Z",
    "source": {
      "account": "UjmLCEcZCXzb",
      "beneficiar": "string",
      "accountProvider": "LAYER2",
      "beneficiarProvider": "UNSET",
      "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE"
    },
    "destination": {
      "account": "UrpI6jMzHnsP",
      "beneficiar": "string",
      "accountProvider": "LAYER2",
      "beneficiarProvider": "UNSET",
      "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE"
    },
    "sourceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "destinationAmount": {
      "sum": {
        "currencyCode": "USDT_ERC20",
        "units": "98",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "98",
        "nanos": 0
      }
    },
    "commissionAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      },
      "default": {
        "currencyCode": "USD",
        "units": "2",
        "nanos": 0
      }
    },
    "currentBalanceAmount": {
      "sum": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      },
      "default": {
        "currencyCode": "USD",
        "units": "835",
        "nanos": 800000002
      }
    },
    "comment": "testapi",
    "reference": "string",
    "isParent": false,
    "customer": {
      "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
      "name": ""
    },
    "documents": []
  },
  "childs": [
    {
      "operationId": "8ff0d897-b171-47ca-931c-badbc020ee29",
      "isVisible": false,
      "status": "PENDING",
      "type": "MOVE",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-28T12:09:33Z",
      "updatedAt": "2025-10-28T12:11:33Z",
      "source": {
        "account": "UjmLCEcZCXzb",
        "beneficiar": "string",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE"
      },
      "destination": {
        "account": "UrpI6jMzHnsP",
        "beneficiar": "string",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE"
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USDT_ERC20",
          "units": "98",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "98",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "currentBalanceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "835",
          "nanos": 800000002
        },
        "default": {
          "currencyCode": "USD",
          "units": "835",
          "nanos": 800000002
        }
      },
      "comment": "Move for operation: 8248956e-a002-4404-aafc-be8fd8dc16b6",
      "reference": "string",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": ""
      },
      "documents": []
    },
    {
      "operationId": "f8b01976-4e36-46e5-8d3a-f26db8c74b91",
      "isVisible": false,
      "status": "PENDING",
      "type": "COMMISSION",
      "paymentType": "EMPTY",
      "createdAt": "2025-10-28T12:09:33Z",
      "updatedAt": "2025-10-28T12:11:33Z",
      "source": {
        "account": "UjmLCEcZCXzb",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "D7k3xbc-ERrj-lde9k1t3XuaE"
      },
      "destination": {
        "account": "UcJlzOBpEhCE",
        "beneficiar": "",
        "accountProvider": "LAYER2",
        "beneficiarProvider": "UNSET",
        "cuid": "Dnewcvn-euuI-vG0FZCRDjLXS"
      },
      "sourceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        }
      },
      "destinationAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "2",
          "nanos": 0
        }
      },
      "commissionAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        },
        "default": {
          "currencyCode": "USD",
          "units": "0",
          "nanos": 0
        }
      },
      "currentBalanceAmount": {
        "sum": {
          "currencyCode": "USD",
          "units": "835",
          "nanos": 800000002
        },
        "default": {
          "currencyCode": "USD",
          "units": "835",
          "nanos": 800000002
        }
      },
      "comment": "Commission for operation: 8248956e-a002-4404-aafc-be8fd8dc16b6",
      "reference": "",
      "isParent": false,
      "customer": {
        "id": "D7k3xbc-ERrj-lde9k1t3XuaE",
        "name": ""
      },
      "documents": []
    }
  ]
}
```


# Get Commissions

Retrieves commission configurations with comprehensive filtering capabilities.

This endpoint returns commission rates for various transaction types, currencies, and customers, allowing partners to view their commission structures and overrides.

**Endpoint**

`GET/v2/billing/commission`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_GetCommissions>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `GET`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/billing/commission`

#### **Query Parameters**

**Currency & Transaction Filters**

| Parameter             | Type     | Description                           | Required | Example    |
| --------------------- | -------- | ------------------------------------- | -------- | ---------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.         | No       | `USD`      |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.         | No       | `EUR`      |
| **`operationType`**   | `string` | **Type of operation** (see values).   | No       | `TRANSFER` |
| **`paymentType`**     | `string` | **Payment method type** (see values). | No       | `SWIFT`    |

**Customer Filters**

| Parameter              | Type      | Description                | Required | Example       |
| ---------------------- | --------- | -------------------------- | -------- | ------------- |
| **`customerCuid`**     | `string`  | **Customer identifier**.   | No       | `cust_abc123` |
| **`customerName`**     | `string`  | **Customer name**.         | No       | `Acme Corp`   |
| **`withAllCustomers`** | `boolean` | **Include all customers**. | No       | `true`        |

**Date Range Filters**

| Parameter           | Type     | Description                           | Required | Example                |
| ------------------- | -------- | ------------------------------------- | -------- | ---------------------- |
| **`fromCreatedAt`** | `string` | **Start creation date** (ISO format). | No       | `2024-01-01T00:00:00Z` |
| **`toCreatedAt`**   | `string` | **End creation date** (ISO format).   | No       | `2024-03-31T23:59:59Z` |
| **`fromUpdatedAt`** | `string` | **Start update date** (ISO format).   | No       | `2024-01-01T00:00:00Z` |
| **`toUpdatedAt`**   | `string` | **End update date** (ISO format).     | No       | `2024-03-31T23:59:59Z` |

**Operation Type Values**

* `NOTSET` - No specific type
* `DEPOSIT` - Deposit operations
* `TRANSFER` - Transfer operations
* `WITHDRAW` - Withdrawal operations
* `COMMISSION` - Commission operations
* `EXCHANGE` - Currency exchange
* `CORRECTING` - Correction operations

**Payment Type Values**

* `PAYMENT_TYPE_NOT_SET` - No specific payment type
* `EMPTY` - Empty payment type
* `ACH` - Automated Clearing House
* `FEDWIRE` - Fedwire transfers
* `SWIFT` - SWIFT transfers
* `CRYPTO` - Cryptocurrency
* `EFT` - Electronic Funds Transfer
* `SEPA_CT` - SEPA Credit Transfer
* `IMPS` - Immediate Payment Service

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns an array of commission configurations matching the filter criteria.

#### **Response Fields**

**Commission Object (`items[]`)**

| Field                 | Type     | Description                        | Example                |
| --------------------- | -------- | ---------------------------------- | ---------------------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.      | `USD`                  |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.      | `EUR`                  |
| **`operationType`**   | `string` | **Operation type**.                | `TRANSFER`             |
| **`paymentType`**     | `string` | **Payment method type**.           | `SWIFT`                |
| **`createdAt`**       | `string` | **Commission creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updatedAt`**       | `string` | **Last update timestamp**.         | `2024-03-20T14:22:00Z` |
| **`customerCuid`**    | `string` | **Customer identifier**.           | `cust_abc123`          |
| **`customerName`**    | `string` | **Customer name**.                 | `Acme Corporation`     |

**Commission Structure (`commission`)**

| Field         | Type     | Description                            | Example |
| ------------- | -------- | -------------------------------------- | ------- |
| **`partner`** | `object` | **Partner-specific commission rates**. |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `0.5`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `2.5`   |
| **`default`** | `object` | **Default system commission rates**.   |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `1.0`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `5.0`   |

**Example Response:**

```json
{
  "items": [
    {
      "currencyIsoFrom": "USD",
      "currencyIsoTo": "EUR",
      "operationType": "TRANSFER",
      "paymentType": "SWIFT",
      "commission": {
        "partner": {
          "percent": 0.5,
          "fixed": 2.5
        },
        "default": {
          "percent": 1.0,
          "fixed": 5.0
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-03-20T14:22:00Z",
      "customerCuid": "cust_abc123",
      "customerName": "Acme Corporation"
    },
    {
      "currencyIsoFrom": "EUR",
      "currencyIsoTo": "GBP",
      "operationType": "EXCHANGE",
      "paymentType": "SEPA_CT",
      "commission": {
        "partner": {
          "percent": 0.3,
          "fixed": 1.5
        },
        "default": {
          "percent": 0.8,
          "fixed": 3.0
        }
      },
      "createdAt": "2024-02-01T09:15:00Z",
      "updatedAt": "2024-02-01T09:15:00Z",
      "customerCuid": null,
      "customerName": null
    }
  ]
}
```

***

### **Examples**

#### **Basic Commission Query (cURL)**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **Filter by Currency and Operation**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission?currencyIsoFrom=USD&currencyIsoTo=EUR&operationType=TRANSFER' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **Filter by Customer and Date Range**

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/billing/commission?customerCuid=cust_abc123&fromCreatedAt=2024-01-01T00:00:00Z&toCreatedAt=2024-03-31T23:59:59Z' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
2. **Invalid Date Format**:

   ```json
   { "error": "Invalid date format for fromCreatedAt" }
   ```
3. **Invalid Operation Type**:

   ```json
   { "error": "Invalid operation type: INVALID_TYPE" }
   ```

***

### **Notes**

#### **Commission Hierarchy**

* **Partner rates**: Custom rates specific to your partner account
* **Default rates**: Base rates that apply when no partner rates exist
* **Customer-specific overrides**: Rates that apply to specific customers

#### **Filtering Logic**

* Multiple filters are combined with AND logic
* Omitted filters return all matching records
* Date ranges are inclusive
* Currency filters can be used for conversion rate commissions

#### **Best Practices**

* Cache commission data to reduce API calls
* Use specific filters to narrow down results
* Monitor `updatedAt` for changes in commission structures
* Handle null customer fields for general commission rates

**Common Use Cases**:

* Displaying commission rates in partner dashboards
* Calculating expected earnings from transactions
* Auditing commission structures and changes
* Customer-specific rate negotiations

**Rate Calculation Example**:\
For a $1000 transfer with 0.5% + $2.50 commission:

```javascript
amount = 1000
commission = (amount * 0.005) + 2.50 = $7.50
```

**Data Freshness**:

* Commission rates may change based on market conditions
* Always use the latest rates for accurate calculations
* Consider implementing rate change notifications

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTczNTM5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.XjFwaZNQo1LGgvylorJLRZqXyJP11bx2HNtIGbbClf0
currencyCodeFrom: EUR
currencyCodeTo: string
customerId: Dnewcvn-euuI-vG0FZCRDjLXS
customerName: Test Eugen Test Eugen
fromCreatedAt:

```

Response sample

```postman_json
{
  "items": [
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "EMPTY",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "ACH",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "FEDWIRE",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "SWIFT",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "CRYPTO",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "EFT",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "SEPA_CT",
      "commission": {
        "partner": {
          "percent": 0.1,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    },
    {
      "currencyCodeFrom": "EUR",
      "currencyCodeTo": "EUR",
      "operationType": "WITHDRAW",
      "paymentType": "IMPS",
      "commission": {
        "partner": {
          "percent": 0,
          "fixed": 0
        },
        "default": {
          "percent": 0,
          "fixed": 0
        }
      },
      "createdAt": "2025-08-11T10:41:52Z",
      "updatedAt": "2025-08-11T13:41:53Z",
      "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
      "customerName": "Test Eugen Test Eugen"
    }
  ]
}
```


# Set Commission

Creates or updates a commission configuration for specific transaction parameters.

This endpoint allows partners to set custom commission rates for various currency pairs, operation types, and payment methods, with optional customer-specific overrides.

**Endpoint**

`POST/v2/billing/commission`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_SetCommission>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `POST`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/billing/commission`

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Request Body (JSON)**

**Required Parameters**

| Field                 | Type     | Description                     | Required | Example |
| --------------------- | -------- | ------------------------------- | -------- | ------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.   | Yes      | `USD`   |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.   | Yes      | `EUR`   |
| **`percent`**         | `number` | **Percentage commission rate**. | Yes      | `0.5`   |
| **`fixed`**           | `number` | **Fixed commission amount**.    | Yes      | `2.5`   |

**Optional Parameters**

| Field               | Type     | Description                            | Required | Example       |
| ------------------- | -------- | -------------------------------------- | -------- | ------------- |
| **`customerId`**    | `string` | **Customer ID for specific override**. | No       | `cust_abc123` |
| **`operationType`** | `string` | **Type of operation** (see values).    | No       | `TRANSFER`    |
| **`paymentType`**   | `string` | **Payment method type** (see values).  | No       | `SWIFT`       |

**Operation Type Values**

* `NOTSET` - Applies to all operation types
* `DEPOSIT` - Deposit operations
* `TRANSFER` - Transfer operations
* `WITHDRAW` - Withdrawal operations
* `COMMISSION` - Commission operations
* `EXCHANGE` - Currency exchange
* `CORRECTING` - Correction operations

**Payment Type Values**

* `EMPTY` - Applies to all payment types
* `ACH` - Automated Clearing House
* `FEDWIRE` - Fedwire transfers
* `SWIFT` - SWIFT transfers
* `CRYPTO` - Cryptocurrency
* `EFT` - Electronic Funds Transfer
* `SEPA_CT` - SEPA Credit Transfer
* `IMPS` - Immediate Payment Service

**Example Request Body (General Commission):**

```json
{
  "currencyIsoFrom": "USD",
  "currencyIsoTo": "EUR",
  "percent": 0.5,
  "fixed": 2.5
}
```

**Example Request Body (Customer-Specific):**

```json
{
  "customerId": "cust_abc123",
  "currencyIsoFrom": "USD",
  "currencyIsoTo": "EUR",
  "operationType": "TRANSFER",
  "paymentType": "SWIFT",
  "percent": 0.3,
  "fixed": 1.5
}
```

***

### **Response (200 OK)**

Returns the created or updated commission configuration.

#### **Response Fields**

**Commission Object (`item`)**

| Field                 | Type     | Description                        | Example                |
| --------------------- | -------- | ---------------------------------- | ---------------------- |
| **`currencyIsoFrom`** | `string` | **Source currency ISO code**.      | `USD`                  |
| **`currencyIsoTo`**   | `string` | **Target currency ISO code**.      | `EUR`                  |
| **`operationType`**   | `string` | **Operation type**.                | `TRANSFER`             |
| **`paymentType`**     | `string` | **Payment method type**.           | `SWIFT`                |
| **`createdAt`**       | `string` | **Commission creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updatedAt`**       | `string` | **Last update timestamp**.         | `2024-03-20T14:22:00Z` |
| **`customerCuid`**    | `string` | **Customer identifier**.           | `cust_abc123`          |
| **`customerName`**    | `string` | **Customer name**.                 | `Acme Corporation`     |

**Commission Structure (`commission`)**

| Field         | Type     | Description                            | Example |
| ------------- | -------- | -------------------------------------- | ------- |
| **`partner`** | `object` | **Partner-specific commission rates**. |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `0.5`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `2.5`   |
| **`default`** | `object` | **Default system commission rates**.   |         |
| → `percent`   | `number` | **Percentage commission rate**.        | `1.0`   |
| → `fixed`     | `number` | **Fixed commission amount**.           | `5.0`   |

**Example Response:**

```json
{
  "item": {
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "EUR",
    "operationType": "TRANSFER",
    "paymentType": "SWIFT",
    "commission": {
      "partner": {
        "percent": 0.5,
        "fixed": 2.5
      },
      "default": {
        "percent": 1.0,
        "fixed": 5.0
      }
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-03-20T14:22:00Z",
    "customerCuid": "cust_abc123",
    "customerName": "Acme Corporation"
  }
}
```

***

### **Examples**

#### **Set General Commission Rate (cURL)**

```bash
curl --request POST \
  --url https://stagep.tst-apidmndelss.com/v2/billing/commission \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "EUR",
    "percent": 0.5,
    "fixed": 2.5
  }'
```

#### **Set Customer-Specific Commission**

```bash
curl --request POST \
  --url https://stagep.tst-apidmndelss.com/v2/billing/commission \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "customerId": "cust_abc123",
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "EUR",
    "operationType": "TRANSFER",
    "paymentType": "SWIFT",
    "percent": 0.3,
    "fixed": 1.5
  }'
```

#### **Set Exchange-Specific Commission**

```bash
curl --request POST \
  --url https://stagep.tst-apidmndelss.com/v2/billing/commission \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "currencyIsoFrom": "EUR",
    "currencyIsoTo": "GBP",
    "operationType": "EXCHANGE",
    "percent": 0.2,
    "fixed": 1.0
  }'
```

***

### **Error Responses**

1. **Missing Required Fields**:

   ```json
   { "error": "Missing required field: currencyIsoFrom" }
   ```
2. **Invalid Currency Code**:

   ```json
   { "error": "Invalid currency code: INVALID_CURRENCY" }
   ```
3. **Invalid Operation Type**:

   ```json
   { "error": "Invalid operation type: INVALID_TYPE" }
   ```
4. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_invalid_id" }
   ```
5. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

***

### **Notes**

#### **Commission Hierarchy**

* **General rates**: Apply when no specific customer or operation type matches
* **Operation-specific**: Override general rates for specific operation types
* **Payment-specific**: Override for specific payment methods
* **Customer-specific**: Highest priority, override all other rates

#### **Rate Validation**

* Percentage rates should be between 0-100
* Fixed rates should be positive values
* Rates are validated against business rules
* Some rate combinations may require approval

#### **Best Practices**

* Use specific parameters for precise commission targeting
* Test commission calculations before setting rates
* Monitor rate changes and their impact on transactions
* Document rate changes for audit purposes

**Common Use Cases**:

* Setting competitive commission rates for specific markets
* Creating custom rates for VIP customers
* Adjusting rates for specific payment methods
* Implementing promotional pricing strategies

**Rate Calculation Example**:\
For a $1000 transfer with 0.5% + $2.50 commission:

```javascript
amount = 1000
commission = (amount * 0.005) + 2.50 = $7.50
```

**Update Behavior**:

* Creating a commission with existing parameters updates the existing rate
* Rates are effective immediately after successful API call
* Historical transactions use rates effective at transaction time


# List Commission Accounts

Retrieves a paginated list of commission accounting configurations.

This endpoint returns information about pool accounts and commission accounts associated with different currencies, providing visibility into how commissions are managed and allocated financially.

**Endpoint**

`GET/v2/billing/commission/account`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_GetCommissionAccounts>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `GET`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/billing/commission/account`

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of commission account configurations with metadata.

#### **Response Fields**

**Meta Object (`meta`)**

| Field          | Type      | Description                   | Example |
| -------------- | --------- | ----------------------------- | ------- |
| **`pageSize`** | `integer` | **Items per page**.           | `50`    |
| **`page`**     | `integer` | **Current page number**.      | `0`     |
| **`total`**    | `string`  | **Total accounts available**. | `"25"`  |

**Commission Account Object (`items[]`)**

| Field                     | Type     | Description                        | Example           |
| ------------------------- | -------- | ---------------------------------- | ----------------- |
| **`currencyIso`**         | `string` | **Currency ISO code**.             | `USD`             |
| **`poolAccountId`**       | `string` | **Pool account identifier**.       | `pool_acc_123abc` |
| **`commissionAccountId`** | `string` | **Commission account identifier**. | `comm_acc_456def` |

**Example Response:**

```json
{
  "items": [
    {
      "currencyIso": "USD",
      "poolAccountId": "pool_acc_123abc",
      "commissionAccountId": "comm_acc_456def"
    },
    {
      "currencyIso": "EUR",
      "poolAccountId": "pool_acc_789ghi",
      "commissionAccountId": "comm_acc_012jkl"
    },
    {
      "currencyIso": "GBP",
      "poolAccountId": "pool_acc_345mno",
      "commissionAccountId": "comm_acc_678pqr"
    }
  ],
  "meta": {
    "pageSize": 50,
    "page": 0,
    "total": "25"
  }
}
```

***

### **Examples**

#### **Basic Request (cURL)**

```bash
curl --request GET \
  --url https://stagep.tst-apidmndelss.com/v2/billing/commission/account \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
2. **Invalid Request**:

   ```json
   { "error": "Invalid parameters" }
   ```

***

### **Notes**

#### **Account Types Explanation**

* **`poolAccountId`**: Refers to the main account where funds are pooled for a specific currency before commission distribution
* **`commissionAccountId`**: Refers to the specific account where commission earnings are accumulated for the partner
* Each currency typically has separate pool and commission accounts

#### **Pagination**

* The endpoint supports pagination through the `meta` object
* Use `page` and `pageSize` parameters if supported (though not shown in request parameters)
* The `total` field indicates the total number of commission accounts available

#### **Best Practices**

* Cache this information as it doesn't change frequently
* Use the account IDs for financial reconciliation and reporting
* Monitor for new currencies being added to the system
* Integrate with accounting systems using these account identifiers

**Common Use Cases**:

* Financial reconciliation and reporting
* Commission earnings tracking
* Accounting system integration
* Audit and compliance reporting
* Currency-wise commission management

**Integration Examples**:

* Syncing with accounting software like QuickBooks or Xero
* Automated financial reporting systems
* Commission payout processing systems
* Audit trail generation for financial compliance

**Security Considerations**:

* Account IDs are sensitive financial information
* Access should be restricted to authorized financial personnel
* Consider masking account IDs in user interfaces
* Ensure secure storage and transmission of financial data

**Typical Workflow**:

1. Retrieve commission accounts list
2. Use account IDs for financial reconciliation
3. Monitor commission accruals in commission accounts
4. Process commission payouts from pool accounts
5. Generate financial reports using account identifiers

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTczODIyLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.OP992847T1VlkgUa0zx9Wc8Zp17_KdzaZ4DcE-KtoRE

```

Response sample

```postman_json
{
  "items": [
    {
      "currencyCode": "BTC",
      "poolAccountId": "BoaZoNne9k9h",
      "commissionAccountId": "BoaZoNne9k9h"
    },
    {
      "currencyCode": "ETH",
      "poolAccountId": "EIji1yB6o6I6",
      "commissionAccountId": "EIji1yB6o6I6"
    },
    {
      "currencyCode": "EUR",
      "poolAccountId": "EgiHENynfhYe",
      "commissionAccountId": "EgiHENynfhYe"
    },
    {
      "currencyCode": "USD",
      "poolAccountId": "UcJlzOBpEhCE",
      "commissionAccountId": "UcJlzOBpEhCE"
    },
    {
      "currencyCode": "USD",
      "poolAccountId": "UnLHMfwnumW7",
      "commissionAccountId": "UnLHMfwnumW7"
    },
    {
      "currencyCode": "USDC_ERC20",
      "poolAccountId": "UG1Gfm2MM4rV",
      "commissionAccountId": "UG1Gfm2MM4rV"
    },
    {
      "currencyCode": "USDT_ERC20",
      "poolAccountId": "U66YAuLlvhj5",
      "commissionAccountId": "U66YAuLlvhj5"
    },
    {
      "currencyCode": "USDT_TRC20",
      "poolAccountId": "Ur4dSIJ9gJ5v",
      "commissionAccountId": "Ur4dSIJ9gJ5v"
    }
  ],
  "meta": null
}
```


# Upload document

Uploads a document for a customer using multipart/form-data.

This endpoint is used for submitting various types of documents required for KYC verification, compliance, and operational purposes. Documents are stored securely and undergo verification processes.

**Endpoint**

`POST/v2/customer/file`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_UploadFileDummy>" %}

### **Request**

#### **Headers**

| Key                 | Value                 | Required |
| ------------------- | --------------------- | -------- |
| **`Authorization`** | `<JWT>`               | Yes      |
| **`Content-Type`**  | `multipart/form-data` | Yes      |
| **`Accept`**        | `application/json`    | Yes      |

#### **Request Body (multipart/form-data)**

**Required fields:** `customerId`, `attach`

| Field            | Type     | Required | Description                                | Example                             |
| ---------------- | -------- | -------- | ------------------------------------------ | ----------------------------------- |
| **`customerId`** | `string` | **Yes**  | Customer ID who owns the document.         | `"DFVKoPu-OYGB-jac9HHbxt9io"`       |
| **`attach`**     | `file`   | **Yes**  | File to upload (document).                 | `passport.pdf`                      |
| **`info`**       | `string` | No       | Optional description/notes about the file. | `"Primary identification document"` |
| **`type`**       | `string` | No       | Document type/category.                    | `"PASSPORT"`                        |

***

### **Form Data Details**

#### **Supported File Types**

| File Type          | Maximum Size | Common Use Cases               |
| ------------------ | ------------ | ------------------------------ |
| **PDF**            | 10MB         | Contracts, statements, reports |
| **JPEG/PNG**       | 5MB          | Photos, scans, screenshots     |
| **Word Documents** | 5MB          | Agreements, letters            |
| **Text Files**     | 1MB          | Notes, information             |

#### **Document Type Values**

| Document Type                               | Description               | Common Use             |
| ------------------------------------------- | ------------------------- | ---------------------- |
| **`PASSPORT`**                              | Passport document         | Identity verification  |
| **`DRIVERS_LICENCE_FRONT`**                 | Driver's license (front)  | Identity verification  |
| **`DRIVERS_LICENCE_BACK`**                  | Driver's license (back)   | Identity verification  |
| **`GOVERNMENT_ID_FRONT`**                   | Government ID (front)     | Identity verification  |
| **`GOVERNMENT_ID_BACK`**                    | Government ID (back)      | Identity verification  |
| **`UTILITY_BILL`**                          | Utility bill              | Address verification   |
| **`BANK_STATEMENT`**                        | Bank statement            | Financial verification |
| **`INCORPORATION_DOCUMENTS`**               | Business incorporation    | Business verification  |
| **`ARTICLES_OF_INCORPORATION`**             | Articles of incorporation | Business verification  |
| **`FINANCIAL_STATEMENT`**                   | Financial statements      | Financial verification |
| **`LEASE_AGREEMENT`**                       | Lease agreement           | Address verification   |
| **`PAYSLIP`**                               | Payslip                   | Income verification    |
| **`OPERATION_DOCUMENT`**                    | Operation-related         | Transaction support    |
| **`OTHER_1`**, **`OTHER_2`**, **`OTHER_3`** | Miscellaneous             | Various purposes       |

***

### **Response Fields**

| Field            | Type      | Description                     | Example                       |
| ---------------- | --------- | ------------------------------- | ----------------------------- |
| **`id`**         | `string`  | System-generated document ID.   | `"doc_abc123"`                |
| **`customerId`** | `string`  | Customer ID (from request).     | `"DFVKoPu-OYGB-jac9HHbxt9io"` |
| **`fileName`**   | `string`  | Original filename.              | `"passport_scan.pdf"`         |
| **`size`**       | `integer` | File size in bytes.             | `2048576`                     |
| **`mime`**       | `string`  | Detected MIME type.             | `"application/pdf"`           |
| **`docType`**    | `string`  | Document type (from request).   | `"PASSPORT"`                  |
| **`info`**       | `string`  | Additional info (from request). | `"Primary identification"`    |
| **`isLock`**     | `boolean` | Lock status (initially false).  | `false`                       |
| **`createAt`**   | `string`  | Upload timestamp.               | `"2024-05-21T14:30:00Z"`      |
| **`status`**     | `string`  | Initial verification status.    | `"DST_SUBMITTED"`             |

***

### **Field Details**

#### **Document Status Values**

| Status                      | Description                   | Initial State               |
| --------------------------- | ----------------------------- | --------------------------- |
| **`DST_SUBMITTED`**         | Document submitted for review | **Default for new uploads** |
| **`DST_APPROVED`**          | Document approved             | After verification          |
| **`DST_CHANGES_REQUESTED`** | Changes requested             | If modifications needed     |
| **`DST_REJECTED`**          | Document rejected             | If verification fails       |
| **`DST_MISSING`**           | Document missing              | System status               |

#### **Common MIME Types**

| MIME Type                                                                     | File Extension | Typical Use                 |
| ----------------------------------------------------------------------------- | -------------- | --------------------------- |
| **`application/pdf`**                                                         | .pdf           | Documents, forms            |
| **`image/jpeg`**                                                              | .jpg, .jpeg    | Photos, scans               |
| **`image/png`**                                                               | .png           | Screenshots, digital images |
| **`application/msword`**                                                      | .doc           | Word documents              |
| **`application/vnd.openxmlformats-officedocument.wordprocessingml.document`** | .docx          | Modern Word documents       |

***

### **Examples**

Request sample:<br>

```
curl --location 'https://stagep.tst-apidmndelss.com/v2/customer/file' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1LCJleHAiOjE5OTk5OTk5OTksImtleSI6InNhbXBsZS1rZXktMTIzNDU2Nzg5MCIsIm90cF92ZXJpZmllZCI6ZmFsc2V9.sampleSignatureValue1234567890abcdef"' \
--form 'attach=@"postman-cloud:///1111-2222-3333-444455556666"' \
--form 'attach=@"/Users/MacBook/Downloads/FPFC-Delos Flow_ Create personal account-160426-111133.pdf"' \
--form 'attach=@"/Users/MacBook/Downloads/62395849-pass-sample (1).jpg"' \
--form 'info="Test"' \
--form 'type="PASSPORT"'
```

\
\
Response sample:

```
{
    "document": {
        "id": "cbc5b871-6ef6-410f-a0ad-bc956d805eac",
        "customerId": "DFVKoPu-OYGB-jac9HHbxt9io",
        "fileName": "62349849-pass-sample (1).jpg",
        "size": 294836,
        "mime": "image/jpeg",
        "docType": "PASSPORT",
        "info": "Test",
        "isLock": false,
        "createAt": "2026-05-26T10:50:30.331Z",
        "status": "DST_APPROVED"
    }
}
```

<br>

***

### **Notes**

* **File Size Limits**: PDFs up to 10MB, images up to 5MB
* **Supported Formats**: PDF, JPEG, PNG, DOC, DOCX, TXT
* **Security**: All documents are encrypted at rest
* **Verification**: New documents start with `DST_SUBMITTED` status
* **Compliance**: Documents undergo KYC/AML verification processes
* **Retention**: Documents are retained according to regulatory requirements

**Upload Best Practices**:

* Use clear, legible scans for identity documents
* Ensure files are not password protected
* Use original documents (not screenshots) when possible
* Include all pages for multi-page documents
* Verify file clarity and readability before upload

**Please note that by using this command you only upload the document to our system. To actually use this document in customer application or transactions, you have to use the data received in the successful response of this command (e.g. document id) in other corresponding commands like Set Customer Application or Add Document.**&#x20;


# List Documents

Retrieves a paginated list of all documents associated with a specific customer.

This endpoint provides comprehensive document metadata including file information, verification status, and administrative details for all documents belonging to the customer.

**Endpoint**

`GET/v2/customer/{customerId}/file`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_ListDocuments>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                | Required | Example        |
| ---------------- | -------- | ------------------------------------------ | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** to retrieve documents for. | Yes      | `"cust_12345"` |

#### **Query Parameters**

| Parameter           | Type      | Description                  | Required | Example |
| ------------------- | --------- | ---------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | Page number (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | Number of items per page.    | No       | `20`    |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of document metadata with comprehensive information about each document.

#### **Response Fields**

**1. Items Array (Document List)**

| Field            | Type      | Description                                    | Example                             |
| ---------------- | --------- | ---------------------------------------------- | ----------------------------------- |
| **`id`**         | `string`  | Unique document identifier.                    | `"doc_abc123"`                      |
| **`customerId`** | `string`  | Customer ID who owns the document.             | `"cust_12345"`                      |
| **`fileName`**   | `string`  | Original filename.                             | `"passport_scan.pdf"`               |
| **`size`**       | `integer` | File size in bytes.                            | `2048576`                           |
| **`mime`**       | `string`  | MIME type of the document.                     | `"application/pdf"`                 |
| **`docType`**    | `string`  | Document type/category.                        | `"PASSPORT"`                        |
| **`info`**       | `string`  | Additional information/notes.                  | `"Primary identification document"` |
| **`isLock`**     | `boolean` | Whether document is locked from modifications. | `false`                             |
| **`createAt`**   | `string`  | Document creation timestamp.                   | `"2024-05-15T10:30:00Z"`            |
| **`status`**     | `string`  | Current verification status.                   | `"DST_APPROVED"`                    |

**2. Meta Object (Pagination)**

| Field          | Type      | Description                      | Example |
| -------------- | --------- | -------------------------------- | ------- |
| **`pageSize`** | `integer` | Number of items per page.        | `20`    |
| **`page`**     | `integer` | Current page number (0-indexed). | `0`     |
| **`total`**    | `string`  | Total number of documents.       | `"15"`  |

**Example Response:**

json

```
{
  "items": [
    {
      "id": "doc_pass123",
      "customerId": "cust_12345",
      "fileName": "passport_scan.pdf",
      "size": 2048576,
      "mime": "application/pdf",
      "docType": "PASSPORT",
      "info": "Primary identification - US passport",
      "isLock": true,
      "createAt": "2024-05-15T10:30:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_util456",
      "customerId": "cust_12345",
      "fileName": "utility_bill.jpg",
      "size": 1856320,
      "mime": "image/jpeg",
      "docType": "UTILITY_BILL",
      "info": "Address verification - electricity bill",
      "isLock": false,
      "createAt": "2024-05-18T09:15:00Z",
      "status": "DST_SUBMITTED"
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "15"
  }
}
```

***

### **Field Details**

#### **Document Type Values**

| Document Type                               | Description               | Common Use             |
| ------------------------------------------- | ------------------------- | ---------------------- |
| **`PASSPORT`**                              | Passport document         | Identity verification  |
| **`DRIVERS_LICENCE_FRONT`**                 | Driver's license (front)  | Identity verification  |
| **`DRIVERS_LICENCE_BACK`**                  | Driver's license (back)   | Identity verification  |
| **`GOVERNMENT_ID_FRONT`**                   | Government ID (front)     | Identity verification  |
| **`GOVERNMENT_ID_BACK`**                    | Government ID (back)      | Identity verification  |
| **`UTILITY_BILL`**                          | Utility bill              | Address verification   |
| **`BANK_STATEMENT`**                        | Bank statement            | Financial verification |
| **`INCORPORATION_DOCUMENTS`**               | Business incorporation    | Business verification  |
| **`ARTICLES_OF_INCORPORATION`**             | Articles of incorporation | Business verification  |
| **`FINANCIAL_STATEMENT`**                   | Financial statements      | Financial verification |
| **`LEASE_AGREEMENT`**                       | Lease agreement           | Address verification   |
| **`PAYSLIP`**                               | Payslip                   | Income verification    |
| **`OPERATION_DOCUMENT`**                    | Operation-related         | Transaction support    |
| **`OTHER_1`**, **`OTHER_2`**, **`OTHER_3`** | Miscellaneous             | Various purposes       |

#### **Document Status Values**

| Status                      | Description        | Meaning                        |
| --------------------------- | ------------------ | ------------------------------ |
| **`DST_APPROVED`**          | Document approved  | Verified and accepted          |
| **`DST_SUBMITTED`**         | Document submitted | Awaiting review                |
| **`DST_CHANGES_REQUESTED`** | Changes requested  | Requires modifications         |
| **`DST_REJECTED`**          | Document rejected  | Failed verification            |
| **`DST_MISSING`**           | Document missing   | Required document not provided |

#### **Common MIME Types**

| MIME Type                | Description   | Typical Use                 |
| ------------------------ | ------------- | --------------------------- |
| **`application/pdf`**    | PDF document  | Contracts, statements       |
| **`image/jpeg`**         | JPEG image    | Photos, scans               |
| **`image/png`**          | PNG image     | Screenshots, digital images |
| **`application/msword`** | Word document | Agreements, letters         |

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Complete Customer Document Set Example**

**Response:**

json

```
{
  "items": [
    {
      "id": "doc_pass123",
      "customerId": "cust_12345",
      "fileName": "us_passport.pdf",
      "size": 3120450,
      "mime": "application/pdf",
      "docType": "PASSPORT",
      "info": "Primary identification - US passport",
      "isLock": true,
      "createAt": "2024-05-10T14:20:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_dl_front456",
      "customerId": "cust_12345",
      "fileName": "drivers_license_front.png",
      "size": 2456789,
      "mime": "image/png",
      "docType": "DRIVERS_LICENCE_FRONT",
      "info": "California driver's license - front",
      "isLock": true,
      "createAt": "2024-05-12T13:20:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_dl_back789",
      "customerId": "cust_12345",
      "fileName": "drivers_license_back.png",
      "size": 2387654,
      "mime": "image/png",
      "docType": "DRIVERS_LICENCE_BACK",
      "info": "California driver's license - back",
      "isLock": true,
      "createAt": "2024-05-12T13:20:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_util321",
      "customerId": "cust_12345",
      "fileName": "electricity_bill_may_2024.jpg",
      "size": 1856320,
      "mime": "image/jpeg",
      "docType": "UTILITY_BILL",
      "info": "Address verification - electricity bill",
      "isLock": false,
      "createAt": "2024-05-18T09:15:00Z",
      "status": "DST_SUBMITTED"
    },
    {
      "id": "doc_bank654",
      "customerId": "cust_12345",
      "fileName": "bank_statement_q1_2024.pdf",
      "size": 2987654,
      "mime": "application/pdf",
      "docType": "BANK_STATEMENT",
      "info": "Financial verification - bank statement",
      "isLock": false,
      "createAt": "2024-05-20T11:30:00Z",
      "status": "DST_CHANGES_REQUESTED"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "5"
  }
}
```

#### **Business Customer Documents Example**

**Response:**

json

```
{
  "items": [
    {
      "id": "doc_incorp123",
      "customerId": "cust_biz999",
      "fileName": "articles_of_incorporation.pdf",
      "size": 5120480,
      "mime": "application/pdf",
      "docType": "ARTICLES_OF_INCORPORATION",
      "info": "Delaware incorporation documents",
      "isLock": true,
      "createAt": "2024-04-15T08:45:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_benef456",
      "customerId": "cust_biz999",
      "fileName": "beneficial_ownership.pdf",
      "size": 3456789,
      "mime": "application/pdf",
      "docType": "BENEFICIAL_CERTIFICATE",
      "info": "Beneficial ownership certification",
      "isLock": true,
      "createAt": "2024-04-16T10:20:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_financial789",
      "customerId": "cust_biz999",
      "fileName": "financial_statements_2023.pdf",
      "size": 8120456,
      "mime": "application/pdf",
      "docType": "FINANCIAL_STATEMENT",
      "info": "Annual financial statements 2023",
      "isLock": false,
      "createAt": "2024-05-05T14:30:00Z",
      "status": "DST_SUBMITTED"
    },
    {
      "id": "doc_operation321",
      "customerId": "cust_biz999",
      "fileName": "invoice_contract.pdf",
      "size": 1987654,
      "mime": "application/pdf",
      "docType": "OPERATION_DOCUMENT",
      "info": "Client invoice and contract",
      "isLock": false,
      "createAt": "2024-05-18T16:45:00Z",
      "status": "DST_APPROVED"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "4"
  }
}
```

#### **Customer with Mixed Status Documents Example**

**Response:**

json

```
{
  "items": [
    {
      "id": "doc_pass111",
      "customerId": "cust_mixed555",
      "fileName": "passport.pdf",
      "size": 2876543,
      "mime": "application/pdf",
      "docType": "PASSPORT",
      "info": "UK passport",
      "isLock": true,
      "createAt": "2024-05-01T09:00:00Z",
      "status": "DST_APPROVED"
    },
    {
      "id": "doc_bill222",
      "customerId": "cust_mixed555",
      "fileName": "water_bill.jpg",
      "size": 1654321,
      "mime": "image/jpeg",
      "docType": "UTILITY_BILL",
      "info": "Water bill for address proof",
      "isLock": false,
      "createAt": "2024-05-10T11:15:00Z",
      "status": "DST_REJECTED"
    },
    {
      "id": "doc_bank333",
      "customerId": "cust_mixed555",
      "fileName": "bank_statement.pdf",
      "size": 3456789,
      "mime": "application/pdf",
      "docType": "BANK_STATEMENT",
      "info": "Recent bank statement",
      "isLock": false,
      "createAt": "2024-05-15T13:45:00Z",
      "status": "DST_CHANGES_REQUESTED"
    },
    {
      "id": "doc_payslip444",
      "customerId": "cust_mixed555",
      "fileName": "payslip_april.pdf",
      "size": 1234567,
      "mime": "application/pdf",
      "docType": "PAYSLIP",
      "info": "April 2024 payslip",
      "isLock": false,
      "createAt": "2024-05-20T15:30:00Z",
      "status": "DST_SUBMITTED"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "4"
  }
}
```

#### **Empty Document List Example**

**Response:**

json

```
{
  "items": [],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "0"
  }
}
```

#### **Pagination Example (Second Page)**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file?meta.page=1&meta.pageSize=5'
```

**Response:**

json

```
{
  "items": [
    {
      "id": "doc_lease555",
      "customerId": "cust_12345",
      "fileName": "lease_agreement.pdf",
      "size": 4123456,
      "mime": "application/pdf",
      "docType": "LEASE_AGREEMENT",
      "info": "Rental agreement for current address",
      "isLock": false,
      "createAt": "2024-05-22T10:00:00Z",
      "status": "DST_SUBMITTED"
    },
    {
      "id": "doc_other666",
      "customerId": "cust_12345",
      "fileName": "additional_info.pdf",
      "size": 987654,
      "mime": "application/pdf",
      "docType": "OTHER_1",
      "info": "Additional supporting documents",
      "isLock": false,
      "createAt": "2024-05-22T14:20:00Z",
      "status": "DST_SUBMITTED"
    }
  ],
  "meta": {
    "pageSize": 5,
    "page": 1,
    "total": "7"
  }
}
```

***

### **Error Responses**

1. **Customer Not Found**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
3. **Invalid Pagination**:

   json

   ```
   { "error": "Invalid page number: -1" }
   ```

***

### **Notes**

* **Pagination**: Use `meta.page` and `meta.pageSize` for large document sets
* **Default Page Size**: If not specified, default page size is typically 20 items
* **Total Count**: `meta.total` provides the complete count for pagination calculations
* **Document Order**: Documents are typically returned by creation date (newest first)
* **Status Filtering**: All statuses are included in the list; filter client-side if needed

**Common Use Cases**:

* Customer onboarding progress tracking
* Compliance auditing and reporting
* Document verification status monitoring
* File management and organization
* KYC/AML compliance checking

**Document Status Summary**:

* **Approved**: Ready for use in transactions
* **Submitted**: Awaiting verification
* **Changes Requested**: Requires customer action
* **Rejected**: Cannot be used, needs replacement
* **Missing**: Required document not yet provided

<br>


# Download Document

Downloads the actual file content of a specific customer document.

This endpoint returns the raw binary file data with appropriate Content-Type headers for direct file download or display in applications

**Endpoint**

`GET/v2/customer/{customerId}/file/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_DocumentDownload>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                             | Required | Example        |
| ---------------- | -------- | --------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** that owns the document. | Yes      | `"cust_12345"` |
| **`id`**         | `string` | **Document unique ID** to download.     | Yes      | `"doc_abc123"` |

#### **Headers**

| Key                 | Value                       | Required |
| ------------------- | --------------------------- | -------- |
| **`Authorization`** | `<JWT>`                     | Yes      |
| **`Accept`**        | `*/*` or specific MIME type | No       |

***

### **Response (200 OK)**

Returns the raw binary file content with appropriate HTTP headers for file download.

#### **Response Headers**

| Header                    | Description               | Example                               |
| ------------------------- | ------------------------- | ------------------------------------- |
| **`Content-Type`**        | MIME type of the document | `application/pdf`                     |
| **`Content-Length`**      | File size in bytes        | `2048576`                             |
| **`Content-Disposition`** | File download behavior    | `attachment; filename="passport.pdf"` |
| **`Cache-Control`**       | Caching directives        | `private, max-age=3600`               |

#### **Response Body**

Raw binary content of the requested document file.

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_abc123' \
  -H 'Authorization: 123' \
  -H 'Accept: application/pdf' \
  --output downloaded_document.pdf
```

#### **PDF Document Download Example**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_pass123' \
  -H 'Authorization: 123' \
  --output passport.pdf
```

**Response Headers:**

text

```
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 3120450
Content-Disposition: attachment; filename="us_passport.pdf"
Cache-Control: private, max-age=3600
```

**Response Body:** Raw PDF binary data

#### **Image Document Download Example**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_67890/file/doc_util456' \
  -H 'Authorization: 123' \
  --output utility_bill.jpg
```

**Response Headers:**

text

```
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 1856320
Content-Disposition: attachment; filename="electricity_bill.jpg"
Cache-Control: private, max-age=3600
```

**Response Body:** Raw JPEG binary data

#### **Programming Language Examples**

**Python Download Example**

python

```
import requests

def download_document(customer_id, document_id, auth_token, output_path):
    url = f"https://stagep.tst-apidmndelss.com/v2/customer/{customer_id}/file/{document_id}"
    headers = {
        "Authorization": auth_token
    }
    
    response = requests.get(url, headers=headers, stream=True)
    
    if response.status_code == 200:
        # Get filename from Content-Disposition header or use document ID
        content_disposition = response.headers.get('Content-Disposition')
        if content_disposition and 'filename=' in content_disposition:
            filename = content_disposition.split('filename=')[1].strip('"')
        else:
            filename = f"{document_id}.{response.headers['Content-Type'].split('/')[1]}"
        
        with open(output_path, 'wb') as file:
            for chunk in response.iter_content(chunk_size=8192):
                file.write(chunk)
        
        print(f"Document downloaded successfully: {filename}")
        print(f"File size: {response.headers.get('Content-Length')} bytes")
        print(f"Content type: {response.headers.get('Content-Type')}")
    else:
        print(f"Error downloading document: {response.status_code} - {response.text}")

# Usage
download_document("cust_12345", "doc_pass123", "123", "downloaded_passport.pdf")
```

**JavaScript/Node.js Download Example**

javascript

```
const https = require('https');
const fs = require('fs');

function downloadDocument(customerId, documentId, authToken, outputPath) {
    const options = {
        hostname: 'stagep.tst-apidmndelss.com',
        path: `/v2/customer/${customerId}/file/${documentId}`,
        method: 'GET',
        headers: {
            'Authorization': authToken
        }
    };

    const request = https.request(options, (response) => {
        if (response.statusCode === 200) {
            const fileStream = fs.createWriteStream(outputPath);
            response.pipe(fileStream);
            
            fileStream.on('finish', () => {
                fileStream.close();
                console.log('Document downloaded successfully');
                console.log(`Content-Type: ${response.headers['content-type']}`);
                console.log(`Content-Length: ${response.headers['content-length']} bytes`);
            });
        } else {
            console.error(`Error: ${response.statusCode}`);
        }
    });

    request.on('error', (error) => {
        console.error('Request error:', error);
    });

    request.end();
}

// Usage
downloadDocument('cust_12345', 'doc_pass123', '123', './downloaded_document.pdf');
```

**Java Download Example**

java

```
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class DocumentDownloader {
    public static void downloadDocument(String customerId, String documentId, 
                                      String authToken, String outputPath) throws IOException {
        String urlString = String.format(
            "https://stagep.tst-apidmndelss.com/v2/customer/%s/file/%s",
            customerId, documentId
        );
        
        URL url = new URL(urlString);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("GET");
        connection.setRequestProperty("Authorization", authToken);
        
        int responseCode = connection.getResponseCode();
        if (responseCode == HttpURLConnection.HTTP_OK) {
            String contentType = connection.getContentType();
            String contentDisposition = connection.getHeaderField("Content-Disposition");
            
            try (InputStream inputStream = connection.getInputStream();
                 FileOutputStream outputStream = new FileOutputStream(outputPath)) {
                
                byte[] buffer = new byte[4096];
                int bytesRead;
                while ((bytesRead = inputStream.read(buffer)) != -1) {
                    outputStream.write(buffer, 0, bytesRead);
                }
            }
            
            System.out.println("Document downloaded successfully");
            System.out.println("Content-Type: " + contentType);
            System.out.println("Content-Length: " + connection.getContentLength());
        } else {
            System.err.println("Error downloading document: " + responseCode);
        }
    }
    
    // Usage
    public static void main(String[] args) {
        try {
            downloadDocument("cust_12345", "doc_pass123", "123", "downloaded_document.pdf");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
```

#### **Common Download Scenarios**

**1. PDF Document Download**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_bank123' \
  -H 'Authorization: 123' \
  -o bank_statement.pdf
```

**Expected Response:**

* Content-Type: `application/pdf`
* File: PDF binary data

**2. Image Document Download**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_id456' \
  -H 'Authorization: 123' \
  -o drivers_license.jpg
```

**Expected Response:**

* Content-Type: `image/jpeg` or `image/png`
* File: Image binary data

**3. Direct Browser Display**

**HTML Example:**

html

```
<a href="https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_pass123" 
   target="_blank"
   onclick="event.preventDefault(); window.open(this.href, '_blank');">
   View Passport Document
</a>
```

**4. Inline Display in Application**

**JavaScript Example:**

javascript

```
async function displayDocument(customerId, documentId, authToken) {
    const response = await fetch(
        `https://stagep.tst-apidmndelss.com/v2/customer/${customerId}/file/${documentId}`,
        {
            headers: { 'Authorization': authToken }
        }
    );
    
    if (response.ok) {
        const blob = await response.blob();
        const url = URL.createObjectURL(blob);
        
        // For PDFs
        if (response.headers.get('Content-Type') === 'application/pdf') {
            window.open(url, '_blank');
        }
        // For images
        else if (response.headers.get('Content-Type').startsWith('image/')) {
            const img = document.createElement('img');
            img.src = url;
            document.body.appendChild(img);
        }
    }
}
```

***

### **Error Responses**

1. **Document Not Found**:

   text

   ```
   HTTP/1.1 404 Not Found
   Content-Type: application/json

   { "error": "Document not found: doc_99999" }
   ```
2. **Customer Not Found**:

   text

   ```
   HTTP/1.1 404 Not Found
   Content-Type: application/json

   { "error": "Customer not found: cust_99999" }
   ```
3. **Unauthorized**:

   text

   ```
   HTTP/1.1 401 Unauthorized
   Content-Type: application/json

   { "error": "Unauthorized" }
   ```
4. **Access Denied**:

   text

   ```
   HTTP/1.1 403 Forbidden
   Content-Type: application/json

   { "error": "Access denied to document" }
   ```

***

### **Notes**

* **Binary Response**: This endpoint returns raw binary data, not JSON
* **File Size**: Large files are streamed efficiently
* **Security**: Documents are accessed with proper authentication and authorization checks
* **Caching**: Responses include cache headers for performance optimization
* **Bandwidth**: Consider file sizes when downloading multiple documents

**Best Practices**:

* Always check response status code before processing binary data
* Use appropriate Accept headers when expecting specific file types
* Handle large files with streaming to avoid memory issues
* Verify file integrity after download using Content-Length header
* Implement proper error handling for network failures

**Supported File Types**:

* **PDF**: `application/pdf`
* **Images**: `image/jpeg`, `image/png`, `image/gif`
* **Documents**: `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
* **Text**: `text/plain`

**Download Limits**:

* Maximum file size: 50MB
* Rate limiting: 100 downloads per hour per user
* Concurrent downloads: 5 simultaneous downloads per user


# Delete Document

Permanently deletes a specific document associated with a customer.

Permanently deletes a specific document associated with a customer. This operation removes both the document metadata and the actual file content from storage. Use with caution as deleted documents cannot be recovered.

**Endpoint**

`DELETE/v2/customer/{customerId}/file/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_DocumentDelete>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                             | Required | Example        |
| ---------------- | -------- | --------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** that owns the document. | Yes      | `"cust_12345"` |
| **`id`**         | `string` | **Document unique ID** to delete.       | Yes      | `"doc_abc123"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a success confirmation message indicating the document was successfully deleted.

#### **Response Fields**

| Field         | Type      | Description                  | Example                           |
| ------------- | --------- | ---------------------------- | --------------------------------- |
| **`success`** | `boolean` | Operation success status.    | `true`                            |
| **`message`** | `string`  | Descriptive success message. | `"Document deleted successfully"` |

**Example Response:**

json

```
{
  "success": true,
  "message": "Document deleted successfully"
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_abc123' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Successful Deletion Example**

**Request:**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_pass123' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

**Response:**

json

```
{
  "success": true,
  "message": "Document deleted successfully"
}
```

#### **Programming Language Examples**

**Python Delete Example**

python

```
import requests

def delete_document(customer_id, document_id, auth_token):
    url = f"https://stagep.tst-apidmndelss.com/v2/customer/{customer_id}/file/{document_id}"
    headers = {
        "Authorization": auth_token,
        "Accept": "application/json"
    }
    
    response = requests.delete(url, headers=headers)
    
    if response.status_code == 200:
        result = response.json()
        print(f"Success: {result['success']}")
        print(f"Message: {result['message']}")
        return True
    else:
        print(f"Error deleting document: {response.status_code} - {response.text}")
        return False

# Usage
delete_document("cust_12345", "doc_pass123", "123")
```

**JavaScript/Node.js Delete Example**

javascript

```
const https = require('https');

function deleteDocument(customerId, documentId, authToken) {
    return new Promise((resolve, reject) => {
        const options = {
            hostname: 'stagep.tst-apidmndelss.com',
            path: `/v2/customer/${customerId}/file/${documentId}`,
            method: 'DELETE',
            headers: {
                'Authorization': authToken,
                'Accept': 'application/json'
            }
        };

        const request = https.request(options, (response) => {
            let data = '';

            response.on('data', (chunk) => {
                data += chunk;
            });

            response.on('end', () => {
                if (response.statusCode === 200) {
                    const result = JSON.parse(data);
                    console.log('Success:', result.success);
                    console.log('Message:', result.message);
                    resolve(result);
                } else {
                    reject(new Error(`HTTP ${response.statusCode}: ${data}`));
                }
            });
        });

        request.on('error', (error) => {
            reject(error);
        });

        request.end();
    });
}

// Usage
deleteDocument('cust_12345', 'doc_pass123', '123')
    .then(result => console.log('Document deleted successfully'))
    .catch(error => console.error('Error:', error.message));
```

**Java Delete Example**

java

```
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class DocumentDeleter {
    public static boolean deleteDocument(String customerId, String documentId, String authToken) {
        try {
            String urlString = String.format(
                "https://stagep.tst-apidmndelss.com/v2/customer/%s/file/%s",
                customerId, documentId
            );
            
            URL url = new URL(urlString);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("DELETE");
            connection.setRequestProperty("Authorization", authToken);
            connection.setRequestProperty("Accept", "application/json");
            
            int responseCode = connection.getResponseCode();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(
                    new InputStreamReader(connection.getInputStream())
                );
                String inputLine;
                StringBuilder response = new StringBuilder();
                
                while ((inputLine = in.readLine()) != null) {
                    response.append(inputLine);
                }
                in.close();
                
                // Parse JSON response
                System.out.println("Response: " + response.toString());
                System.out.println("Document deleted successfully");
                return true;
            } else {
                System.err.println("Error deleting document: " + responseCode);
                return false;
            }
        } catch (IOException e) {
            System.err.println("Request error: " + e.getMessage());
            return false;
        }
    }
    
    // Usage
    public static void main(String[] args) {
        boolean success = deleteDocument("cust_12345", "doc_pass123", "123");
        System.out.println("Deletion successful: " + success);
    }
}
```

**PHP Delete Example**

php

```
<?php
function deleteDocument($customerId, $documentId, $authToken) {
    $url = "https://stagep.tst-apidmndelss.com/v2/customer/{$customerId}/file/{$documentId}";
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "Authorization: {$authToken}",
        "Accept: application/json"
    ]);
    
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    
    if ($httpCode === 200) {
        $result = json_decode($response, true);
        echo "Success: " . ($result['success'] ? 'true' : 'false') . "\n";
        echo "Message: " . $result['message'] . "\n";
        return true;
    } else {
        echo "Error deleting document: HTTP {$httpCode} - {$response}\n";
        return false;
    }
}

// Usage
deleteDocument("cust_12345", "doc_pass123", "123");
?>
```

#### **Common Delete Scenarios**

**1. Delete Rejected Document**

**Scenario**: Remove a document that was rejected during verification to allow re-upload.

**Request:**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_rejected456' \
  -H 'Authorization: 123'
```

**Response:**

json

```
{
  "success": true,
  "message": "Document deleted successfully"
}
```

**2. Delete Temporary Document**

**Scenario**: Remove a temporary or test document that is no longer needed.

**Request:**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/customer/cust_67890/file/doc_temp789' \
  -H 'Authorization: 123'
```

**Response:**

json

```
{
  "success": true,
  "message": "Document deleted successfully"
}
```

**3. Bulk Delete Script**

**Python script for deleting multiple documents:**

python

```
import requests

def delete_multiple_documents(customer_id, document_ids, auth_token):
    results = []
    for doc_id in document_ids:
        try:
            url = f"https://stagep.tst-apidmndelss.com/v2/customer/{customer_id}/file/{doc_id}"
            headers = {"Authorization": auth_token, "Accept": "application/json"}
            
            response = requests.delete(url, headers=headers)
            success = response.status_code == 200
            message = response.json().get('message') if success else f"HTTP {response.status_code}"
            
            results.append({
                'document_id': doc_id,
                'success': success,
                'message': message
            })
            
            print(f"Document {doc_id}: {'Success' if success else 'Failed'}")
            
        except Exception as e:
            results.append({
                'document_id': doc_id,
                'success': False,
                'message': str(e)
            })
            print(f"Document {doc_id}: Error - {e}")
    
    return results

# Usage
documents_to_delete = ["doc_123", "doc_456", "doc_789"]
results = delete_multiple_documents("cust_12345", documents_to_delete, "123")

# Print summary
success_count = sum(1 for r in results if r['success'])
print(f"\nSummary: {success_count}/{len(results)} documents deleted successfully")
```

***

### **Error Responses**

1. **Document Not Found**:

   json

   ```
   {
     "success": false,
     "message": "Document not found: doc_99999"
   }
   ```
2. **Customer Not Found**:

   json

   ```
   {
     "success": false,
     "message": "Customer not found: cust_99999"
   }
   ```
3. **Unauthorized**:

   json

   ```
   {
     "success": false,
     "message": "Unauthorized"
   }
   ```
4. **Access Denied**:

   json

   ```
   {
     "success": false,
     "message": "Access denied to document"
   }
   ```
5. **Document Locked**:

   json

   ```
   {
     "success": false,
     "message": "Cannot delete locked document"
   }
   ```

***

### **Notes**

* **Permanent Deletion**: Deleted documents cannot be recovered
* **Locked Documents**: Documents with `isLock: true` cannot be deleted
* **Approved Documents**: Consider implications before deleting approved documents
* **Audit Trail**: Deletion may be logged for compliance purposes
* **Permissions**: Ensure proper authorization before deletion

**Restrictions**:

* ❌ Cannot delete locked documents (`isLock: true`)
* ❌ Cannot delete documents that are part of active verification processes
* ❌ Cannot delete documents referenced in pending transactions
* ✅ Can delete documents with status: `SUBMITTED`, `REJECTED`, `CHANGES_REQUESTED`
* ✅ Can delete `APPROVED` documents (with caution)

**Best Practices**:

1. **Verify Before Delete**: Always check document status and metadata before deletion
2. **User Confirmation**: Implement confirmation dialogs in user interfaces
3. **Error Handling**: Handle all possible error responses gracefully
4. **Logging**: Log deletion operations for audit purposes
5. **Backup Consideration**: Ensure important documents are backed up if needed

**Pre-deletion Checklist**:

* Confirm document is not locked
* Verify document is not required for active processes
* Check if document needs to be archived instead of deleted
* Ensure proper user authorization
* Consider compliance and retention requirements


# Document update

Updates the metadata of an existing customer document.

This endpoint allows you to modify the document type and description without changing the actual file content. Useful for correcting document categorization or adding additional context.

**Endpoint**

`POST/v2/customer/{customerId}/file/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_DocumentUpdate>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                             | Required | Example        |
| ---------------- | -------- | --------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** that owns the document. | Yes      | `"cust_12345"` |
| **`id`**         | `string` | **Document unique ID** to update.       | Yes      | `"doc_abc123"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Content-Type`**  | `application/json` | Yes      |
| **`Accept`**        | `application/json` | Yes      |

#### **Request Body**

All fields are optional - only include fields that need to be updated.

json

```
{
  "docType": "PASSPORT",
  "info": "Updated description - US passport for identity verification"
}
```

***

### **Request Fields**

**Document Update Fields**

| Field         | Type     | Required | Description                                   | Example                             |
| ------------- | -------- | -------- | --------------------------------------------- | ----------------------------------- |
| **`docType`** | `string` | No       | Updated document type/category.               | `"PASSPORT"`                        |
| **`info`**    | `string` | No       | Updated description/notes about the document. | `"Primary identification document"` |

***

### **Response (200 OK)**

Returns the updated document metadata with all current information.

#### **Response Fields**

**Document Object**

| Field            | Type      | Description                                    | Example                             |
| ---------------- | --------- | ---------------------------------------------- | ----------------------------------- |
| **`id`**         | `string`  | Unique document identifier.                    | `"doc_abc123"`                      |
| **`customerId`** | `string`  | Customer ID who owns the document.             | `"cust_12345"`                      |
| **`fileName`**   | `string`  | Original filename.                             | `"passport_scan.pdf"`               |
| **`size`**       | `integer` | File size in bytes.                            | `2048576`                           |
| **`mime`**       | `string`  | MIME type of the document.                     | `"application/pdf"`                 |
| **`docType`**    | `string`  | Updated document type.                         | `"PASSPORT"`                        |
| **`info`**       | `string`  | Updated description/notes.                     | `"Primary identification document"` |
| **`isLock`**     | `boolean` | Whether document is locked from modifications. | `false`                             |
| **`createAt`**   | `string`  | Original document creation timestamp.          | `"2024-05-15T10:30:00Z"`            |
| **`status`**     | `string`  | Current verification status.                   | `"DST_SUBMITTED"`                   |

**Example Response:**

json

```
{
  "document": {
    "id": "doc_abc123",
    "customerId": "cust_12345",
    "fileName": "passport_scan.pdf",
    "size": 2048576,
    "mime": "application/pdf",
    "docType": "PASSPORT",
    "info": "Updated description - US passport for identity verification",
    "isLock": false,
    "createAt": "2024-05-15T10:30:00Z",
    "status": "DST_SUBMITTED"
  }
}
```

***

### **Field Details**

#### **Document Type Values**

| Document Type                               | Description               | Common Use             |
| ------------------------------------------- | ------------------------- | ---------------------- |
| **`PASSPORT`**                              | Passport document         | Identity verification  |
| **`DRIVERS_LICENCE_FRONT`**                 | Driver's license (front)  | Identity verification  |
| **`DRIVERS_LICENCE_BACK`**                  | Driver's license (back)   | Identity verification  |
| **`GOVERNMENT_ID_FRONT`**                   | Government ID (front)     | Identity verification  |
| **`GOVERNMENT_ID_BACK`**                    | Government ID (back)      | Identity verification  |
| **`UTILITY_BILL`**                          | Utility bill              | Address verification   |
| **`BANK_STATEMENT`**                        | Bank statement            | Financial verification |
| **`INCORPORATION_DOCUMENTS`**               | Business incorporation    | Business verification  |
| **`ARTICLES_OF_INCORPORATION`**             | Articles of incorporation | Business verification  |
| **`FINANCIAL_STATEMENT`**                   | Financial statements      | Financial verification |
| **`LEASE_AGREEMENT`**                       | Lease agreement           | Address verification   |
| **`PAYSLIP`**                               | Payslip                   | Income verification    |
| **`OPERATION_DOCUMENT`**                    | Operation-related         | Transaction support    |
| **`OTHER_1`**, **`OTHER_2`**, **`OTHER_3`** | Miscellaneous             | Various purposes       |

#### **Document Status Values**

| Status                      | Description        | Meaning                        |
| --------------------------- | ------------------ | ------------------------------ |
| **`DST_APPROVED`**          | Document approved  | Verified and accepted          |
| **`DST_SUBMITTED`**         | Document submitted | Awaiting review                |
| **`DST_CHANGES_REQUESTED`** | Changes requested  | Requires modifications         |
| **`DST_REJECTED`**          | Document rejected  | Failed verification            |
| **`DST_MISSING`**           | Document missing   | Required document not provided |

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_abc123' \
  -H 'Authorization: 123' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "docType": "PASSPORT",
    "info": "Updated description - US passport for identity verification"
  }'
```

#### **Programming Language Examples**

**Python Update Example**

python

```
import requests

def update_document(customer_id, document_id, auth_token, doc_type=None, info=None):
    url = f"https://stagep.tst-apidmndelss.com/v2/customer/{customer_id}/file/{document_id}"
    headers = {
        "Authorization": auth_token,
        "Content-Type": "application/json",
        "Accept": "application/json"
    }
    
    payload = {}
    if doc_type:
        payload["docType"] = doc_type
    if info:
        payload["info"] = info
    
    response = requests.post(url, headers=headers, json=payload)
    
    if response.status_code == 200:
        result = response.json()
        print("Document updated successfully")
        print(f"Document ID: {result['document']['id']}")
        print(f"New Type: {result['document']['docType']}")
        print(f"New Info: {result['document']['info']}")
        return result['document']
    else:
        print(f"Error updating document: {response.status_code} - {response.text}")
        return None

# Usage
updated_doc = update_document(
    customer_id="cust_12345",
    document_id="doc_pass123",
    auth_token="123",
    doc_type="PASSPORT",
    info="Primary identification - US passport"
)
```

**JavaScript/Node.js Update Example**

javascript

```
const https = require('https');

function updateDocument(customerId, documentId, authToken, updates) {
    return new Promise((resolve, reject) => {
        const postData = JSON.stringify(updates);
        
        const options = {
            hostname: 'stagep.tst-apidmndelss.com',
            path: `/v2/customer/${customerId}/file/${documentId}`,
            method: 'POST',
            headers: {
                'Authorization': authToken,
                'Content-Type': 'application/json',
                'Accept': 'application/json',
                'Content-Length': Buffer.byteLength(postData)
            }
        };

        const request = https.request(options, (response) => {
            let data = '';

            response.on('data', (chunk) => {
                data += chunk;
            });

            response.on('end', () => {
                if (response.statusCode === 200) {
                    const result = JSON.parse(data);
                    console.log('Document updated successfully');
                    console.log('New Type:', result.document.docType);
                    console.log('New Info:', result.document.info);
                    resolve(result.document);
                } else {
                    reject(new Error(`HTTP ${response.statusCode}: ${data}`));
                }
            });
        });

        request.on('error', (error) => {
            reject(error);
        });

        request.write(postData);
        request.end();
    });
}

// Usage
updateDocument('cust_12345', 'doc_pass123', '123', {
    docType: 'PASSPORT',
    info: 'Primary identification - US passport'
})
.then(document => console.log('Update successful:', document.id))
.catch(error => console.error('Error:', error.message));
```

**Java Update Example**

java

```
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONObject;

public class DocumentUpdater {
    public static JSONObject updateDocument(String customerId, String documentId, 
                                          String authToken, String docType, String info) {
        try {
            String urlString = String.format(
                "https://stagep.tst-apidmndelss.com/v2/customer/%s/file/%s",
                customerId, documentId
            );
            
            URL url = new URL(urlString);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Authorization", authToken);
            connection.setRequestProperty("Content-Type", "application/json");
            connection.setRequestProperty("Accept", "application/json");
            connection.setDoOutput(true);
            
            // Create request body
            JSONObject requestBody = new JSONObject();
            if (docType != null) requestBody.put("docType", docType);
            if (info != null) requestBody.put("info", info);
            
            try (OutputStream os = connection.getOutputStream()) {
                byte[] input = requestBody.toString().getBytes("utf-8");
                os.write(input, 0, input.length);
            }
            
            int responseCode = connection.getResponseCode();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(
                    new InputStreamReader(connection.getInputStream())
                );
                String inputLine;
                StringBuilder response = new StringBuilder();
                
                while ((inputLine = in.readLine()) != null) {
                    response.append(inputLine);
                }
                in.close();
                
                JSONObject result = new JSONObject(response.toString());
                System.out.println("Document updated successfully");
                return result.getJSONObject("document");
            } else {
                System.err.println("Error updating document: " + responseCode);
                return null;
            }
        } catch (Exception e) {
            System.err.println("Request error: " + e.getMessage());
            return null;
        }
    }
    
    // Usage
    public static void main(String[] args) {
        JSONObject updatedDoc = updateDocument(
            "cust_12345", "doc_pass123", "123", 
            "PASSPORT", "Primary identification - US passport"
        );
        
        if (updatedDoc != null) {
            System.out.println("Updated document: " + updatedDoc.toString());
        }
    }
}
```

#### **Common Update Scenarios**

**1. Correct Document Type Example**

**Scenario**: Fix incorrectly categorized document type.

**Request:**

json

```
{
  "docType": "BANK_STATEMENT",
  "info": "Q1 2024 bank statement for financial verification"
}
```

**Response:**

json

```
{
  "document": {
    "id": "doc_bank456",
    "customerId": "cust_12345",
    "fileName": "financial_document.pdf",
    "size": 2987654,
    "mime": "application/pdf",
    "docType": "BANK_STATEMENT",
    "info": "Q1 2024 bank statement for financial verification",
    "isLock": false,
    "createAt": "2024-05-20T11:30:00Z",
    "status": "DST_SUBMITTED"
  }
}
```

**2. Add Detailed Description Example**

**Scenario**: Add more context to a document description.

**Request:**

json

```
{
  "info": "California driver's license - front side, issued 2022, expires 2026"
}
```

**Response:**

json

```
{
  "document": {
    "id": "doc_dl789",
    "customerId": "cust_12345",
    "fileName": "drivers_license_front.png",
    "size": 2456789,
    "mime": "image/png",
    "docType": "DRIVERS_LICENCE_FRONT",
    "info": "California driver's license - front side, issued 2022, expires 2026",
    "isLock": true,
    "createAt": "2024-05-12T13:20:00Z",
    "status": "DST_APPROVED"
  }
}
```

**3. Update Business Document Example**

**Scenario**: Update business incorporation documents with specific details.

**Request:**

json

```
{
  "docType": "ARTICLES_OF_INCORPORATION",
  "info": "Delaware C-Corporation - filed January 2023, EIN: 12-3456789"
}
```

**Response:**

json

```
{
  "document": {
    "id": "doc_biz123",
    "customerId": "cust_biz999",
    "fileName": "incorporation_docs.pdf",
    "size": 5120480,
    "mime": "application/pdf",
    "docType": "ARTICLES_OF_INCORPORATION",
    "info": "Delaware C-Corporation - filed January 2023, EIN: 12-3456789",
    "isLock": true,
    "createAt": "2024-04-15T08:45:00Z",
    "status": "DST_APPROVED"
  }
}
```

**4. Minimal Update Example**

**Scenario**: Update only the description without changing document type.

**Request:**

json

```
{
  "info": "Updated: Address verification with current utility bill"
}
```

**Response:**

json

```
{
  "document": {
    "id": "doc_util456",
    "customerId": "cust_12345",
    "fileName": "electricity_bill.jpg",
    "size": 1856320,
    "mime": "image/jpeg",
    "docType": "UTILITY_BILL",
    "info": "Updated: Address verification with current utility bill",
    "isLock": false,
    "createAt": "2024-05-18T09:15:00Z",
    "status": "DST_SUBMITTED"
  }
}
```

#### **Bulk Update Script Example**

**Python script for updating multiple documents:**

python

```
import requests

def update_multiple_documents(customer_id, document_updates, auth_token):
    results = []
    for update in document_updates:
        try:
            url = f"https://stagep.tst-apidmndelss.com/v2/customer/{customer_id}/file/{update['document_id']}"
            headers = {
                "Authorization": auth_token,
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
            
            payload = {}
            if 'doc_type' in update:
                payload['docType'] = update['doc_type']
            if 'info' in update:
                payload['info'] = update['info']
            
            response = requests.post(url, headers=headers, json=payload)
            success = response.status_code == 200
            
            results.append({
                'document_id': update['document_id'],
                'success': success,
                'message': response.json().get('message', '') if success else f"HTTP {response.status_code}"
            })
            
            print(f"Document {update['document_id']}: {'Success' if success else 'Failed'}")
            
        except Exception as e:
            results.append({
                'document_id': update['document_id'],
                'success': False,
                'message': str(e)
            })
            print(f"Document {update['document_id']}: Error - {e}")
    
    return results

# Usage
updates = [
    {
        'document_id': 'doc_123',
        'doc_type': 'PASSPORT',
        'info': 'US passport - primary identification'
    },
    {
        'document_id': 'doc_456',
        'info': 'Updated description for utility bill'
    }
]

results = update_multiple_documents("cust_12345", updates, "123")

# Print summary
success_count = sum(1 for r in results if r['success'])
print(f"\nSummary: {success_count}/{len(results)} documents updated successfully")
```

***

### **Error Responses**

1. **Document Not Found**:

   json

   ```
   {
     "error": "Document not found: doc_99999"
   }
   ```
2. **Customer Not Found**:

   json

   ```
   {
     "error": "Customer not found: cust_99999"
   }
   ```
3. **Unauthorized**:

   json

   ```
   {
     "error": "Unauthorized"
   }
   ```
4. **Document Locked**:

   json

   ```
   {
     "error": "Cannot update locked document"
   }
   ```
5. **Invalid Document Type**:

   json

   ```
   {
     "error": "Invalid document type: INVALID_TYPE"
   }
   ```

***

### **Notes**

* **Partial Updates**: Only include fields that need to be changed
* **Locked Documents**: Documents with `isLock: true` cannot be updated
* **Status Impact**: Updating document metadata may affect verification status
* **Audit Trail**: Document updates are typically logged for compliance
* **File Content**: This endpoint only updates metadata, not the actual file content

**Restrictions**:

* ❌ Cannot update locked documents (`isLock: true`)
* ❌ Cannot change the actual file content (use upload for replacement)
* ❌ Cannot modify `fileName`, `size`, `mime`, or `createAt` fields
* ✅ Can update `docType` and `info` fields for unlocked documents
* ✅ Can update documents with any status except when locked

**Best Practices**:

1. **Verify Before Update**: Check document status and lock status before updating
2. **Clear Descriptions**: Use descriptive info fields for better document management
3. **Consistent Categorization**: Use appropriate document types for compliance
4. **Error Handling**: Handle all possible error responses gracefully
5. **User Confirmation**: Implement confirmation for significant metadata changes

<br>


# Get Document Information

Retrieves detailed metadata and status information for a specific customer document.

This endpoint provides comprehensive document information including file details, document type, verification status, and administrative metadata without returning the actual file content.

**Endpoint**

`GET/v2/customer/{customerId}/file/{id}/info`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Customer_GetDocumentInfo>" %}

### **Request**

#### **Path Parameters**

| Parameter        | Type     | Description                                  | Required | Example        |
| ---------------- | -------- | -------------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** that owns the document.      | Yes      | `"cust_12345"` |
| **`id`**         | `string` | **Document unique ID** to retrieve info for. | Yes      | `"doc_abc123"` |

#### **Headers**

| Key                 | Value              | Required |
| ------------------- | ------------------ | -------- |
| **`Authorization`** | `<JWT>`            | Yes      |
| **`Accept`**        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns comprehensive document metadata including file information, document type, verification status, and administrative details.

#### **Response Fields**

**Document Object**

| Field            | Type      | Description                                    | Example                             |
| ---------------- | --------- | ---------------------------------------------- | ----------------------------------- |
| **`id`**         | `string`  | Unique document identifier.                    | `"doc_abc123"`                      |
| **`customerId`** | `string`  | Customer ID who owns the document.             | `"cust_12345"`                      |
| **`fileName`**   | `string`  | Original filename.                             | `"passport_scan.pdf"`               |
| **`size`**       | `integer` | File size in bytes.                            | `2048576`                           |
| **`mime`**       | `string`  | MIME type of the document.                     | `"application/pdf"`                 |
| **`docType`**    | `string`  | Document type/category.                        | `"PASSPORT"`                        |
| **`info`**       | `string`  | Additional information/notes.                  | `"Primary identification document"` |
| **`isLock`**     | `boolean` | Whether document is locked from modifications. | `false`                             |
| **`createAt`**   | `string`  | Document creation timestamp.                   | `"2024-05-15T10:30:00Z"`            |
| **`status`**     | `string`  | Current verification status.                   | `"DST_APPROVED"`                    |

**Example Response:**

json

```
{
  "document": {
    "id": "doc_abc123",
    "customerId": "cust_12345",
    "fileName": "john_doe_passport.pdf",
    "size": 2048576,
    "mime": "application/pdf",
    "docType": "PASSPORT",
    "info": "Primary identification - US passport",
    "isLock": false,
    "createAt": "2024-05-15T10:30:00Z",
    "status": "DST_APPROVED"
  }
}
```

***

### **Field Details**

#### **Document Type Values**

| Document Type                               | Description                      | Use Case               |
| ------------------------------------------- | -------------------------------- | ---------------------- |
| **`PASSPORT`**                              | Passport document                | Identity verification  |
| **`DRIVERS_LICENCE_FRONT`**                 | Driver's license (front)         | Identity verification  |
| **`DRIVERS_LICENCE_BACK`**                  | Driver's license (back)          | Identity verification  |
| **`GOVERNMENT_ID_FRONT`**                   | Government ID (front)            | Identity verification  |
| **`GOVERNMENT_ID_BACK`**                    | Government ID (back)             | Identity verification  |
| **`IDENTITY_CARD_FRONT`**                   | Identity card (front)            | Identity verification  |
| **`IDENTITY_CARD_BACK`**                    | Identity card (back)             | Identity verification  |
| **`UTILITY_BILL`**                          | Utility bill                     | Address verification   |
| **`BANK_STATEMENT`**                        | Bank statement                   | Financial verification |
| **`INCORPORATION_DOCUMENTS`**               | Business incorporation docs      | Business verification  |
| **`ARTICLES_OF_INCORPORATION`**             | Articles of incorporation        | Business verification  |
| **`BENEFICIAL_CERTIFICATE`**                | Beneficial ownership certificate | Business verification  |
| **`FINANCIAL_STATEMENT`**                   | Financial statements             | Financial verification |
| **`LEASE_AGREEMENT`**                       | Lease agreement                  | Address verification   |
| **`PAYSLIP`**                               | Payslip                          | Income verification    |
| **`SOCIAL_SECURITY_CARD`**                  | Social security card             | Identity verification  |
| **`POWER_OF_ATTORNEY`**                     | Power of attorney                | Authorization          |
| **`ACCOUNT_AGREEMENT`**                     | Account agreement                | Compliance             |
| **`OPERATION_DOCUMENT`**                    | Operation-related document       | Transaction support    |
| **`OTHER_1`**, **`OTHER_2`**, **`OTHER_3`** | Miscellaneous documents          | Various purposes       |

#### **Document Status Values**

| Status                      | Description        | Meaning                             |
| --------------------------- | ------------------ | ----------------------------------- |
| **`DST_APPROVED`**          | Document approved  | Document verified and accepted      |
| **`DST_SUBMITTED`**         | Document submitted | Awaiting review                     |
| **`DST_CHANGES_REQUESTED`** | Changes requested  | Requires modifications/resubmission |
| **`DST_MISSING`**           | Document missing   | Required document not provided      |
| **`DST_REJECTED`**          | Document rejected  | Failed verification                 |

#### **Common MIME Types**

| MIME Type                                                                     | Description            | Typical Use                 |
| ----------------------------------------------------------------------------- | ---------------------- | --------------------------- |
| **`application/pdf`**                                                         | PDF document           | Contracts, statements       |
| **`image/jpeg`**                                                              | JPEG image             | Photos, scans               |
| **`image/png`**                                                               | PNG image              | Screenshots, digital images |
| **`application/msword`**                                                      | Word document          | Agreements, letters         |
| **`application/vnd.openxmlformats-officedocument.wordprocessingml.document`** | Word document (modern) | Agreements, letters         |

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/customer/cust_12345/file/doc_abc123/info' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Approved Passport Example**

**Response:**

json

```
{
  "document": {
    "id": "doc_pass123",
    "customerId": "cust_12345",
    "fileName": "us_passport_scan.pdf",
    "size": 3120450,
    "mime": "application/pdf",
    "docType": "PASSPORT",
    "info": "US passport - primary ID verification",
    "isLock": true,
    "createAt": "2024-05-10T14:20:00Z",
    "status": "DST_APPROVED"
  }
}
```

#### **Pending Utility Bill Example**

**Response:**

json

```
{
  "document": {
    "id": "doc_util456",
    "customerId": "cust_67890",
    "fileName": "electricity_bill_may_2024.jpg",
    "size": 1856320,
    "mime": "image/jpeg",
    "docType": "UTILITY_BILL",
    "info": "Address verification - electricity bill",
    "isLock": false,
    "createAt": "2024-05-18T09:15:00Z",
    "status": "DST_SUBMITTED"
  }
}
```

#### **Business Incorporation Documents Example**

**Response:**

json

```
{
  "document": {
    "id": "doc_biz789",
    "customerId": "cust_99999",
    "fileName": "articles_of_incorporation.pdf",
    "size": 5120480,
    "mime": "application/pdf",
    "docType": "ARTICLES_OF_INCORPORATION",
    "info": "Business verification - Delaware incorporation",
    "isLock": false,
    "createAt": "2024-05-05T11:45:00Z",
    "status": "DST_CHANGES_REQUESTED"
  }
}
```

#### **Rejected Bank Statement Example**

**Response:**

json

```
{
  "document": {
    "id": "doc_bank321",
    "customerId": "cust_44444",
    "fileName": "bank_statement_q1_2024.pdf",
    "size": 2987654,
    "mime": "application/pdf",
    "docType": "BANK_STATEMENT",
    "info": "Financial verification - insufficient transaction history",
    "isLock": true,
    "createAt": "2024-04-28T16:30:00Z",
    "status": "DST_REJECTED"
  }
}
```

#### **Locked Identity Document Example**

**Response:**

json

```
{
  "document": {
    "id": "doc_id654",
    "customerId": "cust_77777",
    "fileName": "drivers_license_front.png",
    "size": 2456789,
    "mime": "image/png",
    "docType": "DRIVERS_LICENCE_FRONT",
    "info": "Primary ID - California driver's license",
    "isLock": true,
    "createAt": "2024-05-12T13:20:00Z",
    "status": "DST_APPROVED"
  }
}
```

***

### **Error Responses**

1. **Document Not Found**:

   json

   ```
   { "error": "Document not found: doc_99999" }
   ```
2. **Customer Not Found**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
3. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
4. **Access Denied**:

   json

   ```
   { "error": "Access denied to document" }
   ```

***

### **Notes**

* **Metadata Only**: This endpoint returns document metadata, not the actual file content
* **File Size**: Size is returned in bytes (e.g., 2048576 = \~2MB)
* **Lock Status**: Locked documents cannot be modified or deleted
* **Status Flow**: Documents typically progress: `SUBMITTED` → `APPROVED`/`CHANGES_REQUESTED`/`REJECTED`
* **Compliance**: Document types are categorized for regulatory compliance (KYC/AML)

**Common Use Cases**:

* Document status tracking and monitoring
* Compliance auditing and reporting
* Customer onboarding progress tracking
* Document verification workflow management
* File management and organization

**Document Lifecycle**:

1. **Upload** → Document submitted by customer
2. **Review** → Compliance team evaluates document
3. **Decision** → Document approved, rejected, or changes requested
4. **Lock** → Approved documents often locked to prevent modifications


# Upload File

Uploads a document/file to the storage system and associates it with a customer.

This endpoint is used for uploading various types of documents including identity verification, financial statements, operation documents, and other customer-related files.

**Endpoint**

`POST/v2/storage`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Storage_UploadDummy>" %}

### **Request**

#### **Headers**

| Key             | Value                 | Required |
| --------------- | --------------------- | -------- |
| `Authorization` | `<JWT>`               | Yes      |
| `Accept`        | `application/json`    | Yes      |
| `Content-Type`  | `multipart/form-data` | Yes      |

#### **Form Data Parameters**

| Parameter        | Type     | Description                                 | Required | Example        |
| ---------------- | -------- | ------------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** to associate the file with. | Yes      | `"cust_12345"` |
| **`attach`**     | `file`   | **File to upload** (document, image, etc.)  | Yes      | `document.pdf` |

***

### **Response (200 OK)**

Returns the uploaded file metadata including storage details and identifiers.

#### **Response Fields**

**File Object**

| Field            | Type      | Description                                             | Example                  |
| ---------------- | --------- | ------------------------------------------------------- | ------------------------ |
| **`partnerId`**  | `string`  | **Partner ID** associated with the file.                | `"partner_abc"`          |
| **`customerId`** | `string`  | **Customer ID** the file is linked to.                  | `"cust_12345"`           |
| **`id`**         | `string`  | **Unique file ID** in the storage system.               | `"file_78901"`           |
| **`name`**       | `string`  | **Original file name**.                                 | `"passport_scan.pdf"`    |
| **`size`**       | `integer` | **File size** in bytes.                                 | `2048576`                |
| **`mime`**       | `string`  | **MIME type** of the file.                              | `"application/pdf"`      |
| **`isLock`**     | `boolean` | **Lock status** (if file is locked from modifications). | `false`                  |
| **`createAt`**   | `string`  | **Creation timestamp**.                                 | `"2024-05-20T10:30:00Z"` |
| **`deletedAt`**  | `string`  | **Deletion timestamp** (if applicable).                 | `"2019-08-24T14:15:22Z"` |

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/storage' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json' \
  -F 'customerId=cust_12345' \
  -F 'attach=@/path/to/document.pdf'
```

#### **Response**

json

```
{
  "file": {
    "partnerId": "partner_abc123",
    "customerId": "cust_12345",
    "id": "file_78901",
    "name": "passport_scan.pdf",
    "size": 2048576,
    "mime": "application/pdf",
    "isLock": false,
    "createAt": "2024-05-20T10:30:00Z",
    "deletedAt": "2019-08-24T14:15:22Z"
  }
}
```

#### **Alternative Request using form-data**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/storage' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json' \
  -F 'customerId=cust_67890' \
  -F 'attach=@/path/to/invoice.jpg'
```

#### **Alternative Response**

json

```
{
  "file": {
    "partnerId": "partner_xyz789",
    "customerId": "cust_67890",
    "id": "file_45678",
    "name": "invoice_q2_2024.jpg",
    "size": 1536000,
    "mime": "image/jpeg",
    "isLock": false,
    "createAt": "2024-05-21T14:20:00Z",
    "deletedAt": "2019-08-24T14:15:22Z"
  }
}
```

***

### **Error Responses**

1. **Invalid Customer ID**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **File Too Large**:

   json

   ```
   { "error": "File size exceeds maximum limit of 50MB" }
   ```
3. **Unsupported File Type**:

   json

   ```
   { "error": "Unsupported file type: application/zip" }
   ```
4. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
5. **Missing Required Field**:

   json

   ```
   { "error": "Missing required field: customerId" }
   ```

***

### **Notes**

* **File Size Limits**: Typically supports files up to 50MB (check specific implementation limits)
* **Supported Formats**: Common document and image formats (PDF, JPG, PNG, DOC, DOCX, etc.)
* **Security**: Files are stored securely with access controls based on customer association
* **Metadata**: File metadata is preserved and returned in the response
* **Locking**: Files can be locked to prevent modifications or deletions
* **Deletion**: Soft deletion is supported with `deletedAt` timestamp

**Common Use Cases**:

* Identity verification documents (passports, driver's licenses)
* Financial statements and bank documents
* Operation-related documentation
* Customer onboarding materials
* Compliance and regulatory documents

**File Processing**:

* Files are validated for type and size
* Virus scanning may be performed on upload
* Metadata extraction (for supported formats)
* Secure storage with backup and retention policies


# List Files

Retrieves a paginated list of files from the storage system, optionally filtered by customer ID.

This endpoint allows you to browse uploaded documents and files with comprehensive metadata and pagination support.

**Endpoint**

`GET/v2/storage/file`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Storage_List>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Query Parameters**

| Parameter           | Type      | Description                         | Required | Example        |
| ------------------- | --------- | ----------------------------------- | -------- | -------------- |
| **`customerId`**    | `string`  | **Customer ID** to filter files by. | No       | `"cust_12345"` |
| **`meta.page`**     | `integer` | **Page number** (starts from 0).    | No       | `0`            |
| **`meta.pageSize`** | `integer` | **Items count per page**.           | No       | `50`           |

***

### **Response (200 OK)**

Returns a paginated list of file metadata with pagination information.

#### **Response Fields**

**Items Array**

Array of file objects with the following structure:

| Field            | Type      | Description                                             | Example                  |
| ---------------- | --------- | ------------------------------------------------------- | ------------------------ |
| **`partnerId`**  | `string`  | **Partner ID** associated with the file.                | `"partner_abc"`          |
| **`customerId`** | `string`  | **Customer ID** the file is linked to.                  | `"cust_12345"`           |
| **`id`**         | `string`  | **Unique file ID** in the storage system.               | `"file_78901"`           |
| **`name`**       | `string`  | **Original file name**.                                 | `"passport_scan.pdf"`    |
| **`size`**       | `integer` | **File size** in bytes.                                 | `2048576`                |
| **`mime`**       | `string`  | **MIME type** of the file.                              | `"application/pdf"`      |
| **`isLock`**     | `boolean` | **Lock status** (if file is locked from modifications). | `false`                  |
| **`createAt`**   | `string`  | **Creation timestamp**.                                 | `"2024-05-20T10:30:00Z"` |
| **`deletedAt`**  | `string`  | **Deletion timestamp** (if applicable).                 | `"2019-08-24T14:15:22Z"` |

**Meta Object**

Pagination metadata for the response:

| Field          | Type      | Description                                 | Example |
| -------------- | --------- | ------------------------------------------- | ------- |
| **`pageSize`** | `integer` | **Number of items per page**.               | `50`    |
| **`page`**     | `integer` | **Current page number** (0-based).          | `0`     |
| **`total`**    | `string`  | **Total number of items** across all pages. | `"125"` |

***

### **Examples**

#### **Request (All Files with Pagination)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file?meta.page=0&meta.pageSize=20' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response**

json

```
{
  "items": [
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78901",
      "name": "passport_scan.pdf",
      "size": 2048576,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-20T10:30:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    },
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78902",
      "name": "driver_license_front.jpg",
      "size": 1536000,
      "mime": "image/jpeg",
      "isLock": true,
      "createAt": "2024-05-19T14:20:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    },
    {
      "partnerId": "partner_xyz789",
      "customerId": "cust_67890",
      "id": "file_45678",
      "name": "bank_statement_q1.pdf",
      "size": 3096576,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-18T09:15:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "125"
  }
}
```

#### **Request (Filtered by Customer ID)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file?customerId=cust_12345&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Filtered)**

json

```
{
  "items": [
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78901",
      "name": "passport_scan.pdf",
      "size": 2048576,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-20T10:30:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    },
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78902",
      "name": "driver_license_front.jpg",
      "size": 1536000,
      "mime": "image/jpeg",
      "isLock": true,
      "createAt": "2024-05-19T14:20:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    },
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78903",
      "name": "utility_bill.pdf",
      "size": 1024000,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-18T16:45:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "3"
  }
}
```

#### **Request (Default Pagination)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Default)**

json

```
{
  "items": [
    {
      "partnerId": "partner_abc123",
      "customerId": "cust_12345",
      "id": "file_78901",
      "name": "passport_scan.pdf",
      "size": 2048576,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-20T10:30:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    },
    {
      "partnerId": "partner_xyz789",
      "customerId": "cust_67890",
      "id": "file_45678",
      "name": "bank_statement_q1.pdf",
      "size": 3096576,
      "mime": "application/pdf",
      "isLock": false,
      "createAt": "2024-05-18T09:15:00Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pageSize": 50,
    "page": 0,
    "total": "125"
  }
}
```

***

### **Error Responses**

1. **Invalid Customer ID**:

   json

   ```
   { "error": "Customer not found: cust_99999" }
   ```
2. **Invalid Page Parameters**:

   json

   ```
   { "error": "Invalid page parameters: page must be >= 0" }
   ```
3. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
4. **Rate Limit Exceeded**:

   json

   ```
   { "error": "Rate limit exceeded" }
   ```

***

### **Notes**

* **Pagination**: Default page size is typically 50 items if not specified
* **Filtering**: Use `customerId` to retrieve files for a specific customer only
* **Sorting**: Results are typically sorted by `createAt` descending (newest first)
* **Soft Deletion**: Files marked with `deletedAt` are typically excluded from results
* **Performance**: Large result sets should use pagination to optimize performance
* **Lock Status**: `isLock=true` indicates files that cannot be modified or deleted

**Common Use Cases**:

* Browsing customer document archives
* Audit and compliance reviews
* File management interfaces
* Document verification workflows
* Bulk operations on multiple files

**Pagination Strategy**:

* Start with `page=0` for the first page
* Use `total` from meta to calculate total pages: `totalPages = ceil(total / pageSize)`
* Handle empty result sets gracefully when `page` exceeds available data


# Download File

Downloads a specific file from the storage system by its unique ID. Returns the raw file content with appropriate Content-Type headers for direct file access or display in browsers.

**Endpoint**

`GET/v2/storage/file/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Storage_Download>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                     | Required | Example        |
| --------- | -------- | ------------------------------- | -------- | -------------- |
| **`id`**  | `string` | **File unique ID** to download. | Yes      | `"file_78901"` |

#### **Query Parameters**

| Parameter        | Type     | Description                                           | Required | Example        |
| ---------------- | -------- | ----------------------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** for additional authorization context. | No       | `"cust_12345"` |

#### **Headers**

| Key             | Value                       | Required |
| --------------- | --------------------------- | -------- |
| `Authorization` | `<JWT>`                     | Yes      |
| `Accept`        | `*/*` or specific MIME type | No       |

***

### **Response (200 OK)**

Returns the raw binary content of the file with appropriate Content-Type header.

#### **Response Headers**

| Header                | Value                                 | Description                      |
| --------------------- | ------------------------------------- | -------------------------------- |
| `Content-Type`        | `application/pdf`                     | MIME type of the downloaded file |
| `Content-Length`      | `2048576`                             | Size of the file in bytes        |
| `Content-Disposition` | `attachment; filename="document.pdf"` | File download behavior           |

#### **Response Body**

Raw binary content of the requested file.

***

### **Examples**

#### **Request (Download PDF Document)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_78901' \
  -H 'Authorization: 123' \
  --output downloaded_document.pdf
```

#### **Response Headers (PDF Example)**

text

```
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 2048576
Content-Disposition: attachment; filename="passport_scan.pdf"
X-File-ID: file_78901
X-Customer-ID: cust_12345
```

#### **Request (Download Image with Customer Context)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_78902?customerId=cust_12345' \
  -H 'Authorization: 123' \
  --output driver_license.jpg
```

#### **Response Headers (Image Example)**

text

```
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 1536000
Content-Disposition: inline; filename="driver_license_front.jpg"
X-File-ID: file_78902
X-Customer-ID: cust_12345
```

#### **Request (Direct Browser Display)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_45678' \
  -H 'Authorization: 123' \
  -H 'Accept: image/jpeg'
```

#### **Response Headers (Inline Display)**

text

```
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 1024000
Content-Disposition: inline; filename="utility_bill.jpg"
X-File-ID: file_45678
```

***

### **Alternative JSON Response Format**

If Accept header is set to `application/json`, returns file metadata with base64-encoded content:

#### **Response Fields**

| Field             | Type     | Description                               | Example             |
| ----------------- | -------- | ----------------------------------------- | ------------------- |
| **`contentType`** | `string` | **MIME type** of the file content.        | `"application/pdf"` |
| **`data`**        | `string` | **File content** as base64-encoded bytes. | `"JVBERi0xLjQK..."` |
| **`extensions`**  | `array`  | **Additional metadata** (optional).       | -                   |

#### **JSON Response Example**

json

```
{
  "contentType": "application/pdf",
  "data": "JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovQ29udGVudHMgNCAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL0xlbmd0aCA1MjMKPj4Kc3RyZWFtC..."
}
```

***

### **Error Responses**

1. **File Not Found**:

   json

   ```
   { "error": "File not found: file_99999" }
   ```
2. **Access Denied**:

   json

   ```
   { "error": "Access denied to file: file_78901" }
   ```
3. **File Locked**:

   json

   ```
   { "error": "File is locked and cannot be downloaded" }
   ```
4. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Binary Response**: Default behavior returns raw file bytes with proper Content-Type
* **JSON Alternative**: Use `Accept: application/json` for base64-encoded content in JSON
* **Security**: Files are subject to access control based on customer association
* **Performance**: Large files are streamed efficiently
* **Browser Behavior**: Content-Disposition controls whether file is displayed or downloaded
* **Caching**: Appropriate cache headers may be included for static files

**Common Use Cases**:

* Downloading customer documents for verification
* Retrieving operation-related files
* Accessing identity verification documents
* Displaying files directly in web applications
* Batch processing of stored documents

**Content-Disposition Options**:

* `attachment`: Browser downloads the file
* `inline`: Browser attempts to display the file
* Filename preserves original file name for downloads


# Delete File

Removes a specific file from the storage system by its unique ID. This operation performs a soft delete, marking the file as deleted while potentially retaining it in the system for audit purposes.

**Endpoint**

`DELETE/v2/storage/file/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Storage_Delete>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                   | Required | Example        |
| --------- | -------- | ----------------------------- | -------- | -------------- |
| **`id`**  | `string` | **File unique ID** to delete. | Yes      | `"file_78901"` |

#### **Query Parameters**

| Parameter        | Type     | Description                                           | Required | Example        |
| ---------------- | -------- | ----------------------------------------------------- | -------- | -------------- |
| **`customerId`** | `string` | **Customer ID** for additional authorization context. | No       | `"cust_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a success status and message confirming the file deletion.

#### **Response Fields**

| Field         | Type      | Description                   | Example                       |
| ------------- | --------- | ----------------------------- | ----------------------------- |
| **`success`** | `boolean` | **Deletion status**.          | `true`                        |
| **`message`** | `string`  | **Operation result message**. | `"File deleted successfully"` |

***

### **Examples**

#### **Request (Delete File)**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_78901' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response**

json

```
{
  "success": true,
  "message": "File deleted successfully"
}
```

#### **Request (Delete File with Customer Context)**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_78902?customerId=cust_12345' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response**

json

```
{
  "success": true,
  "message": "File file_78902 deleted for customer cust_12345"
}
```

#### **Request (Delete Non-Existent File)**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/storage/file/file_99999' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Error)**

json

```
{
  "success": false,
  "message": "File not found: file_99999"
}
```

***

### **Error Responses**

1. **File Not Found**:

   json

   ```
   {
     "success": false,
     "message": "File not found: file_99999"
   }
   ```
2. **File Locked**:

   json

   ```
   {
     "success": false, 
     "message": "File is locked and cannot be deleted"
   }
   ```
3. **Access Denied**:

   json

   ```
   {
     "success": false,
     "message": "Access denied to file: file_78901"
   }
   ```
4. **Unauthorized**:

   json

   ```
   {
     "success": false,
     "message": "Unauthorized"
   }
   ```
5. **Customer Mismatch**:

   json

   ```
   {
     "success": false,
     "message": "File does not belong to specified customer"
   }
   ```

***

### **Notes**

* **Soft Delete**: Files are typically marked as deleted rather than permanently removed
* **Audit Trail**: Deletion is logged for compliance and tracking purposes
* **Access Control**: Files can only be deleted by authorized users with proper permissions
* **Locked Files**: Files with `isLock=true` cannot be deleted
* **Customer Context**: Providing `customerId` adds an additional security layer
* **Idempotent**: Deleting an already deleted file returns success

**Common Use Cases**:

* Removing outdated customer documents
* Cleaning up temporary uploads
* Compliance with data retention policies
* User-initiated file management
* Administrative file cleanup

**Security Considerations**:

* Files are only deletable by users with appropriate permissions
* Customer context validation prevents cross-customer file access
* Locked files require administrative override
* Deletion operations are logged for audit purposes


# List Limits

Retrieves a paginated list of transaction limits with comprehensive filtering options. Limits define minimum and maximum amounts for various operation types and payment methods.

**Endpoint**

`GET/v2/billing/limits`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_ListLimits>" %}

### **Request**

#### **Query Parameters**

| Parameter              | Type      | Description & Values                                                                                                                                                                                                                                             | Required | Example                  |
| ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------ |
| **`currencyIsoFrom`**  | `string`  | Filter by **source currency** (ISO 4217).                                                                                                                                                                                                                        | No       | `"USD"`                  |
| **`currencyIsoTo`**    | `string`  | Filter by **target currency** (ISO 4217).                                                                                                                                                                                                                        | No       | `"EUR"`                  |
| **`customerId`**       | `string`  | Filter by **specific customer**.                                                                                                                                                                                                                                 | No       | `"cust_12345"`           |
| **`fromCreatedAt`**    | `string`  | Filter limits created **after** this date (ISO 8601).                                                                                                                                                                                                            | No       | `"2024-01-01T00:00:00Z"` |
| **`fromUpdatedAt`**    | `string`  | Filter limits updated **after** this date (ISO 8601).                                                                                                                                                                                                            | No       | `"2024-05-01T00:00:00Z"` |
| **`meta.page`**        | `integer` | **Page number** (starts from 0).                                                                                                                                                                                                                                 | No       | `0`                      |
| **`meta.pageSize`**    | `integer` | **Items per page**.                                                                                                                                                                                                                                              | No       | `20`                     |
| **`operationType`**    | `string`  | <p>Filter by <strong>operation type</strong>:<br>- <code>NOTSET</code>: Service type<br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code><br>- <code>CORRECTING</code></p>    | No       | `"TRANSFER"`             |
| **`paymentType`**      | `string`  | <p>Filter by <strong>payment method</strong>:<br>- <code>EMPTY</code>: Service type<br>- <code>ACH</code><br>- <code>FEDWIRE</code><br>- <code>SWIFT</code><br>- <code>CRYPTO</code><br>- <code>EFT</code><br>- <code>SEPA\_CT</code><br>- <code>IMPS</code></p> | No       | `"SWIFT"`                |
| **`toCreatedAt`**      | `string`  | Filter limits created **before** this date (ISO 8601).                                                                                                                                                                                                           | No       | `"2024-12-31T23:59:59Z"` |
| **`toUpdatedAt`**      | `string`  | Filter limits updated **before** this date (ISO 8601).                                                                                                                                                                                                           | No       | `"2024-05-21T23:59:59Z"` |
| **`withAllCustomers`** | `boolean` | Include **system-wide limits** (`true`) or customer-specific only (`false`).                                                                                                                                                                                     | No       | `true`                   |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of limit configurations.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description             | Example |
| -------------- | --------- | ----------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.         | `20`    |
| **`page`**     | `integer` | Current page number.    | `0`     |
| **`total`**    | `string`  | Total limits available. | `"150"` |

**2. Limit Object (`items[]`)**

| Field                 | Type      | Description                               | Example                  |
| --------------------- | --------- | ----------------------------------------- | ------------------------ |
| **`id`**              | `integer` | **Unique limit identifier**.              | `101`                    |
| **`owner`**           | `integer` | **Owner ID** (system or customer).        | `15`                     |
| **`currencyIsoFrom`** | `string`  | **Source currency** (ISO 4217).           | `"USD"`                  |
| **`currencyIsoTo`**   | `string`  | **Target currency** (ISO 4217).           | `"EUR"`                  |
| **`operationType`**   | `string`  | **Operation type** (see values above).    | `"TRANSFER"`             |
| **`paymentType`**     | `string`  | **Payment method** (see values above).    | `"SWIFT"`                |
| **`min`**             | `number`  | **Minimum amount** allowed.               | `10.0`                   |
| **`max`**             | `number`  | **Maximum amount** allowed.               | `10000.0`                |
| **`createdAt`**       | `string`  | Creation timestamp (ISO 8601).            | `"2024-01-15T10:30:00Z"` |
| **`updatedAt`**       | `string`  | Last update timestamp (ISO 8601).         | `"2024-05-20T14:45:00Z"` |
| **`customerName`**    | `string`  | **Customer name** (if customer-specific). | `"John Doe"`             |
| **`customerId`**      | `string`  | **Customer ID** (if customer-specific).   | `"cust_12345"`           |

**Example Response:**

```json
{
  "items": [
    {
      "id": 101,
      "owner": 15,
      "currencyIsoFrom": "USD",
      "currencyIsoTo": "EUR",
      "operationType": "TRANSFER",
      "paymentType": "SWIFT",
      "min": 50.0,
      "max": 5000.0,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-05-20T14:45:00Z",
      "customerName": "John Doe",
      "customerId": "cust_12345"
    },
    {
      "id": 102,
      "owner": 0,
      "currencyIsoFrom": "USD",
      "currencyIsoTo": "USD",
      "operationType": "WITHDRAW",
      "paymentType": "ACH",
      "min": 10.0,
      "max": 2500.0,
      "createdAt": "2024-02-01T09:00:00Z",
      "updatedAt": "2024-05-18T16:20:00Z",
      "customerName": "",
      "customerId": ""
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "45"
  }
}
```

***

### **Examples**

#### **Request**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/limits?operationType=TRANSFER&currencyIsoFrom=USD&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request for Crypto Limits**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/billing/limits?paymentType=CRYPTO&operationType=WITHDRAW&withAllCustomers=true' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Invalid Currency**:

   ```json
   { "error": "Invalid currency code: XYZ" }
   ```
2. **Invalid Operation Type**:

   ```json
   { "error": "Invalid operation type: INVALID_TYPE" }
   ```

***

### **Notes**

* **System vs Customer Limits**:
  * `owner=0` indicates system-wide limits
  * `owner>0` indicates customer-specific limits
* **Currency Pairs**: For single-currency operations, `currencyIsoFrom` and `currencyIsoTo` are the same.
* **Empty Customer Fields**: System limits have empty `customerName` and `customerId`.
* **Limit Hierarchy**: Customer-specific limits override system limits when both exist.

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNjQ2ODA3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.yScbhwSz7crV6rjOolVsLBAO11vWEX8G57r0o7julFw
currencyCodeFrom: USD
currencyCodeTo: EUR
customerId: D7k3xbc-ERrj-lde9k1t3XuaE
fromCreatedAt: string
fromUpdatedAt:

```

Response sample

```postman_json
{
  "items": [
    {
      "id": 1,
      "owner": 193,
      "currencyCodeFrom": "USD",
      "currencyCodeTo": "EUR",
      "operationType": "EXCHANGE",
      "paymentType": "EMPTY",
      "min": 100,
      "max": 100000,
      "createdAt": "2025-10-28T07:16:41Z",
      "updatedAt": "2025-10-28T07:16:41Z",
      "customerName": "NOVA HORIZON LTD",
      "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE"
    }
  ],
  "meta": {
    "pageSize": 1,
    "page": 0,
    "total": "1"
  }
}
```


# Set Limit

Creates or updates transaction limits for operations. Can set system-wide limits or customer-specific limits for various operation types and payment methods.

**Endpoint**

`POST/v2/billing/limits`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Billing_SetLimit>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field                 | Type      | Description & Requirements                                                                                                                                                                                                                                          | Required | Example        |
| --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- |
| **`id`**              | `integer` | **Limit ID**  - limit number associ                                                                                                                                                                                                                                 | No       | `101`          |
| **`customerId`**      | `string`  | **Customer ID** for customer-specific limits. Omit for system limits.                                                                                                                                                                                               | No       | `"cust_12345"` |
| **`currencyIsoFrom`** | `string`  | **Source currency** (ISO 4217).                                                                                                                                                                                                                                     | Yes      | `"USD"`        |
| **`currencyIsoTo`**   | `string`  | **Target currency** (ISO 4217).                                                                                                                                                                                                                                     | Yes      | `"EUR"`        |
| **`operationType`**   | `string`  | <p><strong>Operation type</strong>:<br>- <code>NOTSET</code><br>- <code>DEPOSIT</code><br>- <code>TRANSFER</code><br>- <code>WITHDRAW</code><br>- <code>COMMISSION</code><br>- <code>EXCHANGE</code><br>- <code>CORRECTING</code></p>                               | Yes      | `"TRANSFER"`   |
| **`paymentType`**     | `string`  | <p><strong>Payment method</strong>:<br>- <code>NOT\_SET</code><br>- <code>EMPTY</code><br>- <code>ACH</code><br>- <code>FEDWIRE</code><br>- <code>SWIFT</code><br>- <code>CRYPTO</code><br>- <code>EFT</code><br>- <code>SEPA\_CT</code><br>- <code>IMPS</code></p> | Yes      | `"SWIFT"`      |
| **`min`**             | `number`  | **Minimum amount** allowed.                                                                                                                                                                                                                                         | Yes      | `10.0`         |
| **`max`**             | `number`  | **Maximum amount** allowed.                                                                                                                                                                                                                                         | Yes      | `5000.0`       |

**Example Request Body (System Limit):**

```json
{
  "currencyIsoFrom": "USD",
  "currencyIsoTo": "EUR",
  "operationType": "TRANSFER",
  "paymentType": "SWIFT",
  "min": 50.0,
  "max": 10000.0
}
```

**Example Request Body (Customer-Specific Limit):**

```json
{
  "customerId": "cust_12345",
  "currencyIsoFrom": "USD",
  "currencyIsoTo": "USD",
  "operationType": "WITHDRAW",
  "paymentType": "ACH",
  "min": 100.0,
  "max": 2500.0
}
```

**Example Request Body (Update Existing Limit):**

```json
{
  "id": 101,
  "currencyIsoFrom": "USD",
  "currencyIsoTo": "EUR",
  "operationType": "TRANSFER",
  "paymentType": "SWIFT",
  "min": 100.0,
  "max": 15000.0
}
```

***

### **Response (200 OK)**

Returns the created or updated limit configuration.

#### **Response Fields**

| Field                 | Type      | Description                          | Example                  |
| --------------------- | --------- | ------------------------------------ | ------------------------ |
| **`id`**              | `integer` | **Unique limit identifier**.         | `101`                    |
| **`owner`**           | `integer` | **Owner ID** (system=0, customer>0). | `15`                     |
| **`currencyIsoFrom`** | `string`  | **Source currency**.                 | `"USD"`                  |
| **`currencyIsoTo`**   | `string`  | **Target currency**.                 | `"EUR"`                  |
| **`operationType`**   | `string`  | **Operation type**.                  | `"TRANSFER"`             |
| **`paymentType`**     | `string`  | **Payment method**.                  | `"SWIFT"`                |
| **`min`**             | `number`  | **Minimum amount**.                  | `50.0`                   |
| **`max`**             | `number`  | **Maximum amount**.                  | `10000.0`                |
| **`createdAt`**       | `string`  | Creation timestamp (ISO 8601).       | `"2024-01-15T10:30:00Z"` |
| **`updatedAt`**       | `string`  | **Last update timestamp**.           | `"2024-05-21T14:45:00Z"` |
| **`customerName`**    | `string`  | **Customer name** (if applicable).   | `"John Doe"`             |
| **`customerId`**      | `string`  | **Customer ID** (if applicable).     | `"cust_12345"`           |

**Example Response (System Limit):**

```json
{
  "item": {
    "id": 101,
    "owner": 0,
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "EUR",
    "operationType": "TRANSFER",
    "paymentType": "SWIFT",
    "min": 50.0,
    "max": 10000.0,
    "createdAt": "2024-05-21T14:45:00Z",
    "updatedAt": "2024-05-21T14:45:00Z",
    "customerName": "",
    "customerId": ""
  }
}
```

**Example Response (Customer Limit):**

```json
{
  "item": {
    "id": 102,
    "owner": 15,
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "USD",
    "operationType": "WITHDRAW",
    "paymentType": "ACH",
    "min": 100.0,
    "max": 2500.0,
    "createdAt": "2024-05-21T14:45:00Z",
    "updatedAt": "2024-05-21T14:45:00Z",
    "customerName": "John Doe",
    "customerId": "cust_12345"
  }
}
```

***

### **Examples**

#### **Request (Create Crypto Limit)**

```bash
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/limits' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "currencyIsoFrom": "BTC",
    "currencyIsoTo": "BTC",
    "operationType": "WITHDRAW",
    "paymentType": "CRYPTO",
    "min": 0.001,
    "max": 10.0
  }'
```

#### **Request (Update Existing Limit)**

```bash
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/billing/limits' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 101,
    "currencyIsoFrom": "USD",
    "currencyIsoTo": "EUR",
    "operationType": "TRANSFER",
    "paymentType": "SWIFT",
    "min": 100.0,
    "max": 20000.0
  }'
```

***

### **Error Responses**

1. **Invalid Amounts**:

   ```json
   { "error": "Minimum amount cannot exceed maximum amount" }
   ```
2. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_99999" }
   ```
3. **Duplicate Limit**:

   ```json
   { "error": "Limit already exists for this configuration" }
   ```

***

### **Notes**

* **Create vs Update**:
  * Include `id` to update existing limit
  * Omit `id` to create new limit
* **Customer Limits**: Take precedence over system limits for the same customer
* **Validation**: Minimum must be less than or equal to maximum
* **Currency Pairs**: Use same currency for single-currency operations

Real request\
`"{`\
`""id"": 2378,`\
`""customerId"": ""DaKFXt2-1vfp-e00RmYfclJTS"",`\
`""currencyCodeFrom"": ""USD"",`\
`""currencyCodeTo"": ""USD"",`\
`""operationType"": ""TRANSFER"",`\
`""paymentType"": ""EMPTY"",`\
`""min"": 1000,`\
`""max"": 2000`\
`}"`

Real response

`"{`\
`""item"": {`\
`""id"": 2378,`\
`""owner"": 232,`\
`""currencyCodeFrom"": ""USD"",`\
`""currencyCodeTo"": ""USD"",`\
`""operationType"": ""TRANSFER"",`\
`""paymentType"": ""EMPTY"",`\
`""min"": 1000,`\
`""max"": 2000,`\
`""createdAt"": ""2025-11-09T05:10:58Z"",`\
`""updatedAt"": ""2025-11-09T05:10:58Z"",`\
`""customerName"": """",`\
`""customerId"": """"`\
`}`\
`}"`


# Get Hook Parameters

Retrieves the current webhook configuration settings. Webhooks allow your system to receive real-time notifications about events in the payment system.

**Endpoint**

`GET/v2/hook/get`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Hook_GetParameters>" %}

### **Request**

#### **Headers**

| Key      | Value              | Required |
| -------- | ------------------ | -------- |
| `Accept` | `application/json` | Yes      |

*Note: No authorization required for this endpoint.*

***

### **Response (200 OK)**

Returns the current webhook configuration settings.

#### **Response Fields**

| Field                    | Type      | Description                                                       | Example                                 |
| ------------------------ | --------- | ----------------------------------------------------------------- | --------------------------------------- |
| **`enabled`**            | `boolean` | **Webhook feature status**. `true` = active, `false` = disabled.  | `true`                                  |
| **`hookUrl`**            | `string`  | **URL where webhook notifications are sent**.                     | `"https://api.yourdomain.com/webhooks"` |
| **`jwtSecret`**          | `string`  | **Secret key for JWT verification** of incoming webhook requests. | `"your-jwt-secret-key-123"`             |
| **`hookCustomer`**       | `boolean` | **Customer events**: Notifications for customer-related changes.  | `true`                                  |
| **`hookOperation`**      | `boolean` | **Operation events**: Notifications for transaction operations.   | `true`                                  |
| **`hookDepositAccount`** | `boolean` | **Deposit account events**: Notifications for account changes.    | `false`                                 |
| **`hookCounterparty`**   | `boolean` | **Counterparty events**: Notifications for counterparty changes.  | `true`                                  |

**Example Response:**

json

```
{
  "enabled": true,
  "hookUrl": "https://api.yourdomain.com/webhooks/payments",
  "jwtSecret": "sec_5f3d8e2a789bcd1234567890",
  "hookCustomer": true,
  "hookOperation": true,
  "hookDepositAccount": false,
  "hookCounterparty": true
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/hook/get' \
  -H 'Accept: application/json'
```

#### **Response with All Features Disabled**

json

```
{
  "enabled": false,
  "hookUrl": "",
  "jwtSecret": "",
  "hookCustomer": false,
  "hookOperation": false,
  "hookDepositAccount": false,
  "hookCounterparty": false
}
```

***

### **Event Types Explained**

* **`hookCustomer`**: Customer creation, updates, status changes
* **`hookOperation`**: Payment processing, transfers, transactions
* **`hookDepositAccount`**: Account balance changes, account updates
* **`hookCounterparty`**: Counterparty/bank details changes

***

### **Notes**

* **Security**: The `jwtSecret` is used to verify incoming webhook requests. Keep it secure.
* **URL Requirements**: The `hookUrl` must be HTTPS for production environments.
* **Enablement**: All event types require `enabled: true` to function.
* **Retry Mechanism**: Webhooks typically include retry logic for failed deliveries.

**Webhook Payload Example:**

json

```
{
  "event": "customer.updated",
  "data": {
    "cuid": "DqCsgSE-4e95-ViYbNI",
    "status": "ACCEPTED"
  },
  "timestamp": "2024-05-21T10:30:00Z"
}
```


# Set Hook Parameters

**Endpoint**

`POST/v2/hook/set`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Hook_SetParameters>" %}

Configures webhook settings for receiving real-time notifications about system events. This endpoint allows you to enable/disable webhooks, set the receiving URL, and specify which event types to subscribe to.

***

### **Request**

#### **Headers**

| Key            | Value              | Required |
| -------------- | ------------------ | -------- |
| `Content-Type` | `application/json` | Yes      |
| `Accept`       | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field                  | Type      | Description                                                     | Required | Example                                 |
| ---------------------- | --------- | --------------------------------------------------------------- | -------- | --------------------------------------- |
| **`parameters`**       | `object`  | Webhook configuration object.                                   | Yes      | -                                       |
| → `enabled`            | `boolean` | **Enable webhook feature**.                                     | Yes      | `true`                                  |
| → `hookUrl`            | `string`  | **URL for webhook notifications**. Must be HTTPS in production. | Yes      | `"https://api.yourdomain.com/webhooks"` |
| → `jwtSecret`          | `string`  | **Secret for JWT verification** of webhook requests.            | Yes      | `"your-secret-key-123"`                 |
| → `hookCustomer`       | `boolean` | **Subscribe to customer events**.                               | Yes      | `true`                                  |
| → `hookOperation`      | `boolean` | **Subscribe to operation events**.                              | Yes      | `true`                                  |
| → `hookDepositAccount` | `boolean` | **Subscribe to deposit account events**.                        | Yes      | `false`                                 |
| → `hookCounterparty`   | `boolean` | **Subscribe to counterparty events**.                           | Yes      | `true`                                  |

**Example Request Body:**

json

```
{
  "parameters": {
    "enabled": true,
    "hookUrl": "https://api.yourcompany.com/webhooks/payments",
    "jwtSecret": "sec_5f3d8e2a789bcd1234567890",
    "hookCustomer": true,
    "hookOperation": true,
    "hookDepositAccount": false,
    "hookCounterparty": true
  }
}
```

***

### **Response (200 OK)**

Returns the updated webhook configuration confirming the changes.

#### **Response Fields**

| Field                    | Type      | Description                          | Example                                           |
| ------------------------ | --------- | ------------------------------------ | ------------------------------------------------- |
| **`enabled`**            | `boolean` | Webhook feature status.              | `true`                                            |
| **`hookUrl`**            | `string`  | Webhook notification URL.            | `"https://api.yourcompany.com/webhooks/payments"` |
| **`jwtSecret`**          | `string`  | JWT verification secret.             | `"sec_5f3d8e2a789bcd1234567890"`                  |
| **`hookCustomer`**       | `boolean` | Customer events subscription.        | `true`                                            |
| **`hookOperation`**      | `boolean` | Operation events subscription.       | `true`                                            |
| **`hookDepositAccount`** | `boolean` | Deposit account events subscription. | `false`                                           |
| **`hookCounterparty`**   | `boolean` | Counterparty events subscription.    | `true`                                            |

**Example Response:**

json

```
{
  "enabled": true,
  "hookUrl": "https://api.yourcompany.com/webhooks/payments",
  "jwtSecret": "sec_5f3d8e2a789bcd1234567890",
  "hookCustomer": true,
  "hookOperation": true,
  "hookDepositAccount": false,
  "hookCounterparty": true
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/hook/set' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "parameters": {
      "enabled": true,
      "hookUrl": "https://api.example.com/webhooks",
      "jwtSecret": "my-secure-jwt-token-123",
      "hookCustomer": true,
      "hookOperation": true,
      "hookDepositAccount": false,
      "hookCounterparty": true
    }
  }'
```

#### **Disable Webhooks**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/hook/set' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "parameters": {
      "enabled": false,
      "hookUrl": "",
      "jwtSecret": "",
      "hookCustomer": false,
      "hookOperation": false,
      "hookDepositAccount": false,
      "hookCounterparty": false
    }
  }'
```

***

### **Error Responses**

1. **Invalid URL**:

   json

   ```
   { "error": "hookUrl must be a valid HTTPS URL" }
   ```
2. **Missing Required Field**:

   json

   ```
   { "error": "jwtSecret is required when enabled is true" }
   ```
3. **URL Not Reachable**:

   json

   ```
   { "error": "Webhook URL is not reachable" }
   ```

***

### **Notes**

* **Security**: Use HTTPS for `hookUrl` in production environments.
* **JWT Verification**: Incoming webhooks will include a JWT token in the `Authorization` header that should be verified using your `jwtSecret`.
* **Event Types**:
  * **Customer**: Creation, updates, status changes
  * **Operation**: Payments, transfers, transactions
  * **Deposit Account**: Balance changes, account updates
  * **Counterparty**: Bank details changes
* **Testing**: After configuration, test webhooks using the test endpoint (if available).


# Get Partner

Retrieves information about the current partner associated with the provided API key. This endpoint returns essential partner details including unique identifier, name, and current status. Useful for

**Endpoint**

`GET/v2/auth/partner`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Auth_Partner>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `GET`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/auth/partner`

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the partner object associated with the authenticated API key.

#### **Response Fields**

**Partner Object (`item`)**

| Field        | Type     | Description                    | Example             |
| ------------ | -------- | ------------------------------ | ------------------- |
| **`puid`**   | `string` | **Unique partner identifier**. | `partner_abc123def` |
| **`name`**   | `string` | **Partner organization name**. | `Acme Corporation`  |
| **`status`** | `string` | **Current partner status**.    | `ACCEPT`            |

**Status Values**

* `NEW` - Newly registered partner
* `READY_FOR_MODERATION` - Ready for administrative review
* `MODERATED` - Under moderation process
* `VERIFY` - Verification in progress
* `ACCEPT` - Approved and active partner
* `REJECT` - Rejected partner application
* `BANNED` - Banned/disabled partner

**Example Response:**

```json
{
  "item": {
    "puid": "partner_abc123def",
    "name": "Acme Corporation",
    "status": "ACCEPT"
  }
}
```

***

### **Examples**

#### **Basic Partner Retrieval (cURL)**

```bash
curl --request GET \
  --url https://stagep.tst-apidmndelss.com/v2/auth/partner \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
2. **Invalid API Key**:

   ```json
   { "error": "Invalid authentication token" }
   ```
3. **Partner Not Found**:

   ```json
   { "error": "Partner not found for provided credentials" }
   ```

***

### **Notes**

#### **Authentication Context**

* The endpoint automatically determines which partner to return based on the API key
* Each API key is associated with a specific partner account
* Useful for verifying authentication and partner status

#### **Status Implications**

* **`ACCEPT`**: Partner can make API calls and access services
* **`NEW`/`MODERATED`/`VERIFY`**: Partner may have limited API access during onboarding
* **`REJECT`/`BANNED`**: Partner cannot make API calls or access services

#### **Best Practices**

* Check partner status before performing critical operations
* Cache partner information to reduce API calls
* Handle different statuses appropriately in your application
* Use `puid` for logging and audit purposes

**Common Use Cases**:

* Verifying API key validity and partner status
* Displaying partner information in admin dashboards
* Conditional logic based on partner status
* Audit logging with partner context
* Multi-tenant application context switching

**Security Considerations**:

* API keys should be stored securely
* Rotate API keys regularly for security
* Monitor partner status for access control
* Implement rate limiting based on partner tier

**Integration Tips**:

* Call this endpoint during application startup to verify connectivity
* Use the response to configure partner-specific settings
* Cache the response to avoid frequent API calls
* Handle status changes gracefully in your application

Request sample

```
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTczMTA0LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.oSBPLvobjQwI5LwfFtWnmUdbnPedujraitSDnW8m3zw
```

Response sample

```postman_json
{
  "item": {
    "id": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "name": "Delos test",
    "status": "NEW",
    "logo": null
  }
}
```


# List Currencies

Retrieves a list of available currencies with their details including exchange rates and currency types (fiat/crypto).

**Endpoint**

`GET/v2/currency`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Currency_List>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns an array of currency objects with detailed information.

#### **Response Fields**

**Currency Object**

| Field           | Type      | Description                                     | Example       |
| --------------- | --------- | ----------------------------------------------- | ------------- |
| **`iso`**       | `string`  | **ISO 4217 currency code** (3-letter).          | `"USD"`       |
| **`name`**      | `string`  | **Full currency name**.                         | `"US Dollar"` |
| **`isCrypto`**  | `boolean` | `true` for cryptocurrencies.                    | `false`       |
| **`isDefault`** | `boolean` | `true` for system default currency.             | `true`        |
| **`rate`**      | `number`  | **Exchange rate** relative to default currency. | `1.0`         |

**Example Response:**

json

```
{
  "items": [
    {
      "iso": "USD",
      "name": "US Dollar",
      "isCrypto": false,
      "isDefault": true,
      "rate": 1.0
    },
    {
      "iso": "EUR",
      "name": "Euro",
      "isCrypto": false,
      "isDefault": false,
      "rate": 0.93
    },
    {
      "iso": "BTC",
      "name": "Bitcoin",
      "isCrypto": true,
      "isDefault": false,
      "rate": 0.000025
    }
  ]
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   {
     "error": "Unauthorized"
   }
   ```

***

### **Notes**

* **Rate Basis**:
  * Exchange rates are relative to the **default currency** (e.g., `isDefault: true`).
  * Example: If USD is default, EUR rate `0.93` means 1 USD = 0.93 EUR.
* **Crypto Currencies**:
  * Cryptocurrencies use standard ticker symbols (e.g., `BTC`, `ETH`).
  * Rates may update frequently due to market volatility.
* **Default Currency**:
  * Typically used as the base for accounting and reporting.
  * Only one currency can be default per system.

### Examples

**Real request**&#x20;

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwMzU1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.yzC3XkfbHdA2IWiS_wPTgFiVD1O-nEt48f8ULJn50pk
```

**Real response**&#x20;

200 OK

```postman_json
{
  "items": [
    {
      "code": "AED",
      "name": "AED",
      "isCrypto": false,
      "isDefault": false,
      "rate": 3.6725
    },
    {
      "code": "BHD",
      "name": "BHD",
      "isCrypto": false,
      "isDefault": false,
      "rate": 0.37701
    },
    {
      "code": "BRL",
      "name": "BRL",
      "isCrypto": false,
      "isDefault": false,
      "rate": 5.3878
    },
    {
      "code": "BSD",
      "name": "BSD",
      "isCrypto": false,
      "isDefault": false,
      "rate": 1
    },
    {
      "code": "BTC",
      "name": "BTC",
      "isCrypto": true,
      "isDefault": false,
      "rate": 0.00000925755
    },
    {
      "code": "CAD",
      "name": "CAD",
      "isCrypto": false,
      "isDefault": false,
      "rate": 1.401228
    },
    {
      "code": "CHF",
      "name": "CHF",
      "isCrypto": false,
      "isDefault": false,
      "rate": 0.796247
    },
    {
      "code": "CNY",
      "name": "CNY",
      "isCrypto": false,
      "isDefault": false,
      "rate": 7.1248
    },
    {
      "code": "CRC",
      "name": "CRC",
      "isCrypto": false,
      "isDefault": false,
      "rate": 502.4538
    },
    {
      "code": "DKK",
      "name": "DKK",
      "isCrypto": false,
      "isDefault": false,
      "rate": 6.441807
    },
    {
      "code": "ETH",
      "name": "ETH",
      "isCrypto": true,
      "isDefault": false,
      "rate": 0.00026048927
    },
    {
      "code": "EUR",
      "name": "EUR",
      "isCrypto": false,
      "isDefault": false,
      "rate": 0.86159354
    },
    {
      "code": "GBP",
      "name": "GBP",
      "isCrypto": false,
      "isDefault": false,
      "rate": 0.750792
    },
    {
      "code": "GTQ",
      "name": "GTQ",
      "isCrypto": false,
      "isDefault": false,
      "rate": 7.667817
    },
    {
      "code": "HKD",
      "name": "HKD",
      "isCrypto": false,
      "isDefault": false,
      "rate": 7.769675
    },
    {
      "code": "INR",
      "name": "INR",
      "isCrypto": false,
      "isDefault": false,
      "rate": 87.75751
    },
    {
      "code": "JPY",
      "name": "JPY",
      "isCrypto": false,
      "isDefault": false,
      "rate": 151.8205
    },
    {
      "code": "MATIC",
      "name": "MATIC",
      "isCrypto": true,
      "isDefault": false,
      "rate": 5.0125313
    },
    {
      "code": "MXN",
      "name": "MXN",
      "isCrypto": false,
      "isDefault": false,
      "rate": 18.400436
    },
    {
      "code": "MYR",
      "name": "MYR",
      "isCrypto": false,
      "isDefault": false,
      "rate": 4.23
    },
    {
      "code": "PAB",
      "name": "PAB",
      "isCrypto": false,
      "isDefault": false,
      "rate": 1
    },
    {
      "code": "PLN",
      "name": "PLN",
      "isCrypto": false,
      "isDefault": false,
      "rate": 3.651135
    },
    {
      "code": "QAR",
      "name": "QAR",
      "isCrypto": false,
      "isDefault": false,
      "rate": 3.648913
    },
    {
      "code": "SAR",
      "name": "SAR",
      "isCrypto": false,
      "isDefault": false,
      "rate": 3.750313
    },
    {
      "code": "SGD",
      "name": "SGD",
      "isCrypto": false,
      "isDefault": false,
      "rate": 1.298656
    },
    {
      "code": "SOL",
      "name": "SOL",
      "isCrypto": true,
      "isDefault": false,
      "rate": 0.0054306504
    },
    {
      "code": "TRL",
      "name": "TRL",
      "isCrypto": false,
      "isDefault": false,
      "rate": 1
    },
    {
      "code": "TRX",
      "name": "TRX",
      "isCrypto": true,
      "isDefault": false,
      "rate": 3.0854676
    },
    {
      "code": "USD",
      "name": "USD",
      "isCrypto": false,
      "isDefault": true,
      "rate": 1
    },
    {
      "code": "USDC_ERC20",
      "name": "USDC ERC20",
      "isCrypto": true,
      "isDefault": false,
      "rate": 1
    },
    {
      "code": "USDT_ERC20",
      "name": "USDT ERC20",
      "isCrypto": true,
      "isDefault": false,
      "rate": 1
    },
    {
      "code": "USDT_TRC20",
      "name": "USDT TRC20",
      "isCrypto": true,
      "isDefault": false,
      "rate": 1
    }
  ]
}
```


# Convert

Converts an amount from one currency to another using current exchange rates. Returns both the original and converted amounts.

**Endpoint**

`POST/v2/currency`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Currency_Convert>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field               | Type     | Description                                            | Required | Example |
| ------------------- | -------- | ------------------------------------------------------ | -------- | ------- |
| **`amount`**        | `object` | **Source amount** to convert (see Money Object below). | Yes      | -       |
| **`toCurrencyIso`** | `string` | **Target currency** (ISO 4217 code).                   | Yes      | `"EUR"` |

**Money Object**

| Field              | Type      | Description                           | Example               |
| ------------------ | --------- | ------------------------------------- | --------------------- |
| **`currencyCode`** | `string`  | **Source currency** (ISO 4217 code).  | `"USD"`               |
| **`units`**        | `string`  | **Whole units** (e.g., dollars).      | `"100"`               |
| **`nanos`**        | `integer` | **Fractional units** (nanos = 10^-9). | `500000000` (= $0.50) |

**Example Request Body:**

json

```
{
  "amount": {
    "currencyCode": "USD",
    "units": "100",
    "nanos": 500000000
  },
  "toCurrencyIso": "EUR"
}
```

***

### **Response (200 OK)**

Returns both the original and converted amounts.

#### **Response Fields**

| Field                 | Type     | Description                          | Example |
| --------------------- | -------- | ------------------------------------ | ------- |
| **`sourceAmount`**    | `object` | Original amount (matches request).   | -       |
| **`convertedAmount`** | `object` | Converted amount (see Money Object). | -       |

**Money Object (for both amounts)**

| Field              | Type      | Description       | Example               |
| ------------------ | --------- | ----------------- | --------------------- |
| **`currencyCode`** | `string`  | Currency code.    | `"EUR"`               |
| **`units`**        | `string`  | Whole units.      | `"93"`                |
| **`nanos`**        | `integer` | Fractional units. | `250000000` (= €0.25) |

**Example Response:**

json

```
{
  "sourceAmount": {
    "currencyCode": "USD",
    "units": "100",
    "nanos": 500000000
  },
  "convertedAmount": {
    "currencyCode": "EUR",
    "units": "93",
    "nanos": 250000000
  }
}
```

\*Translation: $100.50 USD = €93.25 EUR\*

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/currency' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": {
      "currencyCode": "USD",
      "units": "50",
      "nanos": 0
    },
    "toCurrencyIso": "JPY"
  }'
```

#### **Response**

json

```
{
  "sourceAmount": {
    "currencyCode": "USD",
    "units": "50",
    "nanos": 0
  },
  "convertedAmount": {
    "currencyCode": "JPY",
    "units": "5500",
    "nanos": 0
  }
}
```

***

### **Error Cases**

1. **Invalid Currency**:

   json

   ```
   { "error": "Unsupported currency code: XYZ" }
   ```
2. **Missing Parameters**:

   json

   ```
   { "error": "amount and toCurrencyIso are required" }
   ```
3. **Rate Unavailable**:

   json

   ```
   { "error": "Exchange rate not available for USD to BTC" }
   ```

***

### **Notes**

* **Rate Source**: Uses real-time exchange rates (updated frequently).
* **Precision**: Conversion maintains high precision (nanos = 10^-9).
* **Fees**: Conversion may include applicable fees (check system configuration).

Real request example

```postman_json
  {
  "amount": {
    "currencyCode": "EUR",
    "units": "10",
    "nanos": 0
  },
  "currencyCodeTo": "USD"
}
{
  "amount": {
    "currencyCode": "EUR",
    "units": "10",
    "nanos": 0
  },
  "currencyCodeTo": "USD"
}
```

Real response example

200 OK

```postman_json
{
  "sourceAmount": {
    "currencyCode": "EUR",
    "units": "10",
    "nanos": 0
  },
  "convertedAmount": {
    "currencyCode": "USD",
    "units": "11",
    "nanos": 606401205
  }
}
```


# Get Currency

Retrieves detailed information about a specific currency including its exchange rate and properties.

**Endpoint**

`GET/v2/currency/{iso}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Currency_Get>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                            | Required | Example |
| --------- | -------- | -------------------------------------- | -------- | ------- |
| **`iso`** | `string` | **ISO 4217 currency code** (3-letter). | Yes      | `"USD"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a currency object with detailed information.

#### **Response Fields**

| Field           | Type      | Description                                     | Example       |
| --------------- | --------- | ----------------------------------------------- | ------------- |
| **`iso`**       | `string`  | **ISO 4217 currency code** (3-letter).          | `"USD"`       |
| **`name`**      | `string`  | **Full currency name**.                         | `"US Dollar"` |
| **`isCrypto`**  | `boolean` | `true` for cryptocurrencies.                    | `false`       |
| **`isDefault`** | `boolean` | `true` for system default currency.             | `true`        |
| **`rate`**      | `number`  | **Exchange rate** relative to default currency. | `1.0`         |

**Example Response:**

json

```
{
  "iso": "USD",
  "name": "US Dollar",
  "isCrypto": false,
  "isDefault": true,
  "rate": 1.0
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/currency/USD' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Crypto Currency Example**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/currency/BTC' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

**Response:**

json

```
{
  "iso": "BTC",
  "name": "Bitcoin",
  "isCrypto": true,
  "isDefault": false,
  "rate": 0.000025
}
```

***

### **Error Responses**

1. **Currency Not Found**:

   json

   ```
   {
     "error": "Currency not found: XYZ"
   }
   ```
2. **Invalid ISO Code**:

   json

   ```
   {
     "error": "Invalid currency code format. Must be 3 letters."
   }
   ```

***

### **Notes**

* **Rate Basis**:
  * Exchange rates are relative to the **default currency** (where `isDefault: true`).
  * Example: If EUR is default, USD rate `1.07` means 1 EUR = 1.07 USD.
* **Crypto Currencies**:
  * Use standard cryptocurrency ticker symbols (e.g., `BTC`, `ETH`, `USDT`).
  * Rates update frequently due to market volatility.
* **Default Currency**:
  * Only one currency can be marked as default in the system.
  * Used as base for accounting and reporting.

Real request Example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwNDc2LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.llC0NQeIZUymVFKIHI7d1q_IFW39qD0QYd7i0KWKxyA
code*: USD
```

Real response example

200 OK

```postman_json
{
  "code": "USD",
  "name": "USD",
  "isCrypto": false,
  "isDefault": true,
  "rate": 1
}
```

<br>


# List users

Retrieves a paginated list of users with comprehensive filtering and search capabilities. This endpoint is designed for user management, allowing administrators to find and monitor users based on vari

**Endpoint**

`GET/v2/user`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_List>" %}

## **List Users API Documentation**

**Endpoint:** `GET /v2/user`

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **Query Parameters**

**Pagination Parameters**

| Parameter           | Type      | Description                      | Required | Example |
| ------------------- | --------- | -------------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | **Page number** (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | **Number of items per page**.    | No       | `50`    |

**Filtering & Search Parameters**

| Parameter          | Type     | Description                           | Required | Example                |
| ------------------ | -------- | ------------------------------------- | -------- | ---------------------- |
| **`uuid`**         | `string` | **Unique user identifier**.           | No       | `user_123abc`          |
| **`cuid`**         | `string` | **Customer identifier**.              | No       | `cust_456def`          |
| **`name`**         | `string` | **User's full name**.                 | No       | `John Smith`           |
| **`customerName`** | `string` | **Customer name**.                    | No       | `Acme Corp`            |
| **`email`**        | `string` | **User email address**.               | No       | `user@example.com`     |
| **`phone`**        | `string` | **User phone number**.                | No       | `+1234567890`          |
| **`status`**       | `string` | **User status** (see values below).   | No       | `ACCEPT`               |
| **`fromCreateAt`** | `string` | **Start creation date** (ISO format). | No       | `2024-01-01T00:00:00Z` |
| **`toCreateAt`**   | `string` | **End creation date** (ISO format).   | No       | `2024-03-31T23:59:59Z` |

**Status Values**

* `NOT_SET` - Status not specified
* `NEW` - Registered user
* `READY_FOR_MODERATION` - Ready for review
* `MODERATED` - Under moderation
* `VERIFY` - Verification in progress
* `ACCEPT` - Approved user
* `REJECT` - Rejected user
* `BANNED` - Banned user

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of users with metadata.

#### **Response Fields**

**Meta Object**

| Field          | Type      | Description            | Example |
| -------------- | --------- | ---------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.        | `50`    |
| **`page`**     | `integer` | Current page number.   | `0`     |
| **`total`**    | `string`  | Total users available. | `"150"` |

**User Object (`items[]`)**

| Field          | Type      | Description                     | Example                |
| -------------- | --------- | ------------------------------- | ---------------------- |
| **`uuid`**     | `string`  | **Unique user identifier**.     | `user_123abc`          |
| **`username`** | `string`  | **User's login name**.          | `johnsmith`            |
| **`status`**   | `string`  | **Current user status**.        | `ACCEPT`               |
| **`is2fa`**    | `boolean` | **2FA enabled status**.         | `true`                 |
| **`createAt`** | `string`  | **Account creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updateAt`** | `string`  | **Last update timestamp**.      | `2024-03-20T14:22:00Z` |
| **`name`**     | `string`  | **User's full name**.           | `John Smith`           |
| **`comment`**  | `string`  | **Administrative comments**.    | `VIP customer`         |

**Example Response:**

```json
{
  "meta": {
    "pageSize": 50,
    "page": 0,
    "total": "150"
  },
  "items": [
    {
      "uuid": "user_123abc",
      "username": "johnsmith",
      "status": "ACCEPT",
      "is2fa": true,
      "createAt": "2024-01-15T10:30:00Z",
      "updateAt": "2024-03-20T14:22:00Z",
      "name": "John Smith",
      "comment": "Premium account"
    },
    {
      "uuid": "user_456def",
      "username": "janedoe",
      "status": "MODERATED",
      "is2fa": false,
      "createAt": "2024-02-01T09:15:00Z",
      "updateAt": "2024-02-01T09:15:00Z",
      "name": "Jane Doe",
      "comment": "Needs verification"
    }
  ]
}
```

***

### **Examples**

#### **Basic Pagination Request**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/user?meta.page=0&meta.pageSize=20' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Filter by Status and Date Range**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/user?status=ACCEPT&fromCreateAt=2024-01-01T00:00:00Z&toCreateAt=2024-03-31T23:59:59Z&meta.pageSize=100' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Search by Email and Name**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/user?email=user@example.com&name=John&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Error Responses**

1. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
2. **Invalid Date Format**:

   ```json
   { "error": "Invalid date format for fromCreateAt" }
   ```
3. **Invalid Status**:

   ```json
   { "error": "Invalid status value: INVALID_STATUS" }
   ```

***

### **Notes**

* **Pagination**: Default `pageSize` is typically 20-50 items if not specified
* **Combined Filters**: Multiple filters are applied with AND logic
* **Performance**: Large result sets may require specific indexing for optimal performance
* **Data Freshness**: Results reflect current user state at time of request

**Common Use Cases**:

* User administration and moderation dashboards
* Customer support user lookup
* Audit and compliance reporting
* User activity monitoring
* Account status reviews

**Best Practices**:

* Always use pagination for large datasets
* Combine filters to narrow down results
* Use specific identifiers (`uuid`, `email`) for precise searches
* Monitor `total` field to understand result set size before pagination

Real request

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTU3MjQ4LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.aCky2QDHayg1KQkIzYlUaZB5_IaYya7pZfWqNENi_7M

```

Real response

200 OK

```postman_json
{
  "meta": {
    "pageSize": 5,
    "page": 0,
    "total": "5"
  },
  "items": [
    {
      "userId": "59a827c3-3f48-48c8-8b09-f490e1b25cba",
      "username": "Test@test123.co",
      "status": "NEW",
      "is2fa": false,
      "createAt": "2025-04-08T13:20:11Z",
      "updateAt": "2025-04-08T13:20:20Z",
      "name": "Test1",
      "comment": ""
    },
    {
      "userId": "d27f5633-c19c-40fd-9a8e-cff2ae10e9b6",
      "username": "Test@ttest.io",
      "status": "ACCEPT",
      "is2fa": false,
      "createAt": "2025-03-27T06:37:30Z",
      "updateAt": "2025-03-27T06:37:54Z",
      "name": "Test2",
      "comment": ""
    },
    {
      "userId": "158a190e-c4a9-4e6c-bf9b-4ef74ae345eb",
      "username": "testeu@gmail.com",
      "status": "ACCEPT",
      "is2fa": false,
      "createAt": "2025-01-28T12:53:10Z",
      "updateAt": "2025-01-28T14:46:15Z",
      "name": "111",
      "comment": ""
    },
    {
      "userId": "89b9fa6b-aff4-47b1-9bd3-0f8e6930b8ac",
      "username": "testuser@test.com",
      "status": "NEW",
      "is2fa": false,
      "createAt": "2025-01-28T12:48:49Z",
      "updateAt": "2025-01-28T12:48:49Z",
      "name": "TestUser",
      "comment": ""
    },
    {
      "userId": "5ff73da8-224e-44de-a235-2d7a76c3144c",
      "username": "test@delos.financial",
      "status": "ACCEPT",
      "is2fa": false,
      "createAt": "2024-12-12T15:47:23Z",
      "updateAt": "2025-09-01T06:56:28Z",
      "name": "Test",
      "comment": ""
    }
  ]
}
```


# Add user

Creates a new user account in the system. This endpoint allows administrators to register new users with basic account information and credentials.

**Endpoint**

`POST/v2/user`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_Add>" %}

The newly created user will typically start with a `NEW` status and may require further verification or moderation depending on system configuration.

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `POST`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user`

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Request Body (JSON)**

All fields should be sent as a JSON object in the request body.

| Field            | Type     | Description                         | Required | Example                |
| ---------------- | -------- | ----------------------------------- | -------- | ---------------------- |
| **`username`**   | `string` | **User's login identifier**.        | Yes      | `john.smith`           |
| **`password`**   | `string` | **User's login password**.          | Yes      | `SecurePass123!`       |
| **`customerId`** | `string` | **Associated customer identifier**. | No       | `cust_abc123`          |
| **`name`**       | `string` | **User's first name**.              | No       | `John`                 |
| **`lastname`**   | `string` | **User's last name**.               | No       | `Smith`                |
| **`comment`**    | `string` | **Administrative comments**.        | No       | `VIP customer account` |

**Example Request Body:**

```json
{
  "customerId": "cust_abc123",
  "username": "john.smith",
  "password": "SecurePass123!",
  "name": "John",
  "lastname": "Smith",
  "comment": "VIP customer account"
}
```

***

### **Response (200 OK)**

Returns the newly created user object with system-generated fields and default status.

#### **Response Fields**

**User Object (`item`)**

| Field          | Type      | Description                          | Example                |
| -------------- | --------- | ------------------------------------ | ---------------------- |
| **`uuid`**     | `string`  | **System-generated unique user ID**. | `user_7d83h2k9`        |
| **`username`** | `string`  | **User's login name**.               | `john.smith`           |
| **`status`**   | `string`  | **Initial account status**.          | `NEW`                  |
| **`is2fa`**    | `boolean` | **2FA enabled status**.              | `false`                |
| **`createAt`** | `string`  | **Account creation timestamp**.      | `2024-01-15T10:30:00Z` |
| **`updateAt`** | `string`  | **Last update timestamp**.           | `2024-01-15T10:30:00Z` |
| **`name`**     | `string`  | **User's full name**.                | `John Smith`           |
| **`comment`**  | `string`  | **Administrative comments**.         | `VIP customer account` |

**Example Response:**

```json
{
  "item": {
    "uuid": "user_7d83h2k9",
    "username": "john.smith",
    "status": "NEW",
    "is2fa": false,
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-01-15T10:30:00Z",
    "name": "John Smith",
    "comment": "VIP customer account"
  }
}
```

***

### **Examples**

#### **Basic User Creation Request (cURL)**

```bash
curl --request POST \
  --url https://stagep.tst-apidmndelss.com/v2/user \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "jane.doe",
    "password": "SecurePass456!",
    "name": "Jane",
    "lastname": "Doe"
  }'
```

#### **Complete User Creation with Customer ID**

```bash
curl --request POST \
  --url https://stagep.tst-apidmndelss.com/v2/user \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "customerId": "cust_789xyz",
    "username": "robert.wilson",
    "password": "RobertPass789!",
    "name": "Robert",
    "lastname": "Wilson",
    "comment": "Enterprise account - priority support"
  }'
```

***

### **Error Responses**

1. **Missing Required Fields**:

   ```json
   { "error": "Missing required field: username" }
   ```
2. **Username Already Exists**:

   ```json
   { "error": "Username already exists: john.smith" }
   ```
3. **Invalid Password Format**:

   ```json
   { "error": "Password does not meet complexity requirements" }
   ```
4. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
5. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_invalid_id" }
   ```

***

### **Notes**

#### **Password Requirements**

* Minimum length (typically 8-12 characters)
* Requires uppercase and lowercase letters
* Requires numbers and/or special characters
* Cannot contain username or common patterns

#### **Status Workflow**

* New users typically start with `NEW` status
* Status may automatically progress to `READY_FOR_MODERATION` or `VERIFY` based on system rules
* Additional verification steps may be required depending on configuration

#### **Best Practices**

* Use strong, unique passwords for each account
* Include both first and last names for better user identification
* Associate users with customer accounts when appropriate
* Use comments for administrative notes or special instructions

**Common Use Cases**:

* Onboarding new customers programmatically
* Bulk user registration for enterprise clients
* Automated account creation workflows
* Integration with CRM or user management systems

**Next Steps After Creation**:

* User may need to complete email verification
* Additional profile information may need to be added
* Status may require manual moderation/approval
* 2FA setup may be required for certain account types

Request sample

```
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTU3MjQ4LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.aCky2QDHayg1KQkIzYlUaZB5_IaYya7pZfWqNENi_7M
```

```postman_json
{
  "customerId": "D7k3xbc-ERrj-lde9k1t3XuaE",
  "username": "testapi@delos.financial",
  "password": "testapipassword",
  "name": "testapi@delos.financial",
  "lastname": "testapi@delos.financial",
  "comment": "testapi"
}
```

Response sample

200 OK

```postman_json
{
  "item": {
    "userId": "fc0206c3-f996-47a7-9695-9ea7947dfae8",
    "username": "testapi@delos.financial",
    "status": "NEW",
    "is2fa": false,
    "createAt": "2025-10-27T13:32:57Z",
    "updateAt": "2025-10-27T13:32:57Z",
    "name": "testapi@delos.financial",
    "comment": "testapi"
  }
}
```


# Delete user

Permanently deletes a user account from the system. This operation is irreversible and removes all user data associated with the account. Use with caution.

**Endpoint**

`DELETE/v2/user/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_Delete>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `DELETE`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user/{id}`

#### **Path Parameters**

| Parameter | Type     | Description                                  | Required | Example          |
| --------- | -------- | -------------------------------------------- | -------- | ---------------- |
| **`id`**  | `string` | **Unique identifier of the user to delete**. | Yes      | `user_abc123def` |

#### **Query Parameters**

| Parameter        | Type     | Description                                         | Required | Example       |
| ---------------- | -------- | --------------------------------------------------- | -------- | ------------- |
| **`customerId`** | `string` | **Customer identifier** (for verification/context). | No       | `cust_789xyz` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a confirmation object indicating the success or failure of the deletion operation.

#### **Response Fields**

| Field         | Type      | Description                  | Example                     |
| ------------- | --------- | ---------------------------- | --------------------------- |
| **`success`** | `boolean` | **Operation status**.        | `true`                      |
| **`message`** | `string`  | **Detailed result message**. | `User deleted successfully` |

**Example Response:**

```json
{
  "success": true,
  "message": "User user_abc123def deleted successfully"
}
```

***

### **Examples**

#### **Basic User Deletion Request (cURL)**

```bash
curl --request DELETE \
  --url 'https://stagep.tst-apidmndelss.com/v2/user/user_abc123def' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **User Deletion with Customer Context**

```bash
curl --request DELETE \
  --url 'https://stagep.tst-apidmndelss.com/v2/user/user_456ghi?customerId=cust_789xyz' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **User Not Found**:

   ```json
   {
     "success": false,
     "message": "User not found: user_invalid_id"
   }
   ```
2. **Unauthorized**:

   ```json
   {
     "success": false,
     "message": "Unauthorized"
   }
   ```
3. **Customer Context Mismatch**:

   ```json
   {
     "success": false,
     "message": "User does not belong to specified customer"
   }
   ```
4. **User Cannot Be Deleted** (e.g., active sessions):

   ```json
   {
     "success": false,
     "message": "User cannot be deleted: user has active sessions"
   }
   ```

***

### **Notes**

#### **Deletion Behavior**

* **Permanent operation** - cannot be undone
* Removes user account and associated data
* May preserve audit trails for compliance purposes
* Some systems may implement soft delete (archiving) instead of permanent deletion

#### **Security Considerations**

* Requires appropriate administrative privileges
* Customer ID parameter may be used for additional verification
* Some users (e.g., system administrators) may be protected from deletion

#### **Best Practices**

* Always verify the user ID before deletion
* Use the `customerId` parameter for additional context/verification
* Consider deactivating users instead of deleting when possible
* Maintain backup of critical user data before deletion

**Common Use Cases**:

* Removing inactive or duplicate accounts
* GDPR compliance and right-to-be-forgotten requests
* Cleaning up test or temporary accounts
* Terminating employee access in enterprise systems

**Alternative to Deletion**:

* Consider updating user status to `BANNED` or `REJECTED` instead of deletion
* Deactivation may be preferable for historical reporting purposes

**Pre-deletion Checks**:

* Ensure no pending transactions or activities
* Verify user is not associated with critical business processes
* Confirm proper authorization for deletion operation

Real response:


# Update user

Updates an existing user's information. This endpoint allows modification of various user properties including password, status, personal information, and account settings. Only include the fields you

**Endpoint**

`PUT/v2/user/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_Update>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `PUT`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user/{id}`

#### **Path Parameters**

| Parameter | Type     | Description                                  | Required | Example          |
| --------- | -------- | -------------------------------------------- | -------- | ---------------- |
| **`id`**  | `string` | **Unique identifier of the user to update**. | Yes      | `user_abc123def` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Request Body (JSON)**

Include only the fields you want to update. Omitted fields will remain unchanged.

| Field            | Type      | Description                         | Required | Example                |
| ---------------- | --------- | ----------------------------------- | -------- | ---------------------- |
| **`customerId`** | `string`  | **Associated customer identifier**. | No       | `cust_789xyz`          |
| **`password`**   | `string`  | **New login password**.             | No       | `NewSecurePass123!`    |
| **`status`**     | `string`  | **User status** (see values below). | No       | `ACCEPT`               |
| **`is2fa`**      | `boolean` | **2FA enabled status**.             | No       | `true`                 |
| **`name`**       | `string`  | **User's first name**.              | No       | `John`                 |
| **`lastname`**   | `string`  | **User's last name**.               | No       | `Smith`                |
| **`comment`**    | `string`  | **Administrative comments**.        | No       | `Updated contact info` |

**Status Values**

* `NEW` - Registered user
* `READY_FOR_MODERATION` - Ready for review
* `MODERATED` - Under moderation
* `VERIFY` - Verification in progress
* `ACCEPT` - Approved user
* `REJECT` - Rejected user
* `BANNED` - Banned user

**Example Request Body (Partial Update):**

```json
{
  "status": "ACCEPT",
  "name": "John",
  "lastname": "Smith"
}
```

**Example Request Body (Full Update):**

```json
{
  "customerId": "cust_789xyz",
  "password": "NewSecurePass123!",
  "status": "ACCEPT",
  "is2fa": true,
  "name": "John",
  "lastname": "Smith",
  "comment": "Account upgraded to premium"
}
```

***

### **Response (200 OK)**

Returns the updated user object with all current field values.

#### **Response Fields**

**User Object (`item`)**

| Field          | Type      | Description                      | Example                       |
| -------------- | --------- | -------------------------------- | ----------------------------- |
| **`uuid`**     | `string`  | **Unique user identifier**.      | `user_abc123def`              |
| **`username`** | `string`  | **User's login name**.           | `john.smith`                  |
| **`status`**   | `string`  | **Current user status**.         | `ACCEPT`                      |
| **`is2fa`**    | `boolean` | **2FA enabled status**.          | `true`                        |
| **`createAt`** | `string`  | **Original creation timestamp**. | `2024-01-15T10:30:00Z`        |
| **`updateAt`** | `string`  | **Last update timestamp**.       | `2024-03-20T14:22:00Z`        |
| **`name`**     | `string`  | **User's full name**.            | `John Smith`                  |
| **`comment`**  | `string`  | **Administrative comments**.     | `Account upgraded to premium` |

**Example Response:**

```json
{
  "item": {
    "uuid": "user_abc123def",
    "username": "john.smith",
    "status": "ACCEPT",
    "is2fa": true,
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-03-20T14:22:00Z",
    "name": "John Smith",
    "comment": "Account upgraded to premium"
  }
}
```

***

### **Examples**

#### **Update User Status (cURL)**

```bash
curl --request PUT \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_abc123def \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "status": "ACCEPT"
  }'
```

#### **Update Password and Personal Info**

```bash
curl --request PUT \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_456ghi \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "password": "NewSecurePass456!",
    "name": "Jane",
    "lastname": "Doe"
  }'
```

#### **Complete User Profile Update**

```bash
curl --request PUT \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_789jkl \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "customerId": "cust_789xyz",
    "status": "ACCEPT",
    "is2fa": true,
    "name": "Robert",
    "lastname": "Wilson",
    "comment": "Enterprise account - priority support"
  }'
```

***

### **Error Responses**

1. **User Not Found**:

   ```json
   { "error": "User not found: user_invalid_id" }
   ```
2. **Invalid Status**:

   ```json
   { "error": "Invalid status value: INVALID_STATUS" }
   ```
3. **Password Complexity Error**:

   ```json
   { "error": "Password does not meet complexity requirements" }
   ```
4. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
5. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_invalid_id" }
   ```

***

### **Notes**

#### **Update Behavior**

* **Partial update** - only included fields are modified
* **`updateAt`** timestamp is automatically updated
* Some status transitions may have business logic restrictions
* Password changes may require additional verification

#### **Password Requirements**

* Minimum length (typically 8-12 characters)
* Requires uppercase and lowercase letters
* Requires numbers and/or special characters
* Cannot contain username or common patterns

#### **Best Practices**

* Use partial updates to avoid overwriting unchanged fields
* Validate status transitions according to business rules
* Consider user notification for password changes
* Use comments to document reasons for changes

**Common Use Cases**:

* User account moderation and approval
* Password reset operations
* User profile information updates
* Account status management (activation/deactivation)
* 2FA enrollment management

**Status Transition Rules**:

* Some status changes may require additional verification
* Certain statuses may be irreversible
* Business rules may restrict certain transitions

**Security Considerations**:

* Password changes should trigger session invalidation
* Status changes to `BANNED` or `REJECTED` may restrict access immediately
* 2FA enrollment may require user confirmation

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcyNjY1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.-SZ9Vc_BimN9juZElxhZeMQV5Hbb1WqUY2b8xwOSZLo
userId*: 158a190e-c4a9-4e6c-bf9b-4ef74ae345eb
```

```postman_json
{
  "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
  "password": "testpassword",
  "status": "NEW",
  "is2fa": false,
  "name": "111",
  "lastname": "222",
  "comment": "test"
}
```

Response sample

```postman_json
{
  "item": {
    "userId": "158a190e-c4a9-4e6c-bf9b-4ef74ae345eb",
    "username": "testeu@gmail.com",
    "status": "NEW",
    "is2fa": false,
    "createAt": "2025-01-28T12:53:10Z",
    "updateAt": "2025-10-27T13:39:33Z",
    "name": "111",
    "comment": "test"
  }
}
```


# Get user

Retrieves comprehensive details for a specific user account. This endpoint returns complete user information including profile data, security settings, MFA requirements, and associated client relation

**Endpoint**

`GET/v2/user/{uuid}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_Get>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `GET`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user/{uuid}`

#### **Path Parameters**

| Parameter  | Type     | Description                                    | Required | Example          |
| ---------- | -------- | ---------------------------------------------- | -------- | ---------------- |
| **`uuid`** | `string` | **Unique identifier of the user to retrieve**. | Yes      | `user_abc123def` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a complete user object with all associated data and metadata.

#### **Response Fields**

**User Object (`item`)**

| Field           | Type      | Description                     | Example                |
| --------------- | --------- | ------------------------------- | ---------------------- |
| **`id`**        | `integer` | **Internal numeric user ID**.   | `12345`                |
| **`uuid`**      | `string`  | **Unique user identifier**.     | `user_abc123def`       |
| **`username`**  | `string`  | **User's login name**.          | `john.smith`           |
| **`status`**    | `string`  | **Current user status**.        | `ACCEPT`               |
| **`is2fa`**     | `boolean` | **2FA enabled status**.         | `true`                 |
| **`isDeleted`** | `boolean` | **Soft delete status**.         | `false`                |
| **`puid`**      | `string`  | **Public user identifier**.     | `pub_789xyz`           |
| **`createAt`**  | `string`  | **Account creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updateAt`**  | `string`  | **Last update timestamp**.      | `2024-03-20T14:22:00Z` |
| **`name`**      | `string`  | **User's first name**.          | `John`                 |
| **`lastname`**  | `string`  | **User's last name**.           | `Smith`                |
| **`comment`**   | `string`  | **Administrative comments**.    | `VIP customer`         |

**Status Values**

* `NEW` - Registered user
* `READY_FOR_MODERATION` - Ready for review
* `MODERATED` - Under moderation
* `VERIFY` - Verification in progress
* `ACCEPT` - Approved user
* `REJECT` - Rejected user
* `BANNED` - Banned user

**Parameters Object (`parameters`)**

| Field            | Type      | Description                               | Example                |
| ---------------- | --------- | ----------------------------------------- | ---------------------- |
| **`mfa`**        | `object`  | **Multi-factor authentication settings**. |                        |
| → `requireOtp`   | `boolean` | **OTP requirement**.                      | `true`                 |
| → `requirePass`  | `boolean` | **Password requirement**.                 | `true`                 |
| → `requireEmail` | `boolean` | **Email verification**.                   | `false`                |
| → `requireSms`   | `boolean` | **SMS verification**.                     | `true`                 |
| **`profile`**    | `object`  | **User profile information**.             |                        |
| → `phone`        | `string`  | **Phone number**.                         | `+1234567890`          |
| → `email`        | `string`  | **Email address**.                        | `john@example.com`     |
| → `dob`          | `string`  | **Date of birth**.                        | `1985-06-15T00:00:00Z` |
| → `country`      | `string`  | **Country**.                              | `United States`        |
| → `city`         | `string`  | **City**.                                 | `New York`             |
| → `postcode`     | `string`  | **Postal code**.                          | `10001`                |

**Clients Array (`clients[]`)**

| Field            | Type      | Description                 | Example       |
| ---------------- | --------- | --------------------------- | ------------- |
| **`customerId`** | `string`  | **Associated customer ID**. | `cust_789xyz` |
| **`isOwner`**    | `boolean` | **Ownership status**.       | `true`        |

**Example Response:**

```json
{
  "item": {
    "id": 12345,
    "uuid": "user_abc123def",
    "username": "john.smith",
    "status": "ACCEPT",
    "is2fa": true,
    "isDeleted": false,
    "puid": "pub_789xyz",
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-03-20T14:22:00Z",
    "name": "John",
    "lastname": "Smith",
    "comment": "VIP customer",
    "parameters": {
      "mfa": {
        "requireOtp": true,
        "requirePass": true,
        "requireEmail": false,
        "requireSms": true
      },
      "profile": {
        "phone": "+1234567890",
        "email": "john@example.com",
        "dob": "1985-06-15T00:00:00Z",
        "country": "United States",
        "city": "New York",
        "postcode": "10001"
      }
    },
    "clients": [
      {
        "customerId": "cust_789xyz",
        "isOwner": true
      },
      {
        "customerId": "cust_456abc",
        "isOwner": false
      }
    ]
  }
}
```

***

### **Examples**

#### **Basic User Retrieval (cURL)**

```bash
curl --request GET \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_abc123def \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **User Not Found**:

   ```json
   { "error": "User not found: user_invalid_id" }
   ```
2. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
3. **Access Denied**:

   ```json
   { "error": "Access denied to user data" }
   ```

***

### **Notes**

#### **Data Sensitivity**

* Returns comprehensive PII (Personally Identifiable Information)
* Access should be restricted to authorized personnel only
* Some fields may be masked or omitted based on permissions

#### **Field Explanations**

* **`isDeleted`**: Indicates if user is soft-deleted (may still be recoverable)
* **`puid`**: Public-facing user ID for external references
* **`clients`**: Array of customer relationships and ownership status
* **`parameters.mfa`**: Security requirements for user authentication

#### **Best Practices**

* Use this endpoint for user administration and support purposes
* Handle PII data according to privacy regulations (GDPR, CCPA)
* Cache responses appropriately to reduce API calls
* Validate user permissions before displaying sensitive information

**Common Use Cases**:

* User profile management interfaces
* Customer support user lookup
* Account verification processes
* Security and compliance auditing
* User relationship management

**Data Protection**:

* Sensitive fields like email and phone may require additional permissions
* Consider masking certain data in user interfaces
* Ensure secure transmission and storage of PII

Request sample

```
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcyNjY1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.-SZ9Vc_BimN9juZElxhZeMQV5Hbb1WqUY2b8xwOSZLo
userId*: 158a190e-c4a9-4e6c-bf9b-4ef74ae345eb
```

Response sample

200 OK

```postman_json
{
  "item": {
    "id": 185,
    "userId": "158a190e-c4a9-4e6c-bf9b-4ef74ae345eb",
    "username": "testeu@gmail.com",
    "status": "NEW",
    "is2fa": false,
    "isDeleted": false,
    "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "createAt": "2025-01-28T12:53:10Z",
    "updateAt": "2025-10-27T13:39:33Z",
    "name": "111",
    "lastname": "222",
    "comment": "test",
    "parameters": {
      "mfa": {
        "requireOtp": false,
        "requirePass": false,
        "requireEmail": false,
        "requireSms": false
      },
      "profile": {
        "phone": "",
        "email": "",
        "dob": "1970-01-01T00:00:00Z",
        "country": "",
        "city": "",
        "postcode": ""
      }
    },
    "customers": [
      {
        "customerId": "Dnewcvn-euuI-vG0FZCRDjLXS",
        "isOwner": true
      }
    ]
  }
}
```


# Bind client

Establishes or updates a relationship between a user and a client/customer account. This endpoint links a user to a specific customer, defining their access level and permissions within that client ac

**Endpoint**

`PUT/v2/user/{uuid}/relate-client`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_AddRelationClient>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `PUT`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user/{uuid}/relate-client`

#### **Path Parameters**

| Parameter  | Type     | Description                        | Required | Example          |
| ---------- | -------- | ---------------------------------- | -------- | ---------------- |
| **`uuid`** | `string` | **Unique identifier of the user**. | Yes      | `user_abc123def` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |
| `Content-Type`  | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field           | Type      | Description                                                                    | Required | Example       |
| --------------- | --------- | ------------------------------------------------------------------------------ | -------- | ------------- |
| **`relation`**  | `object`  | **Client relationship object**.                                                | Yes      |               |
| → **`cuid`**    | `string`  | **Customer/client identifier**.                                                | Yes      | `cust_789xyz` |
| → **`isOwner`** | `boolean` | **Ownership permission**. `true` = full admin access, `false` = standard user. | Yes      | `true`        |

**Example Request Body:**

```json
{
  "relation": {
    "cuid": "cust_789xyz",
    "isOwner": true
  }
}
```

***

### **Response (200 OK)**

Returns the updated user object confirming the operation was successful.

#### **Response Fields**

**User Object (`item`)**

| Field          | Type      | Description                     | Example                |
| -------------- | --------- | ------------------------------- | ---------------------- |
| **`uuid`**     | `string`  | **Unique user identifier**.     | `user_abc123def`       |
| **`username`** | `string`  | **User's login name**.          | `john.smith`           |
| **`status`**   | `string`  | **Current user status**.        | `ACCEPT`               |
| **`is2fa`**    | `boolean` | **2FA enabled status**.         | `true`                 |
| **`createAt`** | `string`  | **Account creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updateAt`** | `string`  | **Last update timestamp**.      | `2024-03-20T14:22:00Z` |
| **`name`**     | `string`  | **User's full name**.           | `John Smith`           |
| **`comment`**  | `string`  | **Administrative comments**.    | `VIP customer`         |

**Example Response:**

```json
{
  "item": {
    "uuid": "user_abc123def",
    "username": "john.smith",
    "status": "ACCEPT",
    "is2fa": true,
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-03-20T14:22:00Z",
    "name": "John Smith",
    "comment": "VIP customer"
  }
}
```

> **Note:** The response shows basic user details. To verify the client relationship was successfully added, use the **Get User** endpoint which will include the `clients` array with all relationships.

***

### **Examples**

#### **Grant Owner Access to Client (cURL)**

```bash
curl --request PUT \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_abc123def/relate-client \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "relation": {
      "cuid": "cust_789xyz",
      "isOwner": true
    }
  }'
```

#### **Grant Standard User Access**

```bash
curl --request PUT \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_456ghi/relate-client \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA' \
  --header 'Content-Type: application/json' \
  --data '{
    "relation": {
      "cuid": "cust_123abc",
      "isOwner": false
    }
  }'
```

***

### **Error Responses**

1. **User Not Found**:

   ```json
   { "error": "User not found: user_invalid_id" }
   ```
2. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_invalid_id" }
   ```
3. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
4. **Relationship Already Exists**:

   ```json
   { "error": "User already related to this customer" }
   ```

***

### **Notes**

#### **Permission Levels**

* **`isOwner: true`**: User has full administrative rights over the customer account
* **`isOwner: false`**: User has standard access with limited permissions

#### **Key Features**

* **Idempotent**: Calling multiple times with same parameters has the same effect
* **Overwrites**: Updates existing relationships if already present
* **Multiple Relationships**: Users can be linked to multiple customers

#### **Best Practices**

* Verify both user and customer exist before creating relationship
* Use **Get User** endpoint to confirm relationship was established
* Consider user's role and responsibilities when setting ownership
* Document relationship purposes in user comments if needed

**Common Use Cases**:

* Onboarding new users to customer accounts
* Promoting users to administrator roles
* Managing access across multiple client accounts
* Temporary access grants for support purposes

**Ownership Implications**:

* Owners can typically manage other users on the account
* Owners may have billing and configuration privileges
* Ownership often includes audit and reporting access

**Verification**:\
After binding a client, use the **Get User** endpoint to confirm the relationship:

```bash
curl --request GET \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_abc123def \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

Look for the `clients` array in the response:

```json
"clients": [
  {
    "customerId": "cust_789xyz",
    "isOwner": true
  }
]
```

***

Request sample

```
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcyNjY1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.-SZ9Vc_BimN9juZElxhZeMQV5Hbb1WqUY2b8xwOSZLo
userId*: 158a190e-c4a9-4e6c-bf9b-4ef74ae345eb
```

```postman_json
{
  "customerId": "DoxdEEV-4IJq-zKeUYqrtqVDK",
  "isOwner": true
}
```

Response sample

```postman_json
{
  "item": {
    "userId": "5ff73da8-224e-44de-a235-2d7a76c3144c",
    "username": "test@delos.financial",
    "status": "ACCEPT",
    "is2fa": false,
    "createAt": "2024-12-12T15:47:23Z",
    "updateAt": "2025-09-01T06:56:28Z",
    "name": "Test",
    "comment": ""
  }
}
```


# Remove bind client

Removes a relationship between a user and a client/customer account. This endpoint disassociates a user from a specific customer, revoking their access and permissions for that client account.

**Endpoint**

`DELETE/v2/user/{uuid}/relate-client/{relation.cuid}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Users_RemoveRelationClient>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **HTTP Method & URL**

* **Method:** `DELETE`
* **URL:** `https://stagep.tst-apidmndelss.com/v2/user/{uuid}/relate-client/{relation.cuid}`

#### **Path Parameters**

| Parameter           | Type     | Description                               | Required | Example          |
| ------------------- | -------- | ----------------------------------------- | -------- | ---------------- |
| **`uuid`**          | `string` | **Unique identifier of the user**.        | Yes      | `user_abc123def` |
| **`relation.cuid`** | `string` | **Customer/client identifier to remove**. | Yes      | `cust_789xyz`    |

#### **Query Parameters**

| Parameter              | Type      | Description                                     | Required | Example |
| ---------------------- | --------- | ----------------------------------------------- | -------- | ------- |
| **`relation.isOwner`** | `boolean` | **Specify ownership type** for precise removal. | No       | `true`  |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the updated user object confirming the client relationship was successfully removed.

#### **Response Fields**

**User Object (`item`)**

| Field          | Type      | Description                     | Example                |
| -------------- | --------- | ------------------------------- | ---------------------- |
| **`uuid`**     | `string`  | **Unique user identifier**.     | `user_abc123def`       |
| **`username`** | `string`  | **User's login name**.          | `john.smith`           |
| **`status`**   | `string`  | **Current user status**.        | `ACCEPT`               |
| **`is2fa`**    | `boolean` | **2FA enabled status**.         | `true`                 |
| **`createAt`** | `string`  | **Account creation timestamp**. | `2024-01-15T10:30:00Z` |
| **`updateAt`** | `string`  | **Last update timestamp**.      | `2024-03-20T14:22:00Z` |
| **`name`**     | `string`  | **User's full name**.           | `John Smith`           |
| **`comment`**  | `string`  | **Administrative comments**.    | `VIP customer`         |

**Example Response:**

```json
{
  "item": {
    "uuid": "user_abc123def",
    "username": "john.smith",
    "status": "ACCEPT",
    "is2fa": true,
    "createAt": "2024-01-15T10:30:00Z",
    "updateAt": "2024-03-20T14:22:00Z",
    "name": "John Smith",
    "comment": "VIP customer"
  }
}
```

> **Note:** The response shows basic user details. To verify the client relationship was successfully removed, use the **Get User** endpoint which will show the updated `clients` array.

***

### **Examples**

#### **Remove Client Relationship (cURL)**

```bash
curl --request DELETE \
  --url 'https://stagep.tst-apidmndelss.com/v2/user/user_abc123def/relate-client/cust_789xyz' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

#### **Remove Specific Ownership Type**

```bash
curl --request DELETE \
  --url 'https://stagep.tst-apidmndelss.com/v2/user/user_456ghi/relate-client/cust_123abc?relation.isOwner=true' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

***

### **Error Responses**

1. **User Not Found**:

   ```json
   { "error": "User not found: user_invalid_id" }
   ```
2. **Customer Not Found**:

   ```json
   { "error": "Customer not found: cust_invalid_id" }
   ```
3. **Relationship Not Found**:

   ```json
   { "error": "No relationship found between user and customer" }
   ```
4. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```
5. **Ownership Mismatch**:

   ```json
   { "error": "No relationship found with specified ownership type" }
   ```

***

### **Notes**

#### **Query Parameter Usage**

* **`relation.isOwner`**: Optional parameter to specify which ownership type to remove
* If omitted, removes all relationships between the user and customer
* If specified, only removes relationships matching the ownership type

#### **Behavior**

* Removes the specified client relationship completely
* User loses all access and permissions for that customer account
* Operation is irreversible - relationship must be recreated if needed

#### **Best Practices**

* Verify the relationship exists before attempting removal
* Use **Get User** endpoint to confirm successful removal
* Consider user impact before removing client access
* Document removal reasons in user comments if needed

**Common Use Cases**:

* Offboarding users from customer accounts
* Revoking administrative privileges
* Cleaning up temporary access grants
* Removing users from deprecated client accounts

**Verification**:\
After removing a client relationship, use the **Get User** endpoint to confirm:

```bash
curl --request GET \
  --url https://stagep.tst-apidmndelss.com/v2/user/user_abc123def \
  --header 'Authorization: Bearer eyJhbGci...wNLGA'
```

Check that the removed customer no longer appears in the `clients` array.

**Security Considerations**:

* Removing owner relationships may affect account management
* Ensure alternative administrators exist before removing owners
* Consider user notifications for access revocation
* Audit trail should record relationship removals

Real request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTczMTA0LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.oSBPLvobjQwI5LwfFtWnmUdbnPedujraitSDnW8m3zw
customerId*: DoxdEEV-4IJq-zKeUYqrtqVDK
userId*: 158a190e-c4a9-4e6c-bf9b-4ef74ae345eb
isOwner: True

```

Real response sample

```postman_json
{
  "item": {
    "userId": "5ff73da8-224e-44de-a235-2d7a76c3144c",
    "username": "test@delos.financial",
    "status": "ACCEPT",
    "is2fa": false,
    "createAt": "2024-12-12T15:47:23Z",
    "updateAt": "2025-09-01T06:56:28Z",
    "name": "Test",
    "comment": ""
  }
}
```


# Country List

**Endpoint**

`GET/v2/geo/country/get`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Geo_List>" %}

Retrieves a comprehensive list of countries with their ISO codes and full names. Useful for dropdown menus and country selection in forms.

***

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns an array of country objects with ISO codes and names.

#### **Response Fields**

**Country Object**

| Field      | Type     | Description                                      | Example           |
| ---------- | -------- | ------------------------------------------------ | ----------------- |
| **`iso`**  | `string` | **ISO 3166-1 alpha-2 country code** (2 letters). | `"US"`            |
| **`name`** | `string` | **Full country name**.                           | `"United States"` |

**Example Response:**

json

```
{
  "items": [
    {
      "iso": "US",
      "name": "United States"
    },
    {
      "iso": "DE",
      "name": "Germany"
    },
    {
      "iso": "JP",
      "name": "Japan"
    },
    {
      "iso": "GB",
      "name": "United Kingdom"
    },
    {
      "iso": "FR",
      "name": "France"
    }
  ]
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/geo/country/get' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Full Response Example**

json

```
{
  "items": [
    {
      "iso": "US",
      "name": "United States of America"
    },
    {
      "iso": "CA",
      "name": "Canada"
    },
    {
      "iso": "MX",
      "name": "Mexico"
    },
    {
      "iso": "GB",
      "name": "United Kingdom"
    },
    {
      "iso": "DE",
      "name": "Germany"
    },
    {
      "iso": "FR",
      "name": "France"
    },
    {
      "iso": "JP",
      "name": "Japan"
    },
    {
      "iso": "AU",
      "name": "Australia"
    },
    {
      "iso": "BR",
      "name": "Brazil"
    },
    {
      "iso": "CN",
      "name": "China"
    }
  ]
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   {
     "error": "Unauthorized"
   }
   ```

***

### **Notes**

* **ISO Standard**: Uses ISO 3166-1 alpha-2 codes (2-letter codes).
* **Sorting**: Countries are typically sorted alphabetically by name.
* **Localization**: Country names are returned in English by default.
* **Completeness**: Includes all internationally recognized countries.

**Common Use Cases**:

* User registration forms
* Address information
* Compliance and regulatory requirements
* Geographic filtering

Real request Example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM1NDc3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.MUswMzol65hRik9iTEahOd6CI0Od6SatYmIhH_mmFCA
```

Real response example

200 OK

```postman_json
{
  "items": [
    {
      "iso": "AD",
      "name": "Andorra",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AE",
      "name": "United Arab Emirates",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AG",
      "name": "Antigua and Barbuda",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AI",
      "name": "Anguilla",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AM",
      "name": "Armenia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AQ",
      "name": "Antarctica",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AR",
      "name": "Argentina",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AS",
      "name": "American Samoa",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AT",
      "name": "Austria",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AU",
      "name": "Australia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AW",
      "name": "Aruba",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AX",
      "name": "Aland Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "AZ",
      "name": "Azerbaijan",
      "states": [
        {
          "id": 1,
          "countryIso": "AZ",
          "code": "KALBAJAR",
          "name": "Kalbajar",
          "isEnabled": true
        },
        {
          "id": 2,
          "countryIso": "AZ",
          "code": "SHUSHA",
          "name": "Shusha",
          "isEnabled": true
        },
        {
          "id": 3,
          "countryIso": "AZ",
          "code": "TARTAR",
          "name": "Tartar",
          "isEnabled": true
        },
        {
          "id": 4,
          "countryIso": "AZ",
          "code": "KHOJALY",
          "name": "Khojaly",
          "isEnabled": true
        },
        {
          "id": 5,
          "countryIso": "AZ",
          "code": "KHOJAVEND",
          "name": "Khojavend",
          "isEnabled": true
        },
        {
          "id": 6,
          "countryIso": "AZ",
          "code": "ABSHERON",
          "name": "Absheron",
          "isEnabled": true
        },
        {
          "id": 7,
          "countryIso": "AZ",
          "code": "AGHJABADI",
          "name": "Aghjabadi",
          "isEnabled": true
        },
        {
          "id": 8,
          "countryIso": "AZ",
          "code": "AGHDAM",
          "name": "Aghdam",
          "isEnabled": true
        },
        {
          "id": 9,
          "countryIso": "AZ",
          "code": "AGDASH",
          "name": "Agdash",
          "isEnabled": true
        },
        {
          "id": 10,
          "countryIso": "AZ",
          "code": "AGHSTAFA",
          "name": "Aghstafa",
          "isEnabled": true
        },
        {
          "id": 11,
          "countryIso": "AZ",
          "code": "AGSU",
          "name": "Agsu",
          "isEnabled": true
        },
        {
          "id": 12,
          "countryIso": "AZ",
          "code": "SIRVAN",
          "name": "Sirvan",
          "isEnabled": true
        },
        {
          "id": 13,
          "countryIso": "AZ",
          "code": "ASTARA",
          "name": "Astara",
          "isEnabled": true
        },
        {
          "id": 14,
          "countryIso": "AZ",
          "code": "BAKU",
          "name": "Baku",
          "isEnabled": true
        },
        {
          "id": 15,
          "countryIso": "AZ",
          "code": "BALAKAN",
          "name": "Balakan",
          "isEnabled": true
        },
        {
          "id": 16,
          "countryIso": "AZ",
          "code": "BARDA",
          "name": "Barda",
          "isEnabled": true
        },
        {
          "id": 17,
          "countryIso": "AZ",
          "code": "BEYLAGAN",
          "name": "Beylagan",
          "isEnabled": true
        },
        {
          "id": 18,
          "countryIso": "AZ",
          "code": "BILASUVAR",
          "name": "Bilasuvar",
          "isEnabled": true
        },
        {
          "id": 19,
          "countryIso": "AZ",
          "code": "JABRAYIL",
          "name": "Jabrayil",
          "isEnabled": true
        },
        {
          "id": 20,
          "countryIso": "AZ",
          "code": "JALILABAD",
          "name": "Jalilabad",
          "isEnabled": true
        },
        {
          "id": 21,
          "countryIso": "AZ",
          "code": "DASHKASAN",
          "name": "Dashkasan",
          "isEnabled": true
        },
        {
          "id": 22,
          "countryIso": "AZ",
          "code": "SHABRAN",
          "name": "Shabran",
          "isEnabled": true
        },
        {
          "id": 23,
          "countryIso": "AZ",
          "code": "FUZULI",
          "name": "Fuzuli",
          "isEnabled": true
        },
        {
          "id": 24,
          "countryIso": "AZ",
          "code": "GADABAY",
          "name": "Gadabay",
          "isEnabled": true
        },
        {
          "id": 25,
          "countryIso": "AZ",
          "code": "GANJA",
          "name": "Ganja",
          "isEnabled": true
        },
        {
          "id": 26,
          "countryIso": "AZ",
          "code": "GORANBOY",
          "name": "Goranboy",
          "isEnabled": true
        },
        {
          "id": 27,
          "countryIso": "AZ",
          "code": "GOYCHAY",
          "name": "Goychay",
          "isEnabled": true
        },
        {
          "id": 28,
          "countryIso": "AZ",
          "code": "HAJIGABUL",
          "name": "Hajigabul",
          "isEnabled": true
        },
        {
          "id": 29,
          "countryIso": "AZ",
          "code": "IMISHLI",
          "name": "Imishli",
          "isEnabled": true
        },
        {
          "id": 30,
          "countryIso": "AZ",
          "code": "ISMAYILLI",
          "name": "Ismayilli",
          "isEnabled": true
        },
        {
          "id": 31,
          "countryIso": "AZ",
          "code": "KURDAMIR",
          "name": "Kurdamir",
          "isEnabled": true
        },
        {
          "id": 32,
          "countryIso": "AZ",
          "code": "LACHIN",
          "name": "Lachin",
          "isEnabled": true
        },
        {
          "id": 33,
          "countryIso": "AZ",
          "code": "LANKARAN",
          "name": "Lankaran",
          "isEnabled": true
        },
        {
          "id": 34,
          "countryIso": "AZ",
          "code": "LERIK",
          "name": "Lerik",
          "isEnabled": true
        },
        {
          "id": 35,
          "countryIso": "AZ",
          "code": "MASALLY",
          "name": "Masally",
          "isEnabled": true
        },
        {
          "id": 36,
          "countryIso": "AZ",
          "code": "MINGACHEVIR",
          "name": "Mingachevir",
          "isEnabled": true
        },
        {
          "id": 37,
          "countryIso": "AZ",
          "code": "NAFTALAN",
          "name": "Naftalan",
          "isEnabled": true
        },
        {
          "id": 38,
          "countryIso": "AZ",
          "code": "NEFTCHALA",
          "name": "Neftchala",
          "isEnabled": true
        },
        {
          "id": 39,
          "countryIso": "AZ",
          "code": "OGHUZ",
          "name": "Oghuz",
          "isEnabled": true
        },
        {
          "id": 40,
          "countryIso": "AZ",
          "code": "QABALA",
          "name": "Qabala",
          "isEnabled": true
        },
        {
          "id": 41,
          "countryIso": "AZ",
          "code": "QAKH",
          "name": "Qakh",
          "isEnabled": true
        },
        {
          "id": 42,
          "countryIso": "AZ",
          "code": "QAZAX",
          "name": "Qazax",
          "isEnabled": true
        },
        {
          "id": 43,
          "countryIso": "AZ",
          "code": "GOBUSTAN",
          "name": "Gobustan",
          "isEnabled": true
        },
        {
          "id": 44,
          "countryIso": "AZ",
          "code": "QUBA",
          "name": "Quba",
          "isEnabled": true
        },
        {
          "id": 45,
          "countryIso": "AZ",
          "code": "QUBADLI",
          "name": "Qubadli",
          "isEnabled": true
        },
        {
          "id": 46,
          "countryIso": "AZ",
          "code": "QUSAR",
          "name": "Qusar",
          "isEnabled": true
        },
        {
          "id": 47,
          "countryIso": "AZ",
          "code": "SAATLY",
          "name": "Saatly",
          "isEnabled": true
        },
        {
          "id": 48,
          "countryIso": "AZ",
          "code": "SABIRABAD",
          "name": "Sabirabad",
          "isEnabled": true
        },
        {
          "id": 49,
          "countryIso": "AZ",
          "code": "SHAKI",
          "name": "Shaki",
          "isEnabled": true
        },
        {
          "id": 50,
          "countryIso": "AZ",
          "code": "SALYAN",
          "name": "Salyan",
          "isEnabled": true
        },
        {
          "id": 51,
          "countryIso": "AZ",
          "code": "SHAMAKHI",
          "name": "Shamakhi",
          "isEnabled": true
        },
        {
          "id": 52,
          "countryIso": "AZ",
          "code": "SHAMKIR",
          "name": "Shamkir",
          "isEnabled": true
        },
        {
          "id": 53,
          "countryIso": "AZ",
          "code": "SAMUKH",
          "name": "Samukh",
          "isEnabled": true
        },
        {
          "id": 54,
          "countryIso": "AZ",
          "code": "SIYAZAN",
          "name": "Siyazan",
          "isEnabled": true
        },
        {
          "id": 55,
          "countryIso": "AZ",
          "code": "SUMGAIT",
          "name": "Sumgait",
          "isEnabled": true
        },
        {
          "id": 56,
          "countryIso": "AZ",
          "code": "TOVUZ",
          "name": "Tovuz",
          "isEnabled": true
        },
        {
          "id": 57,
          "countryIso": "AZ",
          "code": "UJAR",
          "name": "Ujar",
          "isEnabled": true
        },
        {
          "id": 58,
          "countryIso": "AZ",
          "code": "KHACHMAZ",
          "name": "Khachmaz",
          "isEnabled": true
        },
        {
          "id": 59,
          "countryIso": "AZ",
          "code": "KHANKENDI",
          "name": "Khankendi",
          "isEnabled": true
        },
        {
          "id": 60,
          "countryIso": "AZ",
          "code": "GOYGOL",
          "name": "Goygol",
          "isEnabled": true
        },
        {
          "id": 61,
          "countryIso": "AZ",
          "code": "KHIZI",
          "name": "Khizi",
          "isEnabled": true
        },
        {
          "id": 62,
          "countryIso": "AZ",
          "code": "YARDIMLI",
          "name": "Yardimli",
          "isEnabled": true
        },
        {
          "id": 63,
          "countryIso": "AZ",
          "code": "YEVLAKH",
          "name": "Yevlakh",
          "isEnabled": true
        },
        {
          "id": 64,
          "countryIso": "AZ",
          "code": "ZANGILAN",
          "name": "Zangilan",
          "isEnabled": true
        },
        {
          "id": 65,
          "countryIso": "AZ",
          "code": "ZAGATALA",
          "name": "Zagatala",
          "isEnabled": true
        },
        {
          "id": 66,
          "countryIso": "AZ",
          "code": "ZARDAB",
          "name": "Zardab",
          "isEnabled": true
        }
      ],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BB",
      "name": "Barbados",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BD",
      "name": "Bangladesh",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BE",
      "name": "Belgium",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BF",
      "name": "Burkina Faso",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BG",
      "name": "Bulgaria",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BH",
      "name": "Bahrain",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BJ",
      "name": "Benin",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BL",
      "name": "Saint-Barthelemy",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BM",
      "name": "Bermuda",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BN",
      "name": "Brunei",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BO",
      "name": "Bolivia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BQ",
      "name": "Bonaire, Saint Eustatius and Saba",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BR",
      "name": "Brazil",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BS",
      "name": "Bahamas",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BT",
      "name": "Bhutan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BW",
      "name": "Botswana",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "BZ",
      "name": "Belize",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CA",
      "name": "Canada",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CC",
      "name": "Cocos (Keeling) Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CG",
      "name": "Congo",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CH",
      "name": "Switzerland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CI",
      "name": "Cote d'Ivoire",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CK",
      "name": "Cook Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CL",
      "name": "Chile",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CM",
      "name": "Cameroon",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CN",
      "name": "China",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CR",
      "name": "Costa Rica",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CV",
      "name": "Cabo Verde",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CW",
      "name": "Curacao",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CX",
      "name": "Christmas Island",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CY",
      "name": "Cyprus",
      "states": [
        {
          "id": 117,
          "countryIso": "CY",
          "code": "LEFKOSA",
          "name": "Lefkosa",
          "isEnabled": true
        },
        {
          "id": 118,
          "countryIso": "CY",
          "code": "GAZIMAGUSA",
          "name": "Gazimagusa",
          "isEnabled": true
        },
        {
          "id": 119,
          "countryIso": "CY",
          "code": "GIRNE",
          "name": "Girne",
          "isEnabled": true
        },
        {
          "id": 120,
          "countryIso": "CY",
          "code": "GUZELYURT",
          "name": "Guzelyurt",
          "isEnabled": true
        },
        {
          "id": 121,
          "countryIso": "CY",
          "code": "ISKELE",
          "name": "Iskele",
          "isEnabled": true
        },
        {
          "id": 122,
          "countryIso": "CY",
          "code": "LEFKE",
          "name": "Lefke",
          "isEnabled": true
        },
        {
          "id": 123,
          "countryIso": "CY",
          "code": "FAMAGUSTA",
          "name": "Famagusta",
          "isEnabled": true
        },
        {
          "id": 124,
          "countryIso": "CY",
          "code": "KYRENIA",
          "name": "Kyrenia",
          "isEnabled": true
        },
        {
          "id": 125,
          "countryIso": "CY",
          "code": "LARNACA",
          "name": "Larnaca",
          "isEnabled": true
        },
        {
          "id": 126,
          "countryIso": "CY",
          "code": "LIMASSOL",
          "name": "Limassol",
          "isEnabled": true
        },
        {
          "id": 127,
          "countryIso": "CY",
          "code": "NICOSIA",
          "name": "Nicosia",
          "isEnabled": true
        },
        {
          "id": 128,
          "countryIso": "CY",
          "code": "PAPHOS",
          "name": "Paphos",
          "isEnabled": true
        }
      ],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "CZ",
      "name": "Czech Republic",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DE",
      "name": "Germany",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DJ",
      "name": "Djibouti",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DK",
      "name": "Denmark",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DM",
      "name": "Dominica",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DO",
      "name": "Dominican Republic",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "DZ",
      "name": "Algeria",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "EC",
      "name": "Ecuador",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "EE",
      "name": "Estonia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "EG",
      "name": "Egypt",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ES",
      "name": "Spain",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FI",
      "name": "Finland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FJ",
      "name": "Fiji",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FK",
      "name": "Falkland Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FM",
      "name": "Federated States of Micronesia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FO",
      "name": "Faroe Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "FR",
      "name": "France",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GA",
      "name": "Gabon",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GB",
      "name": "United Kingdom",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GD",
      "name": "Grenada",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GE",
      "name": "Georgia",
      "states": [
        {
          "id": 129,
          "countryIso": "GE",
          "code": "TBILISI",
          "name": "Tbilisi",
          "isEnabled": true
        },
        {
          "id": 130,
          "countryIso": "GE",
          "code": "IMERETI",
          "name": "Imereti",
          "isEnabled": true
        },
        {
          "id": 131,
          "countryIso": "GE",
          "code": "AJARIA",
          "name": "Ajaria",
          "isEnabled": true
        },
        {
          "id": 132,
          "countryIso": "GE",
          "code": "KVEMO_KARTLI",
          "name": "Kvemo Kartli",
          "isEnabled": true
        },
        {
          "id": 133,
          "countryIso": "GE",
          "code": "SAMEGRELO_ZEMO_SVANETI",
          "name": "Samegrelo and Zemo Svaneti",
          "isEnabled": true
        },
        {
          "id": 134,
          "countryIso": "GE",
          "code": "KAKHETI",
          "name": "Kakheti",
          "isEnabled": true
        },
        {
          "id": 135,
          "countryIso": "GE",
          "code": "SHIDA_KARTLI",
          "name": "Shida Kartli",
          "isEnabled": true
        },
        {
          "id": 136,
          "countryIso": "GE",
          "code": "ABKHAZIA",
          "name": "Abkhazia",
          "isEnabled": true
        },
        {
          "id": 137,
          "countryIso": "GE",
          "code": "SAMTSKHE_JAVAKHETI",
          "name": "Samtskhe-Javakheti",
          "isEnabled": true
        },
        {
          "id": 138,
          "countryIso": "GE",
          "code": "GURIA",
          "name": "Guria",
          "isEnabled": true
        },
        {
          "id": 139,
          "countryIso": "GE",
          "code": "MTSKHETA_MTIANETI",
          "name": "Mtskheta-Mtianeti",
          "isEnabled": true
        },
        {
          "id": 140,
          "countryIso": "GE",
          "code": "RACHA_LECHKHUMI_KVEMO_SVANETI",
          "name": "Racha-Lechkhumi and Kvemo Svaneti",
          "isEnabled": true
        }
      ],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GF",
      "name": "Guyane",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GG",
      "name": "Guernsey",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GH",
      "name": "Ghana",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GI",
      "name": "Gibraltar",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GL",
      "name": "Greenland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GM",
      "name": "Gambia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GP",
      "name": "Guadeloupe",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GQ",
      "name": "Equatorial Guinea",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GR",
      "name": "Greece",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GS",
      "name": "South Georgia and the South Sandwich Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GT",
      "name": "Guatemala",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GU",
      "name": "Guam",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "GY",
      "name": "Guyana",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "HK",
      "name": "Hong Kong",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "HN",
      "name": "Honduras",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "HR",
      "name": "Croatia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "HU",
      "name": "Hungary",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ID",
      "name": "Indonesia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IE",
      "name": "Ireland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IL",
      "name": "Israel",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IM",
      "name": "Isle of Man",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IN",
      "name": "India",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IO",
      "name": "British Indian Ocean Territory",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IS",
      "name": "Iceland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "IT",
      "name": "Italia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "JE",
      "name": "Jersey",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "JM",
      "name": "Jamaica",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "JO",
      "name": "Jordan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "JP",
      "name": "Japan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KE",
      "name": "Kenya",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KG",
      "name": "Kyrgyzstan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KH",
      "name": "Cambodia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KI",
      "name": "Kiribati",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KM",
      "name": "Comoros",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KN",
      "name": "Saint Kitts and Nevis",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KP",
      "name": "North Korea",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KR",
      "name": "South Korea",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KW",
      "name": "Kuwait",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KY",
      "name": "Cayman Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "KZ",
      "name": "Kazakhstan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LA",
      "name": "Laos",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LC",
      "name": "Saint Lucia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LI",
      "name": "Liechtenstein",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LK",
      "name": "Sri Lanka",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LS",
      "name": "Lesotho",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LT",
      "name": "Lithuania",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LU",
      "name": "Luxembourg",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "LV",
      "name": "Latvia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MA",
      "name": "Morocco",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MC",
      "name": "Monaco",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MD",
      "name": "Moldova",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ME",
      "name": "Montenegro",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MF",
      "name": "Saint-Martin",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MG",
      "name": "Madagascar",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MH",
      "name": "Marshall Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MN",
      "name": "Mongolia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MO",
      "name": "Macau",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MP",
      "name": "Northern Mariana Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MQ",
      "name": "Martinique",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MR",
      "name": "Mauritania",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MS",
      "name": "Montserrat",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MT",
      "name": "Malta",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MU",
      "name": "Mauritius",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MV",
      "name": "Maldives",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MW",
      "name": "Malawi",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MX",
      "name": "Mexico",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MY",
      "name": "Malaysia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "MZ",
      "name": "Mozambique",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NA",
      "name": "Namibia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NC",
      "name": "Nouvelle-Caledonie",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NE",
      "name": "Niger",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NF",
      "name": "Norfolk Island",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NG",
      "name": "Nigeria",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NI",
      "name": "Nicaragua",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NL",
      "name": "Netherlands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NO",
      "name": "Norway",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NP",
      "name": "Nepal",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NR",
      "name": "Nauru",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NU",
      "name": "Niue",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "NZ",
      "name": "New Zealand",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "OM",
      "name": "Oman",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PA",
      "name": "Panama",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PE",
      "name": "Peru",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PF",
      "name": "Polynesie Francaise",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PG",
      "name": "Papua New Guinea",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PH",
      "name": "Philippines",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PL",
      "name": "Poland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PM",
      "name": "Saint-Pierre et Miquelon",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PN",
      "name": "Pitcairn Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PR",
      "name": "Puerto Rico",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PS",
      "name": "Palestine",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PT",
      "name": "Portugal",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PW",
      "name": "Palau",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "PY",
      "name": "Paraguay",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "QA",
      "name": "Qatar",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "RE",
      "name": "Reunion",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "RO",
      "name": "Romania",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "RS",
      "name": "Serbia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "RW",
      "name": "Rwanda",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SA",
      "name": "Saudi Arabia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SB",
      "name": "Solomon Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SC",
      "name": "Seychelles",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SE",
      "name": "Sweden",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SG",
      "name": "Singapore",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SH",
      "name": "Ascension, and Tristan da Cunha Saint Helena",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SI",
      "name": "Slovenia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SJ",
      "name": "Svalbard and Jan Mayen",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SK",
      "name": "Slovakia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SL",
      "name": "Sierra Leone",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SM",
      "name": "San Marino",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SN",
      "name": "Senegal",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SR",
      "name": "Suriname",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ST",
      "name": "Sao Tome and Principe",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SV",
      "name": "El Salvador",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SX",
      "name": "Sint Maarten",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "SZ",
      "name": "Swaziland",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TC",
      "name": "Turks and Caicos Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TD",
      "name": "Chad",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TF",
      "name": "Territory of the French Southern and Antarctic Lands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TG",
      "name": "Togo",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TH",
      "name": "Thailand",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TJ",
      "name": "Tajikistan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TK",
      "name": "Tokelau",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TL",
      "name": "East Timor",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TM",
      "name": "Turkmenistan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TN",
      "name": "Tunisia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TO",
      "name": "Tonga",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TR",
      "name": "Turkey",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TT",
      "name": "Trinidad and Tobago",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TV",
      "name": "Tuvalu",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TW",
      "name": "Taiwan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "TZ",
      "name": "Tanzania",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "UG",
      "name": "Uganda",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "UM",
      "name": "United States Minor Outlying Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "US",
      "name": "United States",
      "states": [
        {
          "id": 67,
          "countryIso": "US",
          "code": "AL",
          "name": "Alabama",
          "isEnabled": true
        },
        {
          "id": 68,
          "countryIso": "US",
          "code": "AK",
          "name": "Alaska",
          "isEnabled": true
        },
        {
          "id": 69,
          "countryIso": "US",
          "code": "AZ",
          "name": "Arizona",
          "isEnabled": true
        },
        {
          "id": 70,
          "countryIso": "US",
          "code": "AR",
          "name": "Arkansas",
          "isEnabled": true
        },
        {
          "id": 71,
          "countryIso": "US",
          "code": "CA",
          "name": "California",
          "isEnabled": true
        },
        {
          "id": 72,
          "countryIso": "US",
          "code": "CO",
          "name": "Colorado",
          "isEnabled": true
        },
        {
          "id": 73,
          "countryIso": "US",
          "code": "CT",
          "name": "Connecticut",
          "isEnabled": true
        },
        {
          "id": 74,
          "countryIso": "US",
          "code": "DE",
          "name": "Delaware",
          "isEnabled": true
        },
        {
          "id": 75,
          "countryIso": "US",
          "code": "FL",
          "name": "Florida",
          "isEnabled": true
        },
        {
          "id": 76,
          "countryIso": "US",
          "code": "GA",
          "name": "Georgia",
          "isEnabled": true
        },
        {
          "id": 77,
          "countryIso": "US",
          "code": "HI",
          "name": "Hawaii",
          "isEnabled": true
        },
        {
          "id": 78,
          "countryIso": "US",
          "code": "ID",
          "name": "Idaho",
          "isEnabled": true
        },
        {
          "id": 79,
          "countryIso": "US",
          "code": "IL",
          "name": "Illinois",
          "isEnabled": true
        },
        {
          "id": 80,
          "countryIso": "US",
          "code": "IN",
          "name": "Indiana",
          "isEnabled": true
        },
        {
          "id": 81,
          "countryIso": "US",
          "code": "IA",
          "name": "Iowa",
          "isEnabled": true
        },
        {
          "id": 82,
          "countryIso": "US",
          "code": "KS",
          "name": "Kansas",
          "isEnabled": true
        },
        {
          "id": 83,
          "countryIso": "US",
          "code": "KY",
          "name": "Kentucky",
          "isEnabled": true
        },
        {
          "id": 84,
          "countryIso": "US",
          "code": "LA",
          "name": "Louisiana",
          "isEnabled": true
        },
        {
          "id": 85,
          "countryIso": "US",
          "code": "ME",
          "name": "Maine",
          "isEnabled": true
        },
        {
          "id": 86,
          "countryIso": "US",
          "code": "MD",
          "name": "Maryland",
          "isEnabled": true
        },
        {
          "id": 87,
          "countryIso": "US",
          "code": "MA",
          "name": "Massachusetts",
          "isEnabled": true
        },
        {
          "id": 88,
          "countryIso": "US",
          "code": "MI",
          "name": "Michigan",
          "isEnabled": true
        },
        {
          "id": 89,
          "countryIso": "US",
          "code": "MN",
          "name": "Minnesota",
          "isEnabled": true
        },
        {
          "id": 90,
          "countryIso": "US",
          "code": "MS",
          "name": "Mississippi",
          "isEnabled": true
        },
        {
          "id": 91,
          "countryIso": "US",
          "code": "MO",
          "name": "Missouri",
          "isEnabled": true
        },
        {
          "id": 92,
          "countryIso": "US",
          "code": "MT",
          "name": "Montana",
          "isEnabled": true
        },
        {
          "id": 93,
          "countryIso": "US",
          "code": "NE",
          "name": "Nebraska",
          "isEnabled": true
        },
        {
          "id": 94,
          "countryIso": "US",
          "code": "NV",
          "name": "Nevada",
          "isEnabled": true
        },
        {
          "id": 95,
          "countryIso": "US",
          "code": "NH",
          "name": "New Hampshire",
          "isEnabled": true
        },
        {
          "id": 96,
          "countryIso": "US",
          "code": "NJ",
          "name": "New Jersey",
          "isEnabled": true
        },
        {
          "id": 97,
          "countryIso": "US",
          "code": "NM",
          "name": "New Mexico",
          "isEnabled": true
        },
        {
          "id": 98,
          "countryIso": "US",
          "code": "NY",
          "name": "New York",
          "isEnabled": true
        },
        {
          "id": 99,
          "countryIso": "US",
          "code": "NC",
          "name": "North Carolina",
          "isEnabled": true
        },
        {
          "id": 100,
          "countryIso": "US",
          "code": "ND",
          "name": "North Dakota",
          "isEnabled": true
        },
        {
          "id": 101,
          "countryIso": "US",
          "code": "OH",
          "name": "Ohio",
          "isEnabled": true
        },
        {
          "id": 102,
          "countryIso": "US",
          "code": "OK",
          "name": "Oklahoma",
          "isEnabled": true
        },
        {
          "id": 103,
          "countryIso": "US",
          "code": "OR",
          "name": "Oregon",
          "isEnabled": true
        },
        {
          "id": 104,
          "countryIso": "US",
          "code": "PA",
          "name": "Pennsylvania",
          "isEnabled": true
        },
        {
          "id": 105,
          "countryIso": "US",
          "code": "RI",
          "name": "Rhode Island",
          "isEnabled": true
        },
        {
          "id": 106,
          "countryIso": "US",
          "code": "SC",
          "name": "South Carolina",
          "isEnabled": true
        },
        {
          "id": 107,
          "countryIso": "US",
          "code": "SD",
          "name": "South Dakota",
          "isEnabled": true
        },
        {
          "id": 108,
          "countryIso": "US",
          "code": "TN",
          "name": "Tennessee",
          "isEnabled": true
        },
        {
          "id": 109,
          "countryIso": "US",
          "code": "TX",
          "name": "Texas",
          "isEnabled": true
        },
        {
          "id": 110,
          "countryIso": "US",
          "code": "UT",
          "name": "Utah",
          "isEnabled": true
        },
        {
          "id": 111,
          "countryIso": "US",
          "code": "VT",
          "name": "Vermont",
          "isEnabled": true
        },
        {
          "id": 112,
          "countryIso": "US",
          "code": "VA",
          "name": "Virginia",
          "isEnabled": true
        },
        {
          "id": 113,
          "countryIso": "US",
          "code": "WA",
          "name": "Washington",
          "isEnabled": true
        },
        {
          "id": 114,
          "countryIso": "US",
          "code": "WV",
          "name": "West Virginia",
          "isEnabled": true
        },
        {
          "id": 115,
          "countryIso": "US",
          "code": "WI",
          "name": "Wisconsin",
          "isEnabled": true
        },
        {
          "id": 116,
          "countryIso": "US",
          "code": "WY",
          "name": "Wyoming",
          "isEnabled": true
        }
      ],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "UY",
      "name": "Uruguay",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "UZ",
      "name": "Uzbekistan",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VA",
      "name": "Vatican",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VC",
      "name": "Saint Vincent and the Grenadines",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VG",
      "name": "British Virgin Islands",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VI",
      "name": "Virgin Islands of the United States",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VN",
      "name": "Vietnam",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "VU",
      "name": "Vanuatu",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "WF",
      "name": "Wallis and Futuna",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "WS",
      "name": "Samoa",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "YT",
      "name": "Mayotte",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ZA",
      "name": "South Africa",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    },
    {
      "iso": "ZM",
      "name": "Zambia",
      "states": [],
      "isEnabled": true,
      "isDeleted": false
    }
  ],
  "searchData": {
    "allCount": "213"
  }
}
```


# States list

Retrieves a paginated list of states/regions with their geographic identifiers.

This endpoint provides standardized state information for use in address forms, geographic filtering, and regional data management.

**Endpoint**

`GET/v2/geo/state`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Geo_StatesList>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Query Parameters**

| Parameter           | Type      | Description                                   | Required | Example        |
| ------------------- | --------- | --------------------------------------------- | -------- | -------------- |
| **`filter`**        | `string`  | **Optional filter** for state names or codes. | No       | `"california"` |
| **`meta.page`**     | `integer` | **Page number** (starts from 0).              | No       | `0`            |
| **`meta.pageSize`** | `integer` | **Items count per page**.                     | No       | `50`           |

***

### **Response (200 OK)**

Returns a paginated list of state/region objects with geographic identifiers and pagination metadata.

#### **Response Fields**

**Items Array**

Array of state objects with the following structure:

| Field      | Type      | Description                                | Example        |
| ---------- | --------- | ------------------------------------------ | -------------- |
| **`id`**   | `integer` | **Unique state ID**.                       | `5`            |
| **`iso`**  | `string`  | **ISO country code** the state belongs to. | `"US"`         |
| **`code`** | `string`  | **State/region code** (abbreviation).      | `"CA"`         |
| **`name`** | `string`  | **Full state/region name**.                | `"California"` |

**Meta Object**

Pagination metadata for the response:

| Field          | Type      | Description                                 | Example |
| -------------- | --------- | ------------------------------------------- | ------- |
| **`pageSize`** | `integer` | **Number of items per page**.               | `50`    |
| **`page`**     | `integer` | **Current page number** (0-based).          | `0`     |
| **`total`**    | `string`  | **Total number of items** across all pages. | `"50"`  |

***

### **Examples**

#### **Request (All States with Pagination)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/geo/state?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response**

json

```
{
  "items": [
    {
      "id": 1,
      "iso": "US",
      "code": "AL",
      "name": "Alabama"
    },
    {
      "id": 2,
      "iso": "US",
      "code": "AK",
      "name": "Alaska"
    },
    {
      "id": 3,
      "iso": "US",
      "code": "AZ",
      "name": "Arizona"
    },
    {
      "id": 4,
      "iso": "US",
      "code": "AR",
      "name": "Arkansas"
    },
    {
      "id": 5,
      "iso": "US",
      "code": "CA",
      "name": "California"
    },
    {
      "id": 6,
      "iso": "US",
      "code": "CO",
      "name": "Colorado"
    },
    {
      "id": 7,
      "iso": "US",
      "code": "CT",
      "name": "Connecticut"
    },
    {
      "id": 8,
      "iso": "US",
      "code": "DE",
      "name": "Delaware"
    },
    {
      "id": 9,
      "iso": "US",
      "code": "FL",
      "name": "Florida"
    },
    {
      "id": 10,
      "iso": "US",
      "code": "GA",
      "name": "Georgia"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "50"
  }
}
```

#### **Request (Filtered by Name)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/geo/state?filter=new&meta.page=0&meta.pageSize=5' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Filtered)**

json

```
{
  "items": [
    {
      "id": 31,
      "iso": "US",
      "code": "NH",
      "name": "New Hampshire"
    },
    {
      "id": 32,
      "iso": "US",
      "code": "NJ",
      "name": "New Jersey"
    },
    {
      "id": 33,
      "iso": "US",
      "code": "NM",
      "name": "New Mexico"
    },
    {
      "id": 34,
      "iso": "US",
      "code": "NY",
      "name": "New York"
    },
    {
      "id": 46,
      "iso": "GB",
      "code": "NIR",
      "name": "Northern Ireland"
    }
  ],
  "meta": {
    "pageSize": 5,
    "page": 0,
    "total": "5"
  }
}
```

#### **Request (Filtered by Code)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/geo/state?filter=ca&meta.page=0&meta.pageSize=10' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Code Filter)**

json

```
{
  "items": [
    {
      "id": 5,
      "iso": "US",
      "code": "CA",
      "name": "California"
    },
    {
      "id": 51,
      "iso": "CA",
      "code": "AB",
      "name": "Alberta"
    },
    {
      "id": 52,
      "iso": "CA",
      "code": "BC",
      "name": "British Columbia"
    },
    {
      "id": 53,
      "iso": "CA",
      "code": "MB",
      "name": "Manitoba"
    }
  ],
  "meta": {
    "pageSize": 10,
    "page": 0,
    "total": "4"
  }
}
```

#### **Request (Default Pagination)**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/geo/state' \
  -H 'Authorization: 123' \
  -H 'Accept: application/json'
```

#### **Response (Default)**

json

```
{
  "items": [
    {
      "id": 1,
      "iso": "US",
      "code": "AL",
      "name": "Alabama"
    },
    {
      "id": 2,
      "iso": "US",
      "code": "AK",
      "name": "Alaska"
    },
    {
      "id": 3,
      "iso": "US",
      "code": "AZ",
      "name": "Arizona"
    },
    {
      "id": 4,
      "iso": "US",
      "code": "AR",
      "name": "Arkansas"
    },
    {
      "id": 5,
      "iso": "US",
      "code": "CA",
      "name": "California"
    }
  ],
  "meta": {
    "pageSize": 50,
    "page": 0,
    "total": "50"
  }
}
```

***

### **Error Responses**

1. **Invalid Page Parameters**:

   json

   ```
   { "error": "Invalid page parameters: page must be >= 0" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
3. **Rate Limit Exceeded**:

   json

   ```
   { "error": "Rate limit exceeded" }
   ```

***

### **Notes**

* **Pagination**: Default page size is typically 50 items if not specified
* **Filtering**: The `filter` parameter searches both state names and codes
* **International Support**: Includes states/regions from multiple countries (US, CA, GB, etc.)
* **ISO Codes**: Uses standard ISO 3166 country codes
* **Sorting**: Results are typically sorted by country ISO code and state name
* **Performance**: Efficient for dropdown population and geographic data management

**Common Use Cases**:

* Address form state/region dropdowns
* Geographic filtering and reporting
* Regional data analysis
* Compliance with geographic requirements
* Multi-country application support

**Filter Behavior**:

* Case-insensitive search
* Matches partial names and codes
* Searches across all countries
* Returns results from any matching field (name or code)

Real request example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM1OTI3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.bvY7rDxLEZGnuZ8WcyMlqB-VQKeKCRCVTM5UZYPRQzg

```

Real response example

200 OK

```postman_json
{
  "items": [
    {
      "id": 1,
      "iso": "AZ",
      "code": "KALBAJAR",
      "name": "Kalbajar"
    },
    {
      "id": 2,
      "iso": "AZ",
      "code": "SHUSHA",
      "name": "Shusha"
    },
    {
      "id": 3,
      "iso": "AZ",
      "code": "TARTAR",
      "name": "Tartar"
    },
    {
      "id": 4,
      "iso": "AZ",
      "code": "KHOJALY",
      "name": "Khojaly"
    },
    {
      "id": 5,
      "iso": "AZ",
      "code": "KHOJAVEND",
      "name": "Khojavend"
    },
    {
      "id": 6,
      "iso": "AZ",
      "code": "ABSHERON",
      "name": "Absheron"
    },
    {
      "id": 7,
      "iso": "AZ",
      "code": "AGHJABADI",
      "name": "Aghjabadi"
    },
    {
      "id": 8,
      "iso": "AZ",
      "code": "AGHDAM",
      "name": "Aghdam"
    },
    {
      "id": 9,
      "iso": "AZ",
      "code": "AGDASH",
      "name": "Agdash"
    },
    {
      "id": 10,
      "iso": "AZ",
      "code": "AGHSTAFA",
      "name": "Aghstafa"
    },
    {
      "id": 11,
      "iso": "AZ",
      "code": "AGSU",
      "name": "Agsu"
    },
    {
      "id": 12,
      "iso": "AZ",
      "code": "SIRVAN",
      "name": "Sirvan"
    },
    {
      "id": 13,
      "iso": "AZ",
      "code": "ASTARA",
      "name": "Astara"
    },
    {
      "id": 14,
      "iso": "AZ",
      "code": "BAKU",
      "name": "Baku"
    },
    {
      "id": 15,
      "iso": "AZ",
      "code": "BALAKAN",
      "name": "Balakan"
    },
    {
      "id": 16,
      "iso": "AZ",
      "code": "BARDA",
      "name": "Barda"
    },
    {
      "id": 17,
      "iso": "AZ",
      "code": "BEYLAGAN",
      "name": "Beylagan"
    },
    {
      "id": 18,
      "iso": "AZ",
      "code": "BILASUVAR",
      "name": "Bilasuvar"
    },
    {
      "id": 19,
      "iso": "AZ",
      "code": "JABRAYIL",
      "name": "Jabrayil"
    },
    {
      "id": 20,
      "iso": "AZ",
      "code": "JALILABAD",
      "name": "Jalilabad"
    },
    {
      "id": 21,
      "iso": "AZ",
      "code": "DASHKASAN",
      "name": "Dashkasan"
    },
    {
      "id": 22,
      "iso": "AZ",
      "code": "SHABRAN",
      "name": "Shabran"
    },
    {
      "id": 23,
      "iso": "AZ",
      "code": "FUZULI",
      "name": "Fuzuli"
    },
    {
      "id": 24,
      "iso": "AZ",
      "code": "GADABAY",
      "name": "Gadabay"
    },
    {
      "id": 25,
      "iso": "AZ",
      "code": "GANJA",
      "name": "Ganja"
    },
    {
      "id": 26,
      "iso": "AZ",
      "code": "GORANBOY",
      "name": "Goranboy"
    },
    {
      "id": 27,
      "iso": "AZ",
      "code": "GOYCHAY",
      "name": "Goychay"
    },
    {
      "id": 28,
      "iso": "AZ",
      "code": "HAJIGABUL",
      "name": "Hajigabul"
    },
    {
      "id": 29,
      "iso": "AZ",
      "code": "IMISHLI",
      "name": "Imishli"
    },
    {
      "id": 30,
      "iso": "AZ",
      "code": "ISMAYILLI",
      "name": "Ismayilli"
    },
    {
      "id": 31,
      "iso": "AZ",
      "code": "KURDAMIR",
      "name": "Kurdamir"
    },
    {
      "id": 32,
      "iso": "AZ",
      "code": "LACHIN",
      "name": "Lachin"
    },
    {
      "id": 33,
      "iso": "AZ",
      "code": "LANKARAN",
      "name": "Lankaran"
    },
    {
      "id": 34,
      "iso": "AZ",
      "code": "LERIK",
      "name": "Lerik"
    },
    {
      "id": 35,
      "iso": "AZ",
      "code": "MASALLY",
      "name": "Masally"
    },
    {
      "id": 36,
      "iso": "AZ",
      "code": "MINGACHEVIR",
      "name": "Mingachevir"
    },
    {
      "id": 37,
      "iso": "AZ",
      "code": "NAFTALAN",
      "name": "Naftalan"
    },
    {
      "id": 38,
      "iso": "AZ",
      "code": "NEFTCHALA",
      "name": "Neftchala"
    },
    {
      "id": 39,
      "iso": "AZ",
      "code": "OGHUZ",
      "name": "Oghuz"
    },
    {
      "id": 40,
      "iso": "AZ",
      "code": "QABALA",
      "name": "Qabala"
    },
    {
      "id": 41,
      "iso": "AZ",
      "code": "QAKH",
      "name": "Qakh"
    },
    {
      "id": 42,
      "iso": "AZ",
      "code": "QAZAX",
      "name": "Qazax"
    },
    {
      "id": 43,
      "iso": "AZ",
      "code": "GOBUSTAN",
      "name": "Gobustan"
    },
    {
      "id": 44,
      "iso": "AZ",
      "code": "QUBA",
      "name": "Quba"
    },
    {
      "id": 45,
      "iso": "AZ",
      "code": "QUBADLI",
      "name": "Qubadli"
    },
    {
      "id": 46,
      "iso": "AZ",
      "code": "QUSAR",
      "name": "Qusar"
    },
    {
      "id": 47,
      "iso": "AZ",
      "code": "SAATLY",
      "name": "Saatly"
    },
    {
      "id": 48,
      "iso": "AZ",
      "code": "SABIRABAD",
      "name": "Sabirabad"
    },
    {
      "id": 49,
      "iso": "AZ",
      "code": "SHAKI",
      "name": "Shaki"
    },
    {
      "id": 50,
      "iso": "AZ",
      "code": "SALYAN",
      "name": "Salyan"
    },
    {
      "id": 51,
      "iso": "AZ",
      "code": "SHAMAKHI",
      "name": "Shamakhi"
    },
    {
      "id": 52,
      "iso": "AZ",
      "code": "SHAMKIR",
      "name": "Shamkir"
    },
    {
      "id": 53,
      "iso": "AZ",
      "code": "SAMUKH",
      "name": "Samukh"
    },
    {
      "id": 54,
      "iso": "AZ",
      "code": "SIYAZAN",
      "name": "Siyazan"
    },
    {
      "id": 55,
      "iso": "AZ",
      "code": "SUMGAIT",
      "name": "Sumgait"
    },
    {
      "id": 56,
      "iso": "AZ",
      "code": "TOVUZ",
      "name": "Tovuz"
    },
    {
      "id": 57,
      "iso": "AZ",
      "code": "UJAR",
      "name": "Ujar"
    },
    {
      "id": 58,
      "iso": "AZ",
      "code": "KHACHMAZ",
      "name": "Khachmaz"
    },
    {
      "id": 59,
      "iso": "AZ",
      "code": "KHANKENDI",
      "name": "Khankendi"
    },
    {
      "id": 60,
      "iso": "AZ",
      "code": "GOYGOL",
      "name": "Goygol"
    },
    {
      "id": 61,
      "iso": "AZ",
      "code": "KHIZI",
      "name": "Khizi"
    },
    {
      "id": 62,
      "iso": "AZ",
      "code": "YARDIMLI",
      "name": "Yardimli"
    },
    {
      "id": 63,
      "iso": "AZ",
      "code": "YEVLAKH",
      "name": "Yevlakh"
    },
    {
      "id": 64,
      "iso": "AZ",
      "code": "ZANGILAN",
      "name": "Zangilan"
    },
    {
      "id": 65,
      "iso": "AZ",
      "code": "ZAGATALA",
      "name": "Zagatala"
    },
    {
      "id": 66,
      "iso": "AZ",
      "code": "ZARDAB",
      "name": "Zardab"
    },
    {
      "id": 67,
      "iso": "US",
      "code": "AL",
      "name": "Alabama"
    },
    {
      "id": 68,
      "iso": "US",
      "code": "AK",
      "name": "Alaska"
    },
    {
      "id": 69,
      "iso": "US",
      "code": "AZ",
      "name": "Arizona"
    },
    {
      "id": 70,
      "iso": "US",
      "code": "AR",
      "name": "Arkansas"
    },
    {
      "id": 71,
      "iso": "US",
      "code": "CA",
      "name": "California"
    },
    {
      "id": 72,
      "iso": "US",
      "code": "CO",
      "name": "Colorado"
    },
    {
      "id": 73,
      "iso": "US",
      "code": "CT",
      "name": "Connecticut"
    },
    {
      "id": 74,
      "iso": "US",
      "code": "DE",
      "name": "Delaware"
    },
    {
      "id": 75,
      "iso": "US",
      "code": "FL",
      "name": "Florida"
    },
    {
      "id": 76,
      "iso": "US",
      "code": "GA",
      "name": "Georgia"
    },
    {
      "id": 77,
      "iso": "US",
      "code": "HI",
      "name": "Hawaii"
    },
    {
      "id": 78,
      "iso": "US",
      "code": "ID",
      "name": "Idaho"
    },
    {
      "id": 79,
      "iso": "US",
      "code": "IL",
      "name": "Illinois"
    },
    {
      "id": 80,
      "iso": "US",
      "code": "IN",
      "name": "Indiana"
    },
    {
      "id": 81,
      "iso": "US",
      "code": "IA",
      "name": "Iowa"
    },
    {
      "id": 82,
      "iso": "US",
      "code": "KS",
      "name": "Kansas"
    },
    {
      "id": 83,
      "iso": "US",
      "code": "KY",
      "name": "Kentucky"
    },
    {
      "id": 84,
      "iso": "US",
      "code": "LA",
      "name": "Louisiana"
    },
    {
      "id": 85,
      "iso": "US",
      "code": "ME",
      "name": "Maine"
    },
    {
      "id": 86,
      "iso": "US",
      "code": "MD",
      "name": "Maryland"
    },
    {
      "id": 87,
      "iso": "US",
      "code": "MA",
      "name": "Massachusetts"
    },
    {
      "id": 88,
      "iso": "US",
      "code": "MI",
      "name": "Michigan"
    },
    {
      "id": 89,
      "iso": "US",
      "code": "MN",
      "name": "Minnesota"
    },
    {
      "id": 90,
      "iso": "US",
      "code": "MS",
      "name": "Mississippi"
    },
    {
      "id": 91,
      "iso": "US",
      "code": "MO",
      "name": "Missouri"
    },
    {
      "id": 92,
      "iso": "US",
      "code": "MT",
      "name": "Montana"
    },
    {
      "id": 93,
      "iso": "US",
      "code": "NE",
      "name": "Nebraska"
    },
    {
      "id": 94,
      "iso": "US",
      "code": "NV",
      "name": "Nevada"
    },
    {
      "id": 95,
      "iso": "US",
      "code": "NH",
      "name": "New Hampshire"
    },
    {
      "id": 96,
      "iso": "US",
      "code": "NJ",
      "name": "New Jersey"
    },
    {
      "id": 97,
      "iso": "US",
      "code": "NM",
      "name": "New Mexico"
    },
    {
      "id": 98,
      "iso": "US",
      "code": "NY",
      "name": "New York"
    },
    {
      "id": 99,
      "iso": "US",
      "code": "NC",
      "name": "North Carolina"
    },
    {
      "id": 100,
      "iso": "US",
      "code": "ND",
      "name": "North Dakota"
    },
    {
      "id": 101,
      "iso": "US",
      "code": "OH",
      "name": "Ohio"
    },
    {
      "id": 102,
      "iso": "US",
      "code": "OK",
      "name": "Oklahoma"
    },
    {
      "id": 103,
      "iso": "US",
      "code": "OR",
      "name": "Oregon"
    },
    {
      "id": 104,
      "iso": "US",
      "code": "PA",
      "name": "Pennsylvania"
    },
    {
      "id": 105,
      "iso": "US",
      "code": "RI",
      "name": "Rhode Island"
    },
    {
      "id": 106,
      "iso": "US",
      "code": "SC",
      "name": "South Carolina"
    },
    {
      "id": 107,
      "iso": "US",
      "code": "SD",
      "name": "South Dakota"
    },
    {
      "id": 108,
      "iso": "US",
      "code": "TN",
      "name": "Tennessee"
    },
    {
      "id": 109,
      "iso": "US",
      "code": "TX",
      "name": "Texas"
    },
    {
      "id": 110,
      "iso": "US",
      "code": "UT",
      "name": "Utah"
    },
    {
      "id": 111,
      "iso": "US",
      "code": "VT",
      "name": "Vermont"
    },
    {
      "id": 112,
      "iso": "US",
      "code": "VA",
      "name": "Virginia"
    },
    {
      "id": 113,
      "iso": "US",
      "code": "WA",
      "name": "Washington"
    },
    {
      "id": 114,
      "iso": "US",
      "code": "WV",
      "name": "West Virginia"
    },
    {
      "id": 115,
      "iso": "US",
      "code": "WI",
      "name": "Wisconsin"
    },
    {
      "id": 116,
      "iso": "US",
      "code": "WY",
      "name": "Wyoming"
    },
    {
      "id": 117,
      "iso": "CY",
      "code": "LEFKOSA",
      "name": "Lefkosa"
    },
    {
      "id": 118,
      "iso": "CY",
      "code": "GAZIMAGUSA",
      "name": "Gazimagusa"
    },
    {
      "id": 119,
      "iso": "CY",
      "code": "GIRNE",
      "name": "Girne"
    },
    {
      "id": 120,
      "iso": "CY",
      "code": "GUZELYURT",
      "name": "Guzelyurt"
    },
    {
      "id": 121,
      "iso": "CY",
      "code": "ISKELE",
      "name": "Iskele"
    },
    {
      "id": 122,
      "iso": "CY",
      "code": "LEFKE",
      "name": "Lefke"
    },
    {
      "id": 123,
      "iso": "CY",
      "code": "FAMAGUSTA",
      "name": "Famagusta"
    },
    {
      "id": 124,
      "iso": "CY",
      "code": "KYRENIA",
      "name": "Kyrenia"
    },
    {
      "id": 125,
      "iso": "CY",
      "code": "LARNACA",
      "name": "Larnaca"
    },
    {
      "id": 126,
      "iso": "CY",
      "code": "LIMASSOL",
      "name": "Limassol"
    },
    {
      "id": 127,
      "iso": "CY",
      "code": "NICOSIA",
      "name": "Nicosia"
    },
    {
      "id": 128,
      "iso": "CY",
      "code": "PAPHOS",
      "name": "Paphos"
    },
    {
      "id": 129,
      "iso": "GE",
      "code": "TBILISI",
      "name": "Tbilisi"
    },
    {
      "id": 130,
      "iso": "GE",
      "code": "IMERETI",
      "name": "Imereti"
    },
    {
      "id": 131,
      "iso": "GE",
      "code": "AJARIA",
      "name": "Ajaria"
    },
    {
      "id": 132,
      "iso": "GE",
      "code": "KVEMO_KARTLI",
      "name": "Kvemo Kartli"
    },
    {
      "id": 133,
      "iso": "GE",
      "code": "SAMEGRELO_ZEMO_SVANETI",
      "name": "Samegrelo and Zemo Svaneti"
    },
    {
      "id": 134,
      "iso": "GE",
      "code": "KAKHETI",
      "name": "Kakheti"
    },
    {
      "id": 135,
      "iso": "GE",
      "code": "SHIDA_KARTLI",
      "name": "Shida Kartli"
    },
    {
      "id": 136,
      "iso": "GE",
      "code": "ABKHAZIA",
      "name": "Abkhazia"
    },
    {
      "id": 137,
      "iso": "GE",
      "code": "SAMTSKHE_JAVAKHETI",
      "name": "Samtskhe-Javakheti"
    },
    {
      "id": 138,
      "iso": "GE",
      "code": "GURIA",
      "name": "Guria"
    },
    {
      "id": 139,
      "iso": "GE",
      "code": "MTSKHETA_MTIANETI",
      "name": "Mtskheta-Mtianeti"
    },
    {
      "id": 140,
      "iso": "GE",
      "code": "RACHA_LECHKHUMI_KVEMO_SVANETI",
      "name": "Racha-Lechkhumi and Kvemo Svaneti"
    }
  ],
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "140"
  }
}
```


# Account requisites

Retrieves detailed account requisites report for a specific account. This endpoint provides comprehensive banking and account information for customer reference and payment processing.

**Endpoint**

&#x20;`GET /v2/report/account/{accountId}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Report_AccountRequisites>" %}

### **Request**

#### **Path Parameters**

| Parameter       | Type     | Description                                | Required | Example          |
| --------------- | -------- | ------------------------------------------ | -------- | ---------------- |
| **`accountId`** | `string` | **Account ID** to generate requisites for. | Yes      | `"U5aTFci52DRo"` |

#### **Query Parameters**

| Parameter           | Type     | Description                       | Required | Allowed Values           | Default   |
| ------------------- | -------- | --------------------------------- | -------- | ------------------------ | --------- |
| **`option.format`** | `string` | **Output format** for the report. | No       | `Unknown`, `PDF`, `XLSX` | `Unknown` |

#### **Headers**

| Key             | Value                                 | Required |
| --------------- | ------------------------------------- | -------- |
| `Authorization` | `<JWT>`                               | Yes      |
| `Accept`        | `application/json` or format-specific | Yes      |

***

### **Response (200 OK)**

Returns the account requisites report in the requested format, either as base64-encoded data or raw file content.

#### **Response Fields**

| Field      | Type     | Description                                             | Example                                          |
| ---------- | -------- | ------------------------------------------------------- | ------------------------------------------------ |
| **`data`** | `string` | **Report content** as base64-encoded bytes or raw data. | `"JVBERi0xLjQK..."`                              |
| **`name`** | `string` | **Report file name**.                                   | `"account_requisites_ACC123456789_20240522.pdf"` |

### **Typical Report Content**

Account requisites reports typically include:

#### **Account Information**

* Account holder name
* Account number
* Account type
* Currency
* Account status
* Creation date

#### **Banking Details**

* Bank name
* Bank address
* SWIFT/BIC code
* ABA/Routing number
* IBAN (for international accounts)
* Bank code

#### **Contact Information**

* Customer contact details
* Customer address
* Phone number
* Email address

#### **Compliance Information**

* Tax identification number
* Regulatory information
* Compliance status

***

### **Error Responses**

1. **Account Not Found**:

   json

   ```
   { "error": "Account not found: U5aTFci55DRo" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
3. **Invalid Format**:

   json

   ```
   { "error": "Unsupported format: DOCX" }
   ```
4. **Access Denied**:

   json

   ```
   { "error": "Access denied to account: U5aTFci52DRo" }
   ```

***

### **Notes**

* **Format Options**:
  * `PDF`: Professional document format suitable for printing and official documentation
  * `XLSX`: Spreadsheet format for data analysis and integration with financial software
  * `Unknown`: Default JSON format with base64-encoded data
* **File Naming Convention**:\
  `account_requisites_{accountId}_{timestamp}.{extension}`
* **Data Security**:
  * Sensitive banking information is protected
  * Access restricted to authorized users only
  * Secure transmission of financial data
* **Usage Scenarios**:
  * Customer account documentation
  * Payment instruction sharing with third parties
  * Compliance and audit requirements
  * Account verification processes
  * International wire transfer setup

**Common Use Cases**:

* Providing account details for wire transfers
* Sharing banking information with business partners
* Compliance documentation for regulators
* Customer self-service account information
* Integration with accounting systems

**Format Recommendations**:

* **PDF**: For official documents and printing
* **XLSX**: For data processing and analysis
* **JSON**: For API integration and automation

### Examples

**Real request**

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzY1NTkwNTQ1LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.iFPMqJZs02Ary1XG50kMj__KjGHEORpRsJkzYY-dliY
accountId*: UE0OyTy7pNcS
option.format: PDF

```

**Real response**

```postman_json
200 OK
{
  "data": "JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovQ29udGVudHMgNCAwIFI+PgplbmRvYmoKNCAwIG9iago8PC9MZW5ndGggNTg4ND4+CnN0cmVhbQowIEoKMCBqCjAuNTcgdwowLjAwMCBHCjAuMDAwIGcKQlQgL0YwYTc2NzA1ZDE4ZTA0OTRkZDI0Y2I1NzNlNTNhYTBhOGM3MTBlYzk5IDEwLjAwIFRmIEVUCkJUIC9GMGE3NjcwNWQxOGUwNDk0ZGQyNGNiNTczZTUzYWEwYThjNzEwZWM5OSAzMi4wMCBUZiBFVApCVCAvRjBhNzY3MDVkMThlMDQ5NGRkMjRjYjU3M2U1M2FhMGE4YzcxMGVjOTkgMzIuMDAgVGYgRVQKQlQgL0YwYTc2NzA1ZDE4ZTA0OTRkZDI0Y2I1NzNlNTNhYTBhOGM3MTBlYzk5IDMyLjAwIFRmIEVUCkJUIDI4LjM1IDUzNC45MyBUZCAodGVzdCkgVGogRVQKQlQgL0ZmNWQyZGU1ZjNhNzE2OTlhZTRiMmQ4MzE3OWU2MmQwOWU2ZmM0MTI2IDE0LjAwIFRmIEVUCkJUIC9GZjVkMmRlNWYzYTcxNjk5YWU0YjJkODMxNzllNjJkMDllNmZjNDEyNiAxNC4w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CAwIFIKPj4KL1hPYmplY3QgPDwKPj4KL0NvbG9yU3BhY2UgPDwKPj4KPj4KZW5kb2JqCjkgMCBvYmoKPDwKL1Byb2R1Y2VyICj+/wBGAFAARABGACAAMQAuADcpCi9DcmVhdGlvbkRhdGUgKEQ6MjAyNTEyMTMwNDQ1MTUpCi9Nb2REYXRlIChEOjIwMjUxMjEzMDQ0NTE1KQo+PgplbmRvYmoKMTAgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCi9OYW1lcyA8PAovRW1iZWRkZWRGaWxlcyA8PCAvTmFtZXMgWwogIApdID4+Cj4+Cj4+CmVuZG9iagp4cmVmCjAgMTEKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDExNjMwIDAwMDAwIG4gCjAwMDAwMTE5MjAgMDAwMDAgbiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDg3IDAwMDAwIG4gCjAwMDAwMDYwMjEgMDAwMDAgbiAKMDAwMDAwNjA5OSAwMDAwMCBuIAowMDAwMDExNzIzIDAwMDAwIG4gCjAwMDAwMTE4MTkgMDAwMDAgbiAKMDAwMDAxMjEzMCAwMDAwMCBuIAowMDAwMDEyMjQzIDAwMDAwIG4gCnRyYWlsZXIKPDwKL1NpemUgMTEKL1Jvb3QgMTAgMCBSCi9JbmZvIDkgMCBSCj4+CnN0YXJ0eHJlZgoxMjM0MQolJUVPRgo=",
  "name": "Account requisites Max B USD.pdf"
}
```

**File example:**

{% file src="/files/Vh9mz5Gi7QGmAncSBP3Y" %}

[Requisites sample list](https://docs.google.com/document/d/1wsxLCgwdu7wPG7YCkquRY--KMiPOZ-Rw3rYgj4cawxs/edit?usp=sharing)&#x20;


# Counterparty account requisites

Generates and retrieves detailed counterparty account requisites report. This endpoint provides comprehensive banking and account information for counterparties (vendors, suppliers, partners) in various formats for payment processing and documentation purposes.

**Endpoint**\
\
&#x20;`GET /v2/report/counterparty/account/{accountId}`

**Link:**&#x20;

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Report_CounterpartyAccountRequisites>" %}

### **Request**

#### **Path Parameters**

| Parameter       | Type     | Description                                             | Required | Example          |
| --------------- | -------- | ------------------------------------------------------- | -------- | ---------------- |
| **`accountId`** | `string` | **Counterparty Account ID** to generate requisites for. | Yes      | `"UE0OyTy7pNcS"` |

#### **Query Parameters**

| Parameter           | Type     | Description                       | Required | Allowed Values           | Default   |
| ------------------- | -------- | --------------------------------- | -------- | ------------------------ | --------- |
| **`option.format`** | `string` | **Output format** for the report. | No       | `Unknown`, `PDF`, `XLSX` | `Unknown` |

#### **Headers**

| Key             | Value                                 | Required |
| --------------- | ------------------------------------- | -------- |
| `Authorization` | `<JWT>`                               | Yes      |
| `Accept`        | `application/json` or format-specific | Yes      |

***

### **Response (200 OK)**

Returns the counterparty account requisites report in the requested format, either as base64-encoded data or raw file content.

#### **Response Fields**

| Field      | Type     | Description                                             | Example                                               |
| ---------- | -------- | ------------------------------------------------------- | ----------------------------------------------------- |
| **`data`** | `string` | **Report content** as base64-encoded bytes or raw data. | `"JVBERi0xLjQK..."`                                   |
| **`name`** | `string` | **Report file name**.                                   | `"counterparty_requisites_UE0OyTy7pNcS_20240522.pdf"` |

### **Typical Report Content**

#### **Banking Details**

* Bank name
* Bank address
* SWIFT/BIC code
* ABA/Routing number (for US accounts)
* IBAN (for international accounts)
* Sort code/Branch code
* Bank identifier code

**Or other type of requisites, depending on the currency and payment rails.**&#x20;

***

### **Error Responses**

1. **Counterparty Account Not Found**:

   json

   ```
   { "error": "Counterparty account not found: UE0OyTy7pNcS" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
3. **Invalid Format**:

   json

   ```
   { "error": "Unsupported format: DOCX" }
   ```
4. **Access Denied**:

   json

   ```
   { "error": "Access denied to counterparty account: UE0OyTy7pNcS" }
   ```

***

### **Notes**

* **Format Options**:
  * `PDF`: Professional document format suitable for printing and official documentation
  * `XLSX`: Spreadsheet format for data analysis and integration with accounting systems
  * `Unknown`: Default JSON format with base64-encoded data
* **Data Security**:
  * Counterparty financial information is protected
  * Access restricted to authorized users only
* **Usage Scenarios**:
  * Supplier/vendor payment setup
  * Partner account documentation
  * Payment processing instructions
  * Compliance and audit requirements
  * International wire transfer setup

**Common Use Cases**:

* Setting up supplier payments
* Documenting partner banking information
* Payment processing automation
* Integration with accounting/ERP systems

**Format Recommendations**:

* **PDF**: For official documents and printing (most common)
* **XLSX**: For data processing and bulk payment setups

**Report Features**:

* Timestamped generation

### Examples

**Real request**

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzY1NTk2OTU5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.ex6GGhxv7aj-JsMd4EGtVHUCG32779zZOkY_xEy4Fe4
accountId*: EQ2Mm4L3W7pe
option.format: PDF
```

**Real response**

200OK

```postman_json
{
  "data": "JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovQ29udGVudHMgNCAwIFI+PgplbmRvYmoKNCAwIG9iago8PC9MZW5ndGggNjI3NT4+CnN0cmVhbQowIEoKMCBqCjAuNTcgdwowLjAwMCBHCjAuMDAwIGcKQlQgL0YwYTc2NzA1ZDE4ZTA0OTRkZDI0Y2I1NzNlNTNhYTBhOGM3MTBlYzk5IDEwLjAwIFRmIEVUCkJUIC9GMGE3NjcwNWQxOGUwNDk0ZGQyNGNiNTczZTUzYWEwYThjNzEwZWM5OSAzMi4wMCBUZiBFVApCVCAvRjBhNzY3MDVkMThlMDQ5NGRkMjRjYjU3M2U1M2FhMGE4YzcxMGVjOTkgMzIuMDAgVGYgRVQKQlQgL0YwYTc2NzA1ZDE4ZTA0OTRkZDI0Y2I1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i9Sb290IDEwIDAgUgovSW5mbyA5IDAgUgo+PgpzdGFydHhyZWYKNzgyNwolJUVPRgo=",
  "name": "Recipient account requisites EUR 0.pdf"
}
```

**File example**

{% file src="/files/iJFIraZGQ54uldIdbgmF" %}


# Operations list

This method returns an operations report as an Excel (XLSX) file encoded in Base64 format.

**Endpoint**

`GET/v2/report/operations`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Report_OperationList>" %}

### Request Parameters

| Parameter | Type    | Required | Description                                 |
| --------- | ------- | -------- | ------------------------------------------- |
| pageSize  | integer | Yes      | Number of records per page. Example: `10`   |
| page      | integer | Yes      | Page number (starting from 0). Example: `0` |

**Example request:**

text

```
GET https://stagep.tst-apidmndelss.com/v2/report/operations?pageSize=10&page=0
```

### Response Structure

The response is returned in JSON format:

json

```
{
  "data": "UEsDBBQACAAIA...",
  "name": ""
}
```

| Field | Type   | Description                                 |
| ----- | ------ | ------------------------------------------- |
| data  | string | Excel file (XLSX) content encoded in Base64 |
| name  | string | File name (may be empty)                    |

#### How to Open the File from the `data` Field

The `data` field contains a Base64 string that needs to be decoded and saved as an `.xlsx` file.

**Method 1 — via base64.guru (no coding)**

1. Copy the `data` field value from the JSON response
2. Open <https://base64.guru/converter/decode/file>
3. Paste the string into the input field
4. Click "Decode Base64 to File"
5. Click "Download" — the file will be downloaded
6. Rename the downloaded file by adding the `.xlsx` extension (if not added automatically)
7. Open the file in Microsoft Excel or Google Sheets

**Method 2 — via** [**base64decode.org**](https://base64decode.org/)

1. Open [https://base64decode.org](https://base64decode.org/)
2. Paste the string from the `data` field
3. Click "Decode"
4. Click "Download"
5. Save the file with the `.xlsx` extension

**Method 3 — via Python (for developers)**

python

```
import base64, json

# Paste the API response here
response = {"data": "UEsDBBQ...", "name": ""}

decoded = base64.b64decode(response["data"])
with open("operations_report.xlsx", "wb") as f:
    f.write(decoded)

print("File saved: operations_report.xlsx")
```

**Method 4 — via Terminal (Mac/Linux)**

bash

```
echo "YOUR_BASE64" | base64 -d > operations_report.xlsx
```

### Pagination

To retrieve all data, use the `page` and `pageSize` parameters:

| Request               | Result        |
| --------------------- | ------------- |
| `?pageSize=10&page=0` | Records 1–10  |
| `?pageSize=10&page=1` | Records 11–20 |
| `?pageSize=10&page=2` | Records 21–30 |

### Notes

* The Base64 string in the `data` field starts with `UEsDBBQ` — this is the standard header of a ZIP archive (XLSX format) encoded in Base64
* If the file does not open, make sure you copied the entire string without spaces or line breaks
* A valid Base64 string always ends with `=` or `==`


# Operation Detail

Retrieves the detailed report or data file for a specific operation. This is used to fetch the results of a previously executed operation, such as a generated report, export file, or audit log.

**Endpoint**

`GET/v2/report/operations/{cuid}/{opid}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Report_OperationDetail>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token (e.g., `123` or a longer JWT token)

#### **Path Parameters**

These parameters are required and are part of the endpoint URL.

| Parameter  | Type   | Description                                  | Required | Example          |
| ---------- | ------ | -------------------------------------------- | -------- | ---------------- |
| **`cuid`** | string | The unique identifier for the **c**ustomer.  | Yes      | `cust_abc123def` |
| **`opid`** | string | The unique identifier for the **op**eration. | Yes      | `op_789xyz`      |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the operation's data file and its name. The `data` field typically contains a base64-encoded file (e.g., PDF, CSV).

#### **Response Fields**

| Field      | Type     | Description                                                                                     | Example                    |
| ---------- | -------- | ----------------------------------------------------------------------------------------------- | -------------------------- |
| **`data`** | `string` | **The file data**, often base64-encoded. You will need to decode this to get the original file. | `"aGVsbG8gd29ybGQ="`       |
| **`name`** | `string` | **The name of the file.** This usually includes the file extension.                             | `"transaction_report.pdf"` |

**Example Response:**

```json
{
  "data": "aGVsbG8gd29ybGQ=", // This is "hello world" encoded in Base64
  "name": "quarterly-financial-report.pdf"
}
```

***

### **Examples**

#### **Request (cURL)**

This example shows how to call the API to get the details for a specific operation.

```bash
curl --request GET \
  --url 'https://stagep.tst-apidmndelss.com/v2/report/operations/cust_abc123def/op_789xyz' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWI...'
```

> **🔑 Important:** Replace `cust_abc123def` and `op_789xyz` with the actual `cuid` and `opid` values you received from a previous API call (like the Operations List).

***

### **Error Responses**

1. **404 Not Found**:

   ```json
   { "error": "Operation not found" }
   ```

   *This happens if the provided `cuid` or `opid` is incorrect.*
2. **401 Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

   *This happens if the API key is missing, invalid, or expired.*

***

### **Notes**

* **Decoding Data:** The `data` field is usually a Base64-encoded string. You will need to decode it on your end to save or use the actual file.
* **File Format:** The format of the file is indicated by the extension in the `name` field (e.g., `.pdf`, `.csv`, `.xlsx`).
* **Usage:** This endpoint is typically called after getting a list of available operations from the `GET /v2/report/operations` endpoint, which provides the necessary `opid` values.

**Common Use Cases:**

* Downloading a generated financial report.
* Fetching a receipt or confirmation document for a specific transaction.
* Retrieving a log file for auditing purposes.

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcxODU0LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.vwG7Qqul_wJeJ22r73Yv6qWI1aCjRJm2ugOWYuPfmD8
customerId*: D7k3xbc-ERrj-lde9k1t3XuaE
operationId*: b5b1874a-4df1-453a-b28e-7521e8b38fd6 

```

Response sample

```postman_json
{
  "data": "JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc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KPDwKL1Byb2R1Y2VyICj+/wBGAFAARABGACAAMQAuADcpCi9DcmVhdGlvbkRhdGUgKEQ6MjAyNTEwMjcxNjI2NTEpCi9Nb2REYXRlIChEOjIwMjUxMDI3MTI1MDEwKQo+PgplbmRvYmoKOCAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMSAwIFIKL05hbWVzIDw8Ci9FbWJlZGRlZEZpbGVzIDw8IC9OYW1lcyBbCiAgCl0gPj4KPj4KPj4KZW5kb2JqCnhyZWYKMCA5CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAxMDQwMCAwMDAwMCBuIAowMDAwMDEwNjg0IDAwMDAwIG4gCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA4NyAwMDAwMCBuIAowMDAwMDEwNDg3IDAwMDAwIG4gCjAwMDAwMTA1ODMgMDAwMDAgbiAKMDAwMDAxMDg5NCAwMDAwMCBuIAowMDAwMDExMDA3IDAwMDAwIG4gCnRyYWlsZXIKPDwKL1NpemUgOQovUm9vdCA4IDAgUgovSW5mbyA3IDAgUgo+PgpzdGFydHhyZWYKMTExMDQKJSVFT0YK",
  "name": ""
}
```


# Account Statement

Generates and retrieves account statements for a specific user within a defined time period. Supports multiple export formats for financial reporting and record-keeping.

**Endpoint**

`GET/v2/report/statement`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Report_AccountStatement>" %}

### **Request**

#### **Authentication**

An API key is required for authentication. Include it in the `Authorization` header.

* **Header:** `Authorization`
* **Value:** Your API key token

#### **Query Parameters**

| Parameter           | Type     | Description & Values                                                                                                           | Required | Example                |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | -------- | ---------------------- |
| **`suid`**          | `string` | **User identifier** for statement generation.                                                                                  | Yes      | `user_123abc`          |
| **`period.from`**   | `string` | **Start date** (ISO 8601 format).                                                                                              | Yes      | `2024-01-01T00:00:00Z` |
| **`period.to`**     | `string` | **End date** (ISO 8601 format).                                                                                                | Yes      | `2024-03-31T23:59:59Z` |
| **`option.format`** | `string` | <p><strong>Export format</strong>:<br>- <code>PDF</code><br>- <code>XLSX</code><br>- <code>Unknown</code> (system default)</p> | No       | `PDF`                  |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the generated statement with filename and file data. The `data` field contains base64-encoded statement content.

#### **Response Fields**

| Field      | Type     | Description                          | Example                   |
| ---------- | -------- | ------------------------------------ | ------------------------- |
| **`data`** | `string` | **Statement data** (base64-encoded). | `"JVBERi0xLjcKJe..."`     |
| **`name`** | `string` | **Statement filename**.              | `"statement_Q1_2024.pdf"` |

**Example Response:**

```json
{
  "data": "JVBERi0xLjcKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovTWVkaWFCb3ggWzAgMCA1OTUgODQyXQovQ29udGVudHMgNCAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwvTGVuZ3RoIDU2Pj4Kc3RyZWFtCkJUCjExLjMwNyAxMS4zMDcgNTcyLjM5MyA4MjAuNjkzIHJlClYKQlQK...",
  "name": "statement_2024_Q1.pdf"
}
```

***

### **Examples**

#### **Basic Request (PDF Format)**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/report/statement?suid=user_123abc&period.from=2024-01-01T00:00:00Z&period.to=2024-03-31T23:59:59Z&option.format=PDF' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request for Excel Format**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/report/statement?suid=user_456def&period.from=2024-04-01T00:00:00Z&period.to=2024-04-30T23:59:59Z&option.format=XLSX' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request with System Default Format**

```bash
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/report/statement?suid=user_789ghi&period.from=2024-05-01T00:00:00Z&period.to=2024-05-15T23:59:59Z' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Common Statement Formats**

* **`PDF`**: Printable document format, ideal for official records and sharing
* **`XLSX`**: Excel spreadsheet format, suitable for data analysis and accounting software
* **`Unknown`**: System default format (typically PDF)

***

### **Error Responses**

1. **Missing Required Parameters**:

   ```json
   { "error": "Missing required parameter: suid" }
   ```
2. **Invalid Date Format**:

   ```json
   { "error": "Invalid date format for period.from" }
   ```
3. **User Not Found**:

   ```json
   { "error": "User not found: user_invalid_id" }
   ```
4. **Unauthorized**:

   ```json
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Date Range**: The maximum period for a single statement may be limited (e.g., 1 year)
* **File Size**: Large statements may take longer to generate and return
* **Data Freshness**: Statements reflect data as of the generation time
* **Timezone**: Date parameters should use UTC timezone

**Typical Use Cases**:

* Monthly/quarterly financial reporting
* Audit and compliance documentation
* Customer account statements
* Tax preparation and accounting
* Transaction history reviews

**Best Practices**:

* Always specify the desired format using `option.format`
* Use appropriate date ranges to avoid very large files
* Handle base64 decoding on the client side for file reconstruction
* Check filename extension (`name` field) to determine file type before processing

Request sample

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcyMDgyLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.RL1ddYq-acxfs525U1Ya6FArhWiqpm8q2EXpq-LiteQ
accountId: UavUkRR7OBzh
option.format: PDF
period.from: 2025-09-01T00:00:00Z
period.to: 2025-10-20T00:00:00Z

```

Response sample:

```postman_json
{
  "data": "JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMS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1IDAgUgo+PgovWE9iamVjdCA8PAo+PgovQ29sb3JTcGFjZSA8PAo+Pgo+PgplbmRvYmoKNyAwIG9iago8PAovUHJvZHVjZXIgKP7/AEYAUABEAEYAIAAxAC4ANykKL0NyZWF0aW9uRGF0ZSAoRDoyMDI1MTAyNzE2Mjk1MCkKL01vZERhdGUgKEQ6MjAyNTEwMjcxNjI5NTApCj4+CmVuZG9iago4IDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAxIDAgUgovTmFtZXMgPDwKL0VtYmVkZGVkRmlsZXMgPDwgL05hbWVzIFsKICAKXSA+Pgo+Pgo+PgplbmRvYmoKeHJlZgowIDkKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDExOTgzIDAwMDAwIG4gCjAwMDAwMTIyNjcgMDAwMDAgbiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMjMxIDAwMDAwIG4gCjAwMDAwMTIwNzAgMDAwMDAgbiAKMDAwMDAxMjE3MSAwMDAwMCBuIAowMDAwMDEyNDc3IDAwMDAwIG4gCjAwMDAwMTI1OTAgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSA5Ci9Sb290IDggMCBSCi9JbmZvIDcgMCBSCj4+CnN0YXJ0eHJlZgoxMjY4NwolJUVPRgo=",
  "name": "Transaction statements USD.pdf"
}
```


# Event list

Retrieves a paginated list of available system events and their variables. This is useful for understanding what events can be used in notifications or webhooks and what data they provide.

**Endpoint**

`GET/v2/messages/events`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_GetEvents>" %}

### **Request**

#### **Query Parameters**

| Parameter           | Type      | Description                  | Required | Example |
| ------------------- | --------- | ---------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | Page number (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | Number of items per page.    | No       | `20`    |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of events with their available variables.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description             | Example |
| -------------- | --------- | ----------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.         | `20`    |
| **`page`**     | `integer` | Current page number.    | `0`     |
| **`total`**    | `string`  | Total events available. | `"45"`  |

**2. Event Object (`items[]`)**

| Field           | Type      | Description                                  | Example              |
| --------------- | --------- | -------------------------------------------- | -------------------- |
| **`id`**        | `integer` | **Unique event identifier**.                 | `101`                |
| **`Name`**      | `string`  | **Event name** (descriptive).                | `"customer.created"` |
| **`variables`** | `array`   | **Available data variables** for this event. | -                    |

**Variable Object**

| Field      | Type     | Description                                   | Example        |
| ---------- | -------- | --------------------------------------------- | -------------- |
| **`name`** | `string` | **Variable name** available in event payload. | `"customerId"` |

**Example Response:**

json

```
{
  "items": [
    {
      "id": 101,
      "Name": "customer.created",
      "variables": [
        {"name": "customerId"},
        {"name": "customerName"},
        {"name": "email"},
        {"name": "createdAt"}
      ]
    },
    {
      "id": 102,
      "Name": "payment.processed",
      "variables": [
        {"name": "paymentId"},
        {"name": "amount"},
        {"name": "currency"},
        {"name": "status"}
      ]
    },
    {
      "id": 103,
      "Name": "account.updated",
      "variables": [
        {"name": "accountId"},
        {"name": "balance"},
        {"name": "previousBalance"},
        {"name": "updatedAt"}
      ]
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "45"
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/events?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request with Pagination**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/events?meta.page=1&meta.pageSize=5' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Common Event Types**

* **Customer Events**: `customer.created`, `customer.updated`, `customer.verified`
* **Payment Events**: `payment.initiated`, `payment.completed`, `payment.failed`
* **Account Events**: `account.created`, `account.balance.updated`
* **System Events**: `system.maintenance`, `system.update`

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
2. **Invalid Page**:

   json

   ```
   { "error": "Page number must be non-negative" }
   ```

***

### **Notes**

* **Usage**: These events can be used for webhooks, email templates, or system notifications.
* **Variable Access**: In templates, use `{{variableName}}` syntax to access these variables.
* **Pagination**: Default `pageSize` is typically 20-50 items.
* **Real-time**: This list may change as new features are added to the system.

Real request example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM3MjE5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.xqnAr-ffZA9R5kXPxzJN00AEwMpWv9TZjezYn8ZoWkw

```

Real response example

200 OK

```postman_json
{
  "items": [
    {
      "id": 5,
      "Name": "password_recovery",
      "variables": []
    },
    {
      "id": 7,
      "Name": "email_confirm",
      "variables": []
    },
    {
      "id": 8,
      "Name": "deposit_create",
      "variables": []
    },
    {
      "id": 9,
      "Name": "withdrawal_create",
      "variables": []
    },
    {
      "id": 10,
      "Name": "transfer_create",
      "variables": []
    },
    {
      "id": 11,
      "Name": "exchange_create",
      "variables": []
    },
    {
      "id": 12,
      "Name": "deposit_update",
      "variables": []
    },
    {
      "id": 13,
      "Name": "withdrawal_update",
      "variables": []
    },
    {
      "id": 14,
      "Name": "transfer_update",
      "variables": []
    },
    {
      "id": 15,
      "Name": "exchange_update",
      "variables": []
    },
    {
      "id": 16,
      "Name": "application_crete",
      "variables": []
    },
    {
      "id": 17,
      "Name": "application_update",
      "variables": []
    },
    {
      "id": 18,
      "Name": "counterparty_create",
      "variables": []
    },
    {
      "id": 19,
      "Name": "counterparty_account_create",
      "variables": []
    },
    {
      "id": 20,
      "Name": "counterparty_account_update",
      "variables": []
    },
    {
      "id": 21,
      "Name": "mfa_email_code",
      "variables": []
    },
    {
      "id": 22,
      "Name": "mfa_sms_code",
      "variables": []
    },
    {
      "id": 23,
      "Name": "system",
      "variables": []
    }
  ],
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "18"
  }
}
```


# Get Settings

Retrieves the current system configuration settings including common application settings and email service configuration. This endpoint provides essential information about the platform's operational

**Endpoint**

`GET/v2/messages/settings`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_GetSettings>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the system configuration settings organized into logical groups.

#### **Response Fields**

**1. Common Settings (`common`)**

| Field               | Type      | Description                                                                  | Example                   |
| ------------------- | --------- | ---------------------------------------------------------------------------- | ------------------------- |
| **`enabled`**       | `boolean` | **Overall system status**. `true` = operational, `false` = maintenance mode. | `true`                    |
| **`appHostname`**   | `string`  | **Backend application hostname**.                                            | `"api.paymentsystem.com"` |
| **`frontHostname`** | `string`  | **Frontend application hostname**.                                           | `"app.paymentsystem.com"` |
| **`frontName`**     | `string`  | **Frontend display name**.                                                   | `"Payment Portal"`        |
| **`companyName`**   | `string`  | **Company legal name**.                                                      | `"Acme Payments Inc."`    |
| **`companyPhone`**  | `string`  | **Company support phone number**.                                            | `"+1-800-123-4567"`       |

**2. Email Settings (`email`)**

| Field               | Type      | Description                                                    | Example                       |
| ------------------- | --------- | -------------------------------------------------------------- | ----------------------------- |
| **`enabled`**       | `boolean` | **Email service status**. `true` = active, `false` = disabled. | `true`                        |
| **`emailAccount`**  | `string`  | **SMTP email account**.                                        | `"noreply@paymentsystem.com"` |
| **`emailPassword`** | `string`  | **SMTP account password** (may be masked).                     | `"********"`                  |
| **`smtpHost`**      | `string`  | **SMTP server hostname**.                                      | `"smtp.gmail.com"`            |
| **`smtpPort`**      | `integer` | **SMTP server port**.                                          | `587`                         |

**Example Response:**

json

```
{
  "settings": {
    "common": {
      "enabled": true,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "Acme Payments Inc.",
      "companyPhone": "+1-800-123-4567"
    },
    "email": {
      "enabled": true,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Response in Maintenance Mode**

json

```
{
  "settings": {
    "common": {
      "enabled": false,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "Acme Payments Inc.",
      "companyPhone": "+1-800-123-4567"
    },
    "email": {
      "enabled": false,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Maintenance Mode**: When `common.enabled` is `false`, the system may be in maintenance mode with limited functionality.
* **Email Service**: If `email.enabled` is `false`, email notifications will not be sent.
* **Security**: Passwords are typically masked or returned only in encrypted form.
* **Hostnames**: Used for generating links in emails and notifications.

**Common Use Cases**:

* Displaying company information in UI
* Configuring email client connections
* Checking system status before operations
* Building dynamic URLs for notifications

Real request example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM3Mzc3LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.8s2wnR_5KqHI6W6ZT6u00t1fFl7ai37J03GCO1k95Jg

```

Real response example

```postman_json
{
  "settings": {
    "common": {
      "enabled": false,
      "appHostname": "",
      "frontHostname": "",
      "frontName": "",
      "companyName": "",
      "companyPhone": ""
    },
    "email": {
      "enabled": false,
      "emailAccount": "",
      "emailPassword": "",
      "smtpHost": "",
      "smtpPort": 0
    }
  }
}
```

<br>


# Update Settings

Updates system configuration settings including common application parameters and email service configuration. This endpoint allows administrators to modify operational settings.

**Endpoint**

`POST/v2/messages/settings`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_UpdateSettings>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

All fields are optional - only include the settings you want to update.

| Field               | Type      | Description                          | Required | Example                       |
| ------------------- | --------- | ------------------------------------ | -------- | ----------------------------- |
| **`settings`**      | `object`  | Configuration settings object.       | Yes      | -                             |
| → **`common`**      | `object`  | Common application settings.         | No       | -                             |
| → → `enabled`       | `boolean` | System status. `true` = operational. | No       | `true`                        |
| → → `appHostname`   | `string`  | Backend API hostname.                | No       | `"api.paymentsystem.com"`     |
| → → `frontHostname` | `string`  | Frontend application hostname.       | No       | `"app.paymentsystem.com"`     |
| → → `frontName`     | `string`  | Frontend display name.               | No       | `"Payment Portal"`            |
| → → `companyName`   | `string`  | Company legal name.                  | No       | `"Acme Payments Inc."`        |
| → → `companyPhone`  | `string`  | Company support phone.               | No       | `"+1-800-123-4567"`           |
| → **`email`**       | `object`  | Email service settings.              | No       | -                             |
| → → `enabled`       | `boolean` | Email service status.                | No       | `true`                        |
| → → `emailAccount`  | `string`  | SMTP email account.                  | No       | `"noreply@paymentsystem.com"` |
| → → `emailPassword` | `string`  | SMTP account password.               | No       | `"securepassword123"`         |
| → → `smtpHost`      | `string`  | SMTP server hostname.                | No       | `"smtp.gmail.com"`            |
| → → `smtpPort`      | `integer` | SMTP server port.                    | No       | `587`                         |

**Example Request Body (Partial Update):**

json

```
{
  "settings": {
    "common": {
      "companyName": "New Company Name Inc.",
      "companyPhone": "+1-888-999-0000"
    },
    "email": {
      "smtpHost": "smtp.mailprovider.com",
      "smtpPort": 465
    }
  }
}
```

**Example Request Body (Full Update):**

json

```
{
  "settings": {
    "common": {
      "enabled": true,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "Acme Payments Inc.",
      "companyPhone": "+1-800-123-4567"
    },
    "email": {
      "enabled": true,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "securepassword123",
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587
    }
  }
}
```

***

### **Response (200 OK)**

Returns the updated system configuration settings.

#### **Response Fields**

Same structure as the request body, showing all current settings after update.

**Example Response:**

json

```
{
  "settings": {
    "common": {
      "enabled": true,
      "appHostname": "api.paymentsystem.com",
      "frontHostname": "app.paymentsystem.com",
      "frontName": "Payment Portal",
      "companyName": "New Company Name Inc.",
      "companyPhone": "+1-888-999-0000"
    },
    "email": {
      "enabled": true,
      "emailAccount": "noreply@paymentsystem.com",
      "emailPassword": "********",
      "smtpHost": "smtp.mailprovider.com",
      "smtpPort": 465
    }
  }
}
```

***

### **Examples**

#### **Request (Enable Maintenance Mode)**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "settings": {
      "common": {
        "enabled": false
      }
    }
  }'
```

#### **Request (Update Email Settings)**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/settings' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "settings": {
      "email": {
        "smtpHost": "smtp.office365.com",
        "smtpPort": 587,
        "emailAccount": "notifications@company.com"
      }
    }
  }'
```

***

### **Error Responses**

1. **Invalid SMTP Configuration**:

   json

   ```
   { "error": "SMTP connection failed: Authentication required" }
   ```
2. **Invalid Hostname**:

   json

   ```
   { "error": "Invalid hostname format" }
   ```
3. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Partial Updates**: Only included fields are modified; omitted fields remain unchanged.
* **Password Masking**: Response may mask passwords for security (`********`).
* **Validation**: Settings are validated before application (e.g., SMTP connection test).
* **Immediate Effect**: Changes typically take effect immediately.

**Best Practices**:

* Test email settings before updating in production
* Use maintenance mode for system updates
* Keep hostnames consistent with SSL certificates


# Get templates list

Retrieves a paginated list of message templates with their configuration, triggers, and associated events. Templates are used for automated notifications (email, SMS, etc.) triggered by system events.

**Endpoint**

`GET/v2/messages/templates`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_GetTemplates>" %}

### **Request**

#### **Query Parameters**

| Parameter           | Type      | Description                  | Required | Example |
| ------------------- | --------- | ---------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | Page number (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | Number of items per page.    | No       | `20`    |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of message templates with detailed configuration.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description                | Example |
| -------------- | --------- | -------------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.            | `20`    |
| **`page`**     | `integer` | Current page number.       | `0`     |
| **`total`**    | `string`  | Total templates available. | `"15"`  |

**2. Template Object (`items[]`)**

| Field           | Type      | Description                               | Example                                    |
| --------------- | --------- | ----------------------------------------- | ------------------------------------------ |
| **`id`**        | `string`  | **Unique template identifier**.           | `"tpl_12345"`                              |
| **`partnerId`** | `string`  | **Partner ID** that owns the template.    | `"ptn_67890"`                              |
| **`typeId`**    | `integer` | **Template type** (1=Email, 2=SMS, etc.). | `1`                                        |
| **`subject`**   | `string`  | **Email subject** or message title.       | `"Welcome to Our Platform!"`               |
| **`title`**     | `string`  | **Message title** (for display).          | `"Account Created"`                        |
| **`content`**   | `string`  | **Message body** with variables.          | `"Hello {{name}}, your account is ready!"` |
| **`button`**    | `string`  | **Button text** (for emails).             | `"Login Now"`                              |
| **`link`**      | `string`  | **Button URL** (for emails).              | `"https://app.example.com/login"`          |
| **`updatedAt`** | `string`  | Last update timestamp (ISO 8601).         | `"2024-05-20T14:30:00Z"`                   |
| **`createdAt`** | `string`  | Creation timestamp (ISO 8601).            | `"2024-01-15T10:00:00Z"`                   |
| **`deletedAt`** | `string`  | Deletion timestamp (if soft-deleted).     | `null`                                     |
| **`delay`**     | `string`  | **Delivery delay** after trigger.         | `"5m"` (5 minutes)                         |
| **`isActive`**  | `boolean` | **Template status**. `true` = active.     | `true`                                     |
| **`showTime`**  | `string`  | **Preferred sending time**.               | `"09:00"`                                  |
| **`triggers`**  | `array`   | **Events that trigger this template**.    | -                                          |

**3. Trigger Object**

| Field            | Type      | Description                              | Example |
| ---------------- | --------- | ---------------------------------------- | ------- |
| **`eventId`**    | `integer` | **Event ID** that triggers the template. | `101`   |
| **`templateId`** | `integer` | **Template ID** reference.               | `1`     |
| **`event`**      | `object`  | **Event details** (see below).           | -       |

**4. Event Object**

| Field           | Type      | Description                             | Example              |
| --------------- | --------- | --------------------------------------- | -------------------- |
| **`id`**        | `integer` | **Event ID**.                           | `101`                |
| **`Name`**      | `string`  | **Event name**.                         | `"customer.created"` |
| **`variables`** | `array`   | **Available variables** for this event. | -                    |

**5. Variable Object**

| Field      | Type     | Description                         | Example          |
| ---------- | -------- | ----------------------------------- | ---------------- |
| **`name`** | `string` | **Variable name** for template use. | `"customerName"` |

**Example Response:**

json

```
{
  "items": [
    {
      "id": "tpl_12345",
      "partnerId": "ptn_67890",
      "typeId": 1,
      "subject": "Welcome to Acme Payments!",
      "title": "Account Created Successfully",
      "content": "Hello {{customerName}}, your account has been created. Your customer ID is {{customerId}}.",
      "button": "Access Your Account",
      "link": "https://app.acme.com/login",
      "updatedAt": "2024-05-20T14:30:00Z",
      "createdAt": "2024-01-15T10:00:00Z",
      "deletedAt": null,
      "delay": "0s",
      "isActive": true,
      "showTime": "09:00",
      "triggers": [
        {
          "eventId": 101,
          "templateId": 1,
          "event": {
            "id": 101,
            "Name": "customer.created",
            "variables": [
              {"name": "customerId"},
              {"name": "customerName"},
              {"name": "email"}
            ]
          }
        }
      ]
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "15"
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/templates?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **SMS Template Example**

json

```
{
  "id": "tpl_67890",
  "partnerId": "ptn_12345",
  "typeId": 2,
  "subject": "",
  "title": "Security Alert",
  "content": "Acme: Login detected from new device. If this wasn't you, contact support immediately.",
  "button": "",
  "link": "",
  "updatedAt": "2024-05-18T16:20:00Z",
  "createdAt": "2024-02-10T11:30:00Z",
  "deletedAt": null,
  "delay": "0s",
  "isActive": true,
  "showTime": "00:00",
  "triggers": [
    {
      "eventId": 205,
      "templateId": 2,
      "event": {
        "id": 205,
        "Name": "security.login.unusual",
        "variables": [
          {"name": "deviceType"},
          {"name": "location"},
          {"name": "timestamp"}
        ]
      }
    }
  ]
}
```

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Template Types**:
  * `1`: Email templates
  * `2`: SMS templates
  * `3`: Push notifications
* **Variable Usage**: Use `{{variableName}}` syntax in content.
* **Delivery Timing**: `showTime` uses 24-hour format, `delay` uses format like "5m", "2h", "1d".
* **Active Status**: Only templates with `isActive: true` will be triggered.

Real request sample:

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTQwMDA2LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.RxFCm8ucJR6zCl8yV-ThznmBuz8pls95zb2oPScWd6w

```

Real response sample:

200 OK

```postman_json
{
  "items": [
    {
      "id": "io75SdrpdBSW",
      "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "typeId": 1,
      "subject": "Test",
      "title": "Test",
      "content": "TEst",
      "button": "Test",
      "link": "Test",
      "updatedAt": "2024-08-16T08:26:36Z",
      "createdAt": "2024-08-16T08:26:36Z",
      "deletedAt": "0001-01-01T00:00:00Z",
      "delay": null,
      "isActive": true,
      "showTime": null,
      "triggers": [
        {
          "eventId": 7,
          "templateId": 4,
          "event": {
            "id": 0,
            "Name": "",
            "variables": []
          }
        }
      ]
    }
  ],
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "1"
  }
}
```


# Create template account

Creates a new message template for automated notifications (email, SMS, etc.). Templates are triggered by system events and can include dynamic variables.

**Endpoint**

`POST/v2/messages/templates`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_CreateTemplate>" %}

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

| Field          | Type      | Description & Requirements                                                                                                        | Required | Example                      |
| -------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------- |
| **`typeId`**   | `integer` | <p><strong>Template type</strong>:<br>- <code>1</code>: Email<br>- <code>2</code>: SMS<br>- <code>3</code>: Push notification</p> | Yes      | `1`                          |
| **`subject`**  | `string`  | **Email subject line** (required for email templates).                                                                            | Yes      | `"Welcome to Our Platform!"` |
| **`title`**    | `string`  | **Message title/header**.                                                                                                         | Yes      | `"Account Created"`          |
| **`content`**  | `string`  | **Message body** with variable placeholders.                                                                                      | Yes      | `"Hello {{name}}, welcome!"` |
| **`button`**   | `string`  | **Button text** (for email templates).                                                                                            | No       | `"Login Now"`                |
| **`link`**     | `string`  | **Button URL** (for email templates).                                                                                             | No       | `"https://app.example.com"`  |
| **`delay`**    | `string`  | **Delivery delay** after trigger (e.g., "5m", "2h").                                                                              | No       | `"10m"`                      |
| **`showTime`** | `string`  | **Preferred sending time** (24-hour format).                                                                                      | No       | `"09:00"`                    |
| **`triggers`** | `array`   | **Events that trigger this template** (see below).                                                                                | No       | -                            |

**Trigger Object**

| Field         | Type      | Description                                      | Example |
| ------------- | --------- | ------------------------------------------------ | ------- |
| **`eventId`** | `integer` | **ID of the event** that triggers this template. | `101`   |
| **`event`**   | `object`  | **Event details** (optional, see below).         | -       |

**Event Object (optional in request)**

| Field           | Type      | Description                         | Example              |
| --------------- | --------- | ----------------------------------- | -------------------- |
| **`id`**        | `integer` | Event ID.                           | `101`                |
| **`Name`**      | `string`  | Event name.                         | `"customer.created"` |
| **`variables`** | `array`   | Available variables for this event. | -                    |

**Example Request Body (Email Template):**

json

```
{
  "typeId": 1,
  "subject": "Welcome to Acme Payments!",
  "title": "Account Created Successfully",
  "content": "Hello {{customerName}}, your account has been created. Your customer ID is {{customerId}}.",
  "button": "Access Your Account",
  "link": "https://app.acme.com/login",
  "delay": "0s",
  "showTime": "09:00",
  "triggers": [
    {
      "eventId": 101
    }
  ]
}
```

**Example Request Body (SMS Template):**

json

```
{
  "typeId": 2,
  "subject": "",
  "title": "Security Alert",
  "content": "Acme: Login from new device at {{location}}. Contact support if this wasn't you.",
  "delay": "0s",
  "triggers": [
    {
      "eventId": 205
    }
  ]
}
```

***

### **Response (200 OK)**

Returns the newly created template with system-generated fields.

#### **Response Fields**

| Field           | Type      | Description                                  | Example                          |
| --------------- | --------- | -------------------------------------------- | -------------------------------- |
| **`id`**        | `string`  | **System-generated template ID**.            | `"tpl_abc123"`                   |
| **`partnerId`** | `string`  | **Partner ID** that owns the template.       | `"ptn_456def"`                   |
| **`typeId`**    | `integer` | Template type from request.                  | `1`                              |
| **`subject`**   | `string`  | Subject from request.                        | `"Welcome to Acme Payments!"`    |
| **`title`**     | `string`  | Title from request.                          | `"Account Created Successfully"` |
| **`content`**   | `string`  | Content from request.                        | `"Hello {{customerName}}..."`    |
| **`button`**    | `string`  | Button text from request.                    | `"Access Your Account"`          |
| **`link`**      | `string`  | Link URL from request.                       | `"https://app.acme.com/login"`   |
| **`updatedAt`** | `string`  | Creation timestamp (ISO 8601).               | `"2024-05-21T10:30:00Z"`         |
| **`createdAt`** | `string`  | Creation timestamp (ISO 8601).               | `"2024-05-21T10:30:00Z"`         |
| **`deletedAt`** | `string`  | Deletion timestamp (null for new templates). | `null`                           |
| **`delay`**     | `string`  | Delay from request.                          | `"0s"`                           |
| **`isActive`**  | `boolean` | **Active status** (default: `true`).         | `true`                           |
| **`showTime`**  | `string`  | Show time from request.                      | `"09:00"`                        |
| **`triggers`**  | `array`   | **Trigger events** with full event details.  | -                                |

**Example Response:**

json

```
{
  "item": {
    "id": "tpl_abc123",
    "partnerId": "ptn_456def",
    "typeId": 1,
    "subject": "Welcome to Acme Payments!",
    "title": "Account Created Successfully",
    "content": "Hello {{customerName}}, your account has been created. Your customer ID is {{customerId}}.",
    "button": "Access Your Account",
    "link": "https://app.acme.com/login",
    "updatedAt": "2024-05-21T10:30:00Z",
    "createdAt": "2024-05-21T10:30:00Z",
    "deletedAt": null,
    "delay": "0s",
    "isActive": true,
    "showTime": "09:00",
    "triggers": [
      {
        "eventId": 101,
        "templateId": 1,
        "event": {
          "id": 101,
          "Name": "customer.created",
          "variables": [
            {"name": "customerId"},
            {"name": "customerName"},
            {"name": "email"}
          ]
        }
      }
    ]
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/templates' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "typeId": 1,
    "subject": "Password Reset Request",
    "title": "Reset Your Password",
    "content": "Hello {{name}}, click the button below to reset your password. This link expires in 1 hour.",
    "button": "Reset Password",
    "link": "https://app.example.com/reset-password?token={{resetToken}}",
    "delay": "0s",
    "triggers": [
      {
        "eventId": 150
      }
    ]
  }'
```

***

### **Error Responses**

1. **Invalid Event ID**:

   json

   ```
   { "error": "Event ID 999 not found" }
   ```
2. **Missing Required Field**:

   json

   ```
   { "error": "subject is required for email templates" }
   ```
3. **Invalid Variable**:

   json

   ```
   { "error": "Variable 'invalidVar' not available for this event" }
   ```

***

### **Notes**

* **Variable Syntax**: Use `{{variableName}}` in content for dynamic values.
* **Template Types**:
  * `1`: Email (requires subject, supports button/link)
  * `2`: SMS (no subject/button/link needed)
  * `3`: Push notification
* **Auto-activation**: New templates are automatically active (`isActive: true`).
* **Event Validation**: Triggers are validated against available system events.

<br>


# Get template by ID

Retrieves detailed information about a specific message template, including its content, configuration, and associated trigger events.

**Endpoint**

`GET/v2/messages/templates/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_GetTemplate>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                  | Required | Example       |
| --------- | -------- | ---------------------------- | -------- | ------------- |
| **`id`**  | `string` | **Template ID** to retrieve. | Yes      | `"tpl_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns the complete template object with all configuration details.

#### **Response Fields**

**Template Object**

| Field           | Type      | Description                                                                                                                       | Example                      |
| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| **`id`**        | `string`  | **Unique template identifier**.                                                                                                   | `"tpl_12345"`                |
| **`partnerId`** | `string`  | **Partner ID** that owns the template.                                                                                            | `"ptn_67890"`                |
| **`typeId`**    | `integer` | <p><strong>Template type</strong>:<br>- <code>1</code>: Email<br>- <code>2</code>: SMS<br>- <code>3</code>: Push notification</p> | `1`                          |
| **`subject`**   | `string`  | **Email subject line**.                                                                                                           | `"Welcome to Our Platform!"` |
| **`title`**     | `string`  | **Message title/header**.                                                                                                         | `"Account Created"`          |
| **`content`**   | `string`  | **Message body** with variables.                                                                                                  | `"Hello {{name}}, welcome!"` |
| **`button`**    | `string`  | **Button text** (for emails).                                                                                                     | `"Login Now"`                |
| **`link`**      | `string`  | **Button URL** (for emails).                                                                                                      | `"https://app.example.com"`  |
| **`updatedAt`** | `string`  | Last update timestamp (ISO 8601).                                                                                                 | `"2024-05-20T14:30:00Z"`     |
| **`createdAt`** | `string`  | Creation timestamp (ISO 8601).                                                                                                    | `"2024-01-15T10:00:00Z"`     |
| **`deletedAt`** | `string`  | Deletion timestamp (if soft-deleted).                                                                                             | `null`                       |
| **`delay`**     | `string`  | **Delivery delay** after trigger.                                                                                                 | `"5m"`                       |
| **`isActive`**  | `boolean` | **Template status**. `true` = active.                                                                                             | `true`                       |
| **`showTime`**  | `string`  | **Preferred sending time**.                                                                                                       | `"09:00"`                    |
| **`triggers`**  | `array`   | **Events that trigger this template**.                                                                                            | -                            |

**Trigger Object**

| Field            | Type      | Description                              | Example |
| ---------------- | --------- | ---------------------------------------- | ------- |
| **`eventId`**    | `integer` | **Event ID** that triggers the template. | `101`   |
| **`templateId`** | `integer` | **Template ID** reference.               | `1`     |
| **`event`**      | `object`  | **Event details** (see below).           | -       |

**Event Object**

| Field           | Type      | Description                             | Example              |
| --------------- | --------- | --------------------------------------- | -------------------- |
| **`id`**        | `integer` | **Event ID**.                           | `101`                |
| **`Name`**      | `string`  | **Event name**.                         | `"customer.created"` |
| **`variables`** | `array`   | **Available variables** for this event. | -                    |

**Variable Object**

| Field      | Type     | Description                         | Example          |
| ---------- | -------- | ----------------------------------- | ---------------- |
| **`name`** | `string` | **Variable name** for template use. | `"customerName"` |

**Example Response:**

json

```
{
  "item": {
    "id": "tpl_12345",
    "partnerId": "ptn_67890",
    "typeId": 1,
    "subject": "Welcome to Acme Payments!",
    "title": "Account Created Successfully",
    "content": "Hello {{customerName}}, your account has been created. Your customer ID is {{customerId}}.",
    "button": "Access Your Account",
    "link": "https://app.acme.com/login",
    "updatedAt": "2024-05-20T14:30:00Z",
    "createdAt": "2024-01-15T10:00:00Z",
    "deletedAt": null,
    "delay": "0s",
    "isActive": true,
    "showTime": "09:00",
    "triggers": [
      {
        "eventId": 101,
        "templateId": 1,
        "event": {
          "id": 101,
          "Name": "customer.created",
          "variables": [
            {"name": "customerId"},
            {"name": "customerName"},
            {"name": "email"}
          ]
        }
      }
    ]
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/templates/tpl_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **SMS Template Example**

**Response:**

json

```
{
  "item": {
    "id": "tpl_67890",
    "partnerId": "ptn_12345",
    "typeId": 2,
    "subject": "",
    "title": "Security Alert",
    "content": "Acme: Login detected from new device at {{location}}. Contact support if this wasn't you.",
    "button": "",
    "link": "",
    "updatedAt": "2024-05-18T16:20:00Z",
    "createdAt": "2024-02-10T11:30:00Z",
    "deletedAt": null,
    "delay": "0s",
    "isActive": true,
    "showTime": "00:00",
    "triggers": [
      {
        "eventId": 205,
        "templateId": 2,
        "event": {
          "id": 205,
          "Name": "security.login.unusual",
          "variables": [
            {"name": "deviceType"},
            {"name": "location"},
            {"name": "timestamp"}
          ]
        }
      }
    ]
  }
}
```

***

### **Error Responses**

1. **Template Not Found**:

   json

   ```
   { "error": "Template not found: tpl_99999" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```

***

### **Notes**

* **Template Types**:
  * `1`: Email templates (include subject, button, link)
  * `2`: SMS templates (simplified structure)
  * `3`: Push notifications
* **Variable Usage**: Use `{{variableName}}` syntax in content to insert dynamic values.
* **Active Status**: Only templates with `isActive: true` will be triggered by events.
* **Soft Delete**: Templates may be soft-deleted (`deletedAt` not null) but still accessible for reference.

Real request:

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcxMjkyLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.Zu6m0G61S-1fLp32JUyJp-btyvxAi1NTLo7CrmuYwus
id*: io75SdrpdBSW
```

Real response:

```postman_json
{
  "item": {
    "id": "io75SdrpdBSW",
    "partnerId": "3354815d-1a23-4b1c-81ec-306388cddfa4",
    "typeId": 1,
    "subject": "Test",
    "title": "Test",
    "content": "TEst",
    "button": "Test",
    "link": "Test",
    "updatedAt": "2024-08-16T08:26:36Z",
    "createdAt": "2024-08-16T08:26:36Z",
    "deletedAt": "0001-01-01T00:00:00Z",
    "delay": null,
    "isActive": true,
    "showTime": null,
    "triggers": [
      {
        "eventId": 7,
        "templateId": 4,
        "event": {
          "id": 0,
          "Name": "",
          "variables": []
        }
      }
    ]
  }
}
```

<br>


# Delete template by ID

Permanently deletes a message template. This action is irreversible and will prevent the template from being triggered by any future events.

**Endpoint**

`DELETE/v2/messages/templates/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_DeleteTemplate>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                | Required | Example       |
| --------- | -------- | -------------------------- | -------- | ------------- |
| **`id`**  | `string` | **Template ID** to delete. | Yes      | `"tpl_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a success status indicating whether the template was deleted.

#### **Response Fields**

| Field         | Type      | Description                                        | Example |
| ------------- | --------- | -------------------------------------------------- | ------- |
| **`success`** | `boolean` | `true` if deleted successfully, `false` otherwise. | `true`  |

**Example Response:**

json

```
{
  "success": true
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X DELETE 'https://stagep.tst-apidmndelss.com/v2/messages/templates/tpl_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Error Response**

If the template doesn't exist or is already deleted:

json

```
{
  "success": false,
  "error": "Template not found"
}
```

***

### **Error Responses**

1. **Template Not Found**:

   json

   ```
   { "error": "Template not found: tpl_99999" }
   ```
2. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
3. **Template in Use**:

   json

   ```
   { "error": "Template is currently active and cannot be deleted" }
   ```

***

### **Notes**

* **Irreversible Action**: Deleted templates cannot be recovered.
* **Dependencies**: Ensure the template is not actively being used before deletion.
* **Soft Delete**: Some systems may implement soft deletion (marking as deleted but retaining data).
* **Response Codes**:
  * `200`: Success (even if `success=false` for soft failures)
  * `404`: Template not found
  * `403`: Authorization failure

**Recommended Workflow**:

1. First retrieve the template to confirm it's the correct one
2. Deactivate the template if active (`isActive: false`)
3. Then proceed with deletion

Real request:

```postman_json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxNTcxMjkyLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.Zu6m0G61S-1fLp32JUyJp-btyvxAi1NTLo7CrmuYwus
id*: io75SdrpdBSW
```

Real response:

```postman_json
{
"success": true
}

```

<br>


# Update template account

Updates an existing message template. Allows modification of template content, configuration, triggers, and activation status. Returns the updated template with current values.

**Endpoint**

`POST/v2/messages/templates/{id}`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_UpdateTemplate>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                | Required | Example       |
| --------- | -------- | -------------------------- | -------- | ------------- |
| **`id`**  | `string` | **Template ID** to update. | Yes      | `"tpl_12345"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Content-Type`  | `application/json` | Yes      |
| `Accept`        | `application/json` | Yes      |

#### **Request Body (JSON)**

All fields are optional - only include the fields you want to update.

| Field          | Type      | Description & Requirements                                                                                                        | Required | Example                                       |
| -------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------- |
| **`typeId`**   | `integer` | <p><strong>Template type</strong>:<br>- <code>1</code>: Email<br>- <code>2</code>: SMS<br>- <code>3</code>: Push notification</p> | No       | `1`                                           |
| **`subject`**  | `string`  | **Email subject line** (required for email templates).                                                                            | No       | `"Updated Welcome Message!"`                  |
| **`title`**    | `string`  | **Message title/header**.                                                                                                         | No       | `"Account Verified"`                          |
| **`content`**  | `string`  | **Message body** with variable placeholders.                                                                                      | No       | `"Hello {{name}}, your account is verified!"` |
| **`button`**   | `string`  | **Button text** (for email templates).                                                                                            | No       | `"Access Dashboard"`                          |
| **`link`**     | `string`  | **Button URL** (for email templates).                                                                                             | No       | `"https://app.example.com/dashboard"`         |
| **`delay`**    | `string`  | **Delivery delay** after trigger (e.g., "5m", "2h").                                                                              | No       | `"10m"`                                       |
| **`isActive`** | `boolean` | **Template activation status**.                                                                                                   | No       | `true`                                        |
| **`showTime`** | `string`  | **Preferred sending time** (24-hour format).                                                                                      | No       | `"10:00"`                                     |
| **`triggers`** | `array`   | **Events that trigger this template** (see below).                                                                                | No       | -                                             |

**Trigger Object**

| Field         | Type      | Description                                      | Example |
| ------------- | --------- | ------------------------------------------------ | ------- |
| **`eventId`** | `integer` | **ID of the event** that triggers this template. | `101`   |

**Example Request Body (Partial Update):**

json

```
{
  "subject": "Updated Welcome Message",
  "content": "Hello {{customerName}}, welcome to our updated platform!",
  "isActive": true
}
```

**Example Request Body (Full Update):**

json

```
{
  "typeId": 1,
  "subject": "Password Reset Complete",
  "title": "Password Updated",
  "content": "Hello {{name}}, your password has been successfully reset.",
  "button": "Login Now",
  "link": "https://app.example.com/login",
  "delay": "0s",
  "isActive": true,
  "showTime": "09:00",
  "triggers": [
    {
      "eventId": 150
    }
  ]
}
```

***

### **Response (200 OK)**

Returns the updated template object with all current values.

#### **Response Fields**

| Field           | Type      | Description                          | Example                               |
| --------------- | --------- | ------------------------------------ | ------------------------------------- |
| **`id`**        | `string`  | Template ID (unchanged).             | `"tpl_12345"`                         |
| **`partnerId`** | `string`  | Partner ID (unchanged).              | `"ptn_67890"`                         |
| **`typeId`**    | `integer` | Updated template type.               | `1`                                   |
| **`subject`**   | `string`  | Updated subject.                     | `"Updated Welcome Message"`           |
| **`title`**     | `string`  | Updated title.                       | `"Account Verified"`                  |
| **`content`**   | `string`  | Updated content.                     | `"Hello {{name}}, welcome!"`          |
| **`button`**    | `string`  | Updated button text.                 | `"Access Dashboard"`                  |
| **`link`**      | `string`  | Updated link URL.                    | `"https://app.example.com/dashboard"` |
| **`updatedAt`** | `string`  | **New update timestamp**.            | `"2024-05-21T14:45:00Z"`              |
| **`createdAt`** | `string`  | Original creation timestamp.         | `"2024-01-15T10:00:00Z"`              |
| **`deletedAt`** | `string`  | Deletion timestamp (null if active). | `null`                                |
| **`delay`**     | `string`  | Updated delay.                       | `"10m"`                               |
| **`isActive`**  | `boolean` | Updated active status.               | `true`                                |
| **`showTime`**  | `string`  | Updated show time.                   | `"10:00"`                             |
| **`triggers`**  | `array`   | Updated trigger events.              | -                                     |

**Example Response:**

json

```
{
  "item": {
    "id": "tpl_12345",
    "partnerId": "ptn_67890",
    "typeId": 1,
    "subject": "Updated Welcome Message",
    "title": "Account Verified",
    "content": "Hello {{customerName}}, welcome to our updated platform!",
    "button": "Access Dashboard",
    "link": "https://app.example.com/dashboard",
    "updatedAt": "2024-05-21T14:45:00Z",
    "createdAt": "2024-01-15T10:00:00Z",
    "deletedAt": null,
    "delay": "10m",
    "isActive": true,
    "showTime": "10:00",
    "triggers": [
      {
        "eventId": 101,
        "templateId": 1,
        "event": {
          "id": 101,
          "Name": "customer.created",
          "variables": [
            {"name": "customerId"},
            {"name": "customerName"},
            {"name": "email"}
          ]
        }
      }
    ]
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/templates/tpl_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "Hello {{name}}, we have improved our security features!",
    "isActive": true,
    "delay": "5m"
  }'
```

#### **Deactivate Template**

bash

```
curl -X POST 'https://stagep.tst-apidmndelss.com/v2/messages/templates/tpl_12345' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Content-Type: application/json' \
  -d '{
    "isActive": false
  }'
```

***

### **Error Responses**

1. **Template Not Found**:

   json

   ```
   { "error": "Template not found: tpl_99999" }
   ```
2. **Invalid Event ID**:

   json

   ```
   { "error": "Event ID 999 not found" }
   ```
3. **Validation Error**:

   json

   ```
   { "error": "Subject is required for email templates" }
   ```

***

### **Notes**

* **Partial Updates**: Only included fields are modified; omitted fields remain unchanged.
* **Variable Validation**: Content is validated against available event variables.
* **Immediate Effect**: Changes take effect immediately for new triggers.
* **Audit Trail**: `updatedAt` timestamp is automatically updated.


# Type list

Retrieves a paginated list of available message types with their configuration and permission status. This endpoint helps understand what types of messages can be sent and which are enabled for the cu

**Endpoint**

`GET/v2/messages/types`

**Link**

{% embed url="<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/Messages_GetNotificationTypes>" %}

### **Request**

#### **Query Parameters**

| Parameter           | Type      | Description                  | Required | Example |
| ------------------- | --------- | ---------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | Page number (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | Number of items per page.    | No       | `20`    |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of message types with their configuration.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description                    | Example |
| -------------- | --------- | ------------------------------ | ------- |
| **`pageSize`** | `integer` | Items per page.                | `20`    |
| **`page`**     | `integer` | Current page number.           | `0`     |
| **`total`**    | `string`  | Total message types available. | `"5"`   |

**2. Message Type Object (`items[]`)**

| Field           | Type      | Description                                                  | Example   |
| --------------- | --------- | ------------------------------------------------------------ | --------- |
| **`id`**        | `integer` | **Unique type identifier**.                                  | `1`       |
| **`name`**      | `string`  | **Type name** (descriptive).                                 | `"Email"` |
| **`isAllowed`** | `boolean` | **Permission status** for current partner. `true` = enabled. | `true`    |

**Example Response:**

json

```
{
  "items": [
    {
      "id": 1,
      "name": "Email",
      "isAllowed": true
    },
    {
      "id": 2,
      "name": "SMS",
      "isAllowed": true
    },
    {
      "id": 3,
      "name": "Push Notification",
      "isAllowed": false
    },
    {
      "id": 4,
      "name": "In-App Notification",
      "isAllowed": true
    },
    {
      "id": 5,
      "name": "Webhook",
      "isAllowed": true
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "5"
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/types?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request with Pagination**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/types?meta.page=1&meta.pageSize=5' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Common Message Types**

* **`1` - Email**: Standard email notifications
* **`2` - SMS**: Text message notifications
* **`3` - Push Notification**: Mobile app push messages
* **`4` - In-App Notification**: Platform internal notifications
* **`5` - Webhook**: External system notifications

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
2. **Invalid Page**:

   json

   ```
   { "error": "Page number must be non-negative" }
   ```

***

### **Notes**

* **Permission-Based**: `isAllowed` indicates whether the current partner can use this message type.
* **Configuration**: Message types may have additional configuration requirements (e.g., SMTP for email, SMS gateway for SMS).
* **Pagination**: Default `pageSize` is typically 20-50 items.
* **Real-time**: The list reflects current system configuration and partner permissions.

**Usage Examples**:

* Display available message channels in UI dropdowns
* Conditionally show/hide features based on `isAllowed`
* Validate template creation requests

Real request sample

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTQwNjI0LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.ZxxQJJMwaktAsYDtSLIEMho6F2myXfcWFXSiJmQLeM8

```

Real response sample:

```postman_json
{
  "items": [
    {
      "id": 1,
      "name": "modal_window",
      "isAllowed": true
    },
    {
      "id": 2,
      "name": "web_push",
      "isAllowed": true
    },
    {
      "id": 3,
      "name": "email",
      "isAllowed": true
    },
    {
      "id": 8,
      "name": "telegram",
      "isAllowed": true
    }
  ],
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "4"
  }
}
```


# FAQ

#### 1. Can a single machine account hold multiple valid access/refresh token pairs at the same time?

**No.**\
Each time you call `POST /v2/auth/login`, any previously issued access tokens for that account are invalidated. Sessions do **not** coexist – only the most recent token pair is valid.

#### 2. What happens when I refresh a token via `GET /v2/auth/refresh/{token}`?

**All active sessions of the same account are invalidated.**\
This includes not only the refresh token being used but also any other token pairs associated with that account.

#### 3. Are there rate limits for the authentication endpoints?

Yes. We recommend not exceeding the following limits:

| Endpoint                   | Recommended limit      |
| -------------------------- | ---------------------- |
| `/v2/auth/login`           | 6 requests per minute  |
| `/v2/auth/refresh/{token}` | 1 request per minute   |
| `/v2/api/account`          | 12 requests per minute |
| `/v2/api/customer`         | 12 requests per minute |
| `/v2/api/billing`          | 12 requests per minute |
| General API endpoints      | 20 requests per minute |

> **Note:** Exceeding these limits will not immediately return a `429` response. If excessive usage continues and impacts system load, we will notify you. If no action is taken, hard limits may be enforced – at which point you will start receiving `429` status codes.

#### 4. What are the actual token TTLs in production?

| Token         | Production TTL |
| ------------- | -------------- |
| Access token  | \~5 minutes    |
| Refresh token | \~15 minutes   |

> The documentation mentions longer values (1 hour / 30 days), but the actual TTLs returned in `accessTtl` and `refreshTtl` fields should be trusted.\
> **Recommended flow:** Perform login once, then refresh every 5 minutes using the refresh token.

#### 5. Can a machine account use two-factor authentication (2FA)?

**No, not at this time.**\
If 2FA is enabled on a machine account, you will be required to provide a TOTP code on every authentication attempt. Since there is no documented non-interactive TOTP flow for machine accounts, we recommend keeping 2FA **disabled** for such accounts.

#### 6. Should I store token pairs per instance or use centralized storage?

That depends on your architecture:

* Because concurrent sessions are **not** supported and refreshing invalidates **all** sessions, per‑instance token pairs may lead to frequent invalidations.
* If your autoscaling environment (e.g., Google Cloud Run) runs multiple backend instances, consider **centralizing token storage with distributed locking** to avoid race conditions and repeated logins.


# Configuring Partner Verification Levels

In addition to token-based data sharing (see Share Verified KYC/KYB Data), Sumsub allows sharing a **verification level configuration** directly with a partner, so both sides use an identical KYC/KYB setup. This removes the need to manually replicate level settings on the partner's side and is a prerequisite for reliable token sharing.

### How it works

1. In the Sumsub Dashboard, go to **Individual levels** and open the level you want to share.
2. Select **Share level** from the three-dot menu in the top-right corner.
3. Choose the **recipient** partner and confirm.
4. Once shared, the level is available to the partner immediately, in read-only mode. If the level is updated later, changes sync automatically on the partner's side.

### ⚠️ Important

The shared **KYC level must exactly match** the level used on your own side. A mismatch will cause share-token processing to behave unpredictably, even when the token itself is valid.

### Notes

* Applies to both **individual** and **corporate (KYB)** profiles.
* Shared levels only work for **direct one-to-one partnerships** — not compatible with Reusable KYC Network.
* The same level can be shared with multiple recipients or donors.
* Once a level is shared, it is ready for immediate use — no separate activation step is required.


# Enable Webhooks

To receive Delos webhooks you need to send a subscription request via an [API request](https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Hook_SetParameters)

Subscription request body:

```json
{
  "parameters": {
    //Enable sends webhooks to your server
    "enabled": true,
    //Your server address where webhooks will be sent
    "hookUrl": "string",
    //JWT Secret for validate JWT Tokens from incoming request
    "jwtSecret": "string",
    //Enable receive Customers events
    "hookCustomer": true,
    //Enable receive Operations events
    "hookOperation": true,
    //Enable receive Deposit Accounts events
    "hookDepositAccount": true,
    //Enable receive Counterparties events
    "hookCounterparty": true
  }
}
```

### JWT Secret

This field is required.

Using this secret key, you can validate incoming requests for the authenticity of the sender. **IMPORTANT!** Please set a complex key for encoding requests.

<br>


# Validate Requests

<mark style="color:orange;">Every outgoing request we signed with your JWT Secret key. You need to validate received token.</mark>

### Validate Token

In each request you will receive two headers in the HTTP header :

* `X-Signature` JWT Token. Has format [JWT Tokens](https://jwt.io/), Token encription method is `HS256`
* `X-Time` - Time of request. Has format RFC3339. Like: `2006-01-02T15:04:05Z07:00`

#### Example for validate:

Validate Signature on PHP. For example used [Firebase JWT php-jwt](https://github.com/firebase/php-jwt)

```php
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use Firebase\JWT\SignatureInvalidException;

$key = 'Your JWT Secret key';

//Time received from request in header X-Time
$time = '2024-01-02T15:04:05Z07:00';
//JWT received from request in header X-Signature
$jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWduIjoiMmUzY2I5NzI2ZjIxZmEzYTI2NmFkMWQ3M2Y0YzIzZTIifQ.HF5ANJowoPL0fOISqMjbz7kmq2Zz0QvBLNyeSF-0efc';
//Raw body received from incoming request
$jsonBody = '{"sample":"incoming request body"}';

$message = $time + $body;
//Hashing by MD5. You get is 2e3cb9726f21fa3a266ad1d73f4c23e2 value
$hash = md5($message);

try {
    $decoded = JWT::decode($jwt, new Key($key, 'HS256'));
} catch (SignatureInvalidException $e) {
    // provided JWT signature verification failed.
    throw $e
} catch (\Exception $e) {
    throw $e
}

/*
  Decode result must be contains object
  {
    "sign": "2e3cb9726f21fa3a266ad1d73f4c23e2"
  }
*/
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";

//Here logic of comparison of the received md5 hash 
//and the hash generated by you from incoming request 
if ($hash != $decoded->sign) {
    throw new InvalidRequestException("Incoming signature invalid");
}
```


# Hook Structure

Delos webhooks contain a typed structure consisting of main fields and objects depending on the type of webhook

**Example**

```json
{
  //Unique Event ID (uuid4)
  "hook_id" : "string",
  //Webhook Type
  "hook_type" : int,
  "Data" : {
    // Object by webhook type
    // "Operation" : {}
    // or
    // "Client" : {}
    // or
    // "Account" : {}
    // or
    // "Counterparty" : {}
  }
}
```

### Webhook Types

Field `hook_type` is string value:

* 1 = OPERATION - Webhook contains Operation object
* 2 = DEPOSIT\_ACCOUNT - Webhook contains Deposit Account object
* 3 = CLIENT - Webhook contains customer object
* 4 = COUNTERPARTY - Webhook contains Counterparty (Beneficiar) object
* 5 = DEPOSIT\_ACCOUNT\_REQUISITE - Webhook contains Deposit Account object (Raised if requisites is changed)

Webhooks are sent whenever the status or state of the corresponding object changes.

#### Example webhook body (Operation):

```json
{
  "hook_id": "f1c37cdc-1c64-466c-bd3f-306c000e6b36",
  "hook_type": 1,
  "Data": {
    "Operation": {
      "cuid": "DnuQu6n-dP25-YKJ78eiuzL",
      "opid": "977d614e-6ca8-492e-97b5-9e7f0f73d86c",
      "type": 3,
      "source": {
        "account": "U1v72kDJdQw"
      },
      "status": 1,
      "created_at": {
        "seconds": 1734589267
      },
      "is_visible": true,
      "updated_at": {
        "nanos": 221000000,
        "seconds": 1734589267
      },
      "destination": {
        "beneficiar": "U6OFFpEoEdHA"
      },
      "payment_type": 3,
      "source_amount": {
        "sum": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        },
        "default": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        }
      },
      "commission_amount": {
        "sum": {
          "currency_code": "USD"
        },
        "default": {
          "currency_code": "USD"
        }
      },
      "destination_amount": {
        "sum": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        },
        "default": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        }
      },
      "current_balance_amount": {
        "sum": {
          "units": 295,
          "currency_code": "USD"
        },
        "default": {
          "units": 295,
          "currency_code": "USD"
        }
      }
    }
  }
}
```




---

[Next Page](https://docs.delos.financial/llms-full.txt/1)

