> For the complete documentation index, see [llms.txt](https://docs.delos.financial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.delos.financial/customer/update-customer.md).

# 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                                  |
| ----------------- | -------- | --------------------------------- | ---------------------------------------- |
| **`customerId`**  | `string` | Customer ID (unchanged).          | `"DqCsgSE-4e95-ViYbNI"`                  |
| **`partnerId`**   | `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": {
    "customerId": "DqCsgSE-4e95-ViYbNI",
    "partnerId": "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
  }
}
```


---

# 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
If you need additional information that is not directly available in this page, you can query the documentation 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/customer/update-customer.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.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
