> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.a1.uk.astutepayroll.in/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.a1.uk.astutepayroll.in/_mcp/server.

# Update Customer

PATCH {{baseUrl}}/customers/{customerUuid}
Content-Type: application/json

Update a customer record. All fields are optional — only provided fields are updated. Returns `true` on success.

Reference: https://docs.a1.uk.astutepayroll.in/api-reference/customer/update-customer

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `customerUuid` (string, required)

### Headers

- `vnd.a1.tenant-id` (string, optional) — Tenant identifier for multi-tenant environments

### Body (application/json)

This endpoint expects a CustomerPatch.

- `entityName` (string, optional)
- `tradingName` (string, optional)
- `regionCode` (string, optional)
- `address` (CustomerPatchAddress, optional)
- `email` (string, optional)
- `contactName` (string, optional)
- `remoteId` (integer, optional)
- `phone` (Phone, optional)
- `registrationNumber` (string, optional)
- `invoiceTermLength` (integer, optional)
- `salesInvoiceDescriptionText` (string, optional)
- `parentUuid` (string, optional)
- `invoiceTaxUuid` (string, optional)
- `companyUuid` (string, optional)
- `billingGroupName` (string, optional)
- `billingGroupInvoiceName` (string, optional)
- `billingGroupPrimaryEmail` (string, optional)
- `billingGroupAdditionalEmailRecipients` (string, optional)
- `billingGroupUuid` (string, optional)

## Response

### 200

Update successful

- `boolean`

## Errors

### 400 Bad Request Error

Bad Request

- `any`

### 404 Not Found Error

Customer not found

- `any`

## Types

### CustomerPatchAddress

- `line1` (string, optional)
- `line2` (string, optional)
- `townCity` (string, optional)
- `country` (string, optional)
- `foreignCountry` (string, optional)
- `postcode` (string, optional)

### Phone

- `countryCode` (string, optional)
- `number` (string, optional)

## Examples

**Request**

```json
{
  "entityName": "Acme Corp",
  "tradingName": "Acme",
  "address": {
    "line1": "10 High Street",
    "line2": "",
    "townCity": "London",
    "country": "England",
    "postcode": "SW1A 1AA"
  },
  "phone": {
    "countryCode": "44",
    "number": "1234567890"
  },
  "registrationNumber": "AA123234"
}
```

**Response**

```json
true
```

**SDK Code**

```python
import requests

url = "https://{{baseurl}}/customers/customerUuid"

payload = {
    "entityName": "Acme Corp",
    "tradingName": "Acme",
    "address": {
        "line1": "10 High Street",
        "line2": "",
        "townCity": "London",
        "country": "England",
        "postcode": "SW1A 1AA"
    },
    "phone": {
        "countryCode": "44",
        "number": "1234567890"
    },
    "registrationNumber": "AA123234"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{{baseurl}}/customers/customerUuid';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"entityName":"Acme Corp","tradingName":"Acme","address":{"line1":"10 High Street","line2":"","townCity":"London","country":"England","postcode":"SW1A 1AA"},"phone":{"countryCode":"44","number":"1234567890"},"registrationNumber":"AA123234"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{{baseurl}}/customers/customerUuid"

	payload := strings.NewReader("{\n  \"entityName\": \"Acme Corp\",\n  \"tradingName\": \"Acme\",\n  \"address\": {\n    \"line1\": \"10 High Street\",\n    \"line2\": \"\",\n    \"townCity\": \"London\",\n    \"country\": \"England\",\n    \"postcode\": \"SW1A 1AA\"\n  },\n  \"phone\": {\n    \"countryCode\": \"44\",\n    \"number\": \"1234567890\"\n  },\n  \"registrationNumber\": \"AA123234\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://{{baseurl}}/customers/customerUuid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entityName\": \"Acme Corp\",\n  \"tradingName\": \"Acme\",\n  \"address\": {\n    \"line1\": \"10 High Street\",\n    \"line2\": \"\",\n    \"townCity\": \"London\",\n    \"country\": \"England\",\n    \"postcode\": \"SW1A 1AA\"\n  },\n  \"phone\": {\n    \"countryCode\": \"44\",\n    \"number\": \"1234567890\"\n  },\n  \"registrationNumber\": \"AA123234\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://{{baseurl}}/customers/customerUuid")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entityName\": \"Acme Corp\",\n  \"tradingName\": \"Acme\",\n  \"address\": {\n    \"line1\": \"10 High Street\",\n    \"line2\": \"\",\n    \"townCity\": \"London\",\n    \"country\": \"England\",\n    \"postcode\": \"SW1A 1AA\"\n  },\n  \"phone\": {\n    \"countryCode\": \"44\",\n    \"number\": \"1234567890\"\n  },\n  \"registrationNumber\": \"AA123234\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://{{baseurl}}/customers/customerUuid', [
  'body' => '{
  "entityName": "Acme Corp",
  "tradingName": "Acme",
  "address": {
    "line1": "10 High Street",
    "line2": "",
    "townCity": "London",
    "country": "England",
    "postcode": "SW1A 1AA"
  },
  "phone": {
    "countryCode": "44",
    "number": "1234567890"
  },
  "registrationNumber": "AA123234"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://{{baseurl}}/customers/customerUuid");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entityName\": \"Acme Corp\",\n  \"tradingName\": \"Acme\",\n  \"address\": {\n    \"line1\": \"10 High Street\",\n    \"line2\": \"\",\n    \"townCity\": \"London\",\n    \"country\": \"England\",\n    \"postcode\": \"SW1A 1AA\"\n  },\n  \"phone\": {\n    \"countryCode\": \"44\",\n    \"number\": \"1234567890\"\n  },\n  \"registrationNumber\": \"AA123234\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "entityName": "Acme Corp",
  "tradingName": "Acme",
  "address": [
    "line1": "10 High Street",
    "line2": "",
    "townCity": "London",
    "country": "England",
    "postcode": "SW1A 1AA"
  ],
  "phone": [
    "countryCode": "44",
    "number": "1234567890"
  ],
  "registrationNumber": "AA123234"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{{baseurl}}/customers/customerUuid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```