# Update a Customer

`PUT /api/customers/{id}`



- **Group:** Customers
- **Since:** v0.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/customers/put-customer/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `company` | String | **required** | Mandatory Customer company. |
| `vat` | String | optional | Optional Vat. |
| `phonenumber` | String | optional | Optional Customer Phone. |
| `website` | String | optional | Optional Customer Website. |
| `groups_in` | Number[] | optional | Optional Customer groups. |
| `default_language` | String | optional | Optional Customer Default Language. |
| `default_currency` | String | optional | Optional default currency. |
| `address` | String | optional | Optional Customer address. |
| `city` | String | optional | Optional Customer City. |
| `state` | String | optional | Optional Customer state. |
| `zip` | String | optional | Optional Zip Code. |
| `country` | String | optional | Optional country. |
| `billing_street` | String | optional | Optional Billing Address: Street. |
| `billing_city` | String | optional | Optional Billing Address: City. |
| `billing_state` | Number | optional | Optional Billing Address: State. |
| `billing_zip` | String | optional | Optional Billing Address: Zip. |
| `billing_country` | String | optional | Optional Billing Address: Country. |
| `shipping_street` | String | optional | Optional Shipping Address: Street. |
| `shipping_city` | String | optional | Optional Shipping Address: City. |
| `shipping_state` | String | optional | Optional Shipping Address: State. |
| `shipping_zip` | String | optional | Optional Shipping Address: Zip. |
| `shipping_country` | String | optional | Optional Shipping Address: Country. |

## Example request

```bash
curl -X PUT "https://yoursite.com/api/customers/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "company": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "message": "Customer Update Successful."
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Customer Update Fail."
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
