# Update E-Invoicing Customer

Update an existing e-invoicing customer by reference. Only provided fields are updated.

## Endpoint

**POST** `/api/v1/e-invoicing/customers/{reference}/update`

## Authorization

- **Type:** BearerAuth  
- **In:** header  
- **Format:** `Authorization: Bearer <token>`

## Path Parameters

- `reference` (string)

## Request Body

- **Content-Type:** application/json
- **Fields:**  
  - `first_name?string|null`  
  - `last_name?string|null`  
  - `email?string|null` (Format: `email`)  
  - `phone?string|null`  
  - `tin?string|null`  
  - `description?string|null`  
  - `country?string|null`  
  - `city?string|null`  
  - `address?string|null`  
  - `postal_code?string|null`  
  - `lga?string|null`  
  - `state?string|null`

## Response Body

### Status Codes

- **200** Application/json  
- **401**  
- **404**  
- **422**  
- **500**

### Sample cURL Request

```bash
curl -X POST "https://atlas.tryduplo.com/api/v1/e-invoicing/customers/string/update" \  
  -H "Authorization: Bearer " \  
  -H "Content-Type: application/json" \  
  -d '{}'
```

### Example Response

```json
{
  "requestId": "3a6538fd-03f0-4b05-ba41-5d44769dd014",
  "requestTimestamp": "2026-05-14 14:02:37",
  "message": "Customer updated successfully.",
  "statusCode": 200,
  "data": {
    "id": "019e26cb-e650-726d-bad6-95564a020b4a",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "phoneNumber": "+2348098765432",
    "reference": "dp_cust_hrxp0rpkhlyc6r8",
    "businessState": "test",
    "isBlacklisted": false,
    "hasWallet": false,
    "hasNrsCustomer": true,
    "wallet": {},
    "status": "ACTIVE",
    "source": "API",
    "createdAt": "2026-05-14 14:02:37"
  }
}
```
