curl --request PUT \
--url https://api.atoa.me/api/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}'
import requests
url = "https://api.atoa.me/api/customers/{customerId}"
payload = {
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/customers/{customerId}",
{
method: "PUT",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe Updated",
address: "456 New Street",
city: "Manchester",
}),
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe Updated",
"address" => "456 New Street",
"city" => "Manchester"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers/{customerId}"
payload := strings.NewReader(`{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}`)
req, _ := http.NewRequest("PUT", 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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.put("https://api.atoa.me/api/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe Updated\",\"address\":\"456 New Street\",\"city\":\"Manchester\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe Updated",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "456 New Street",
"city": "Manchester",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "NOT_FOUND",
"message": "Customer not found",
"status": 404,
"errors": []
}
Customers
Update Customer | Customers API
Update customer via the Atoa Customers API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.
PUT
/
api
/
customers
/
{customerId}
curl --request PUT \
--url https://api.atoa.me/api/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}'
import requests
url = "https://api.atoa.me/api/customers/{customerId}"
payload = {
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/customers/{customerId}",
{
method: "PUT",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe Updated",
address: "456 New Street",
city: "Manchester",
}),
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe Updated",
"address" => "456 New Street",
"city" => "Manchester"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers/{customerId}"
payload := strings.NewReader(`{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}`)
req, _ := http.NewRequest("PUT", 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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.put("https://api.atoa.me/api/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe Updated\",\"address\":\"456 New Street\",\"city\":\"Manchester\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe Updated",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "456 New Street",
"city": "Manchester",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "NOT_FOUND",
"message": "Customer not found",
"status": 404,
"errors": []
}
Update a customer by ID. All fields are optional — only include the fields you want to update.
Request Body Schema
All fields are optional. Same validation rules as Create Customer.
Authorization
Bearer<accessSecret>
Path Parameters
string
required
The customer’s unique identifier (UUID).
string
Customer’s full name (2-30 characters).
string
Valid email address.
string
INDIVIDUAL or BUSINESS.string
Phone country code (max 5 chars, digits only).
string
Phone number (max 15 chars, digits only).
string
Customer’s address (max 100 characters).
string
Customer’s city (max 30 characters).
string
Postcode (4-8 characters, alphanumeric).
string
VAT number (9 digits, optionally prefixed with
GB).curl --request PUT \
--url https://api.atoa.me/api/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}'
import requests
url = "https://api.atoa.me/api/customers/{customerId}"
payload = {
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/customers/{customerId}",
{
method: "PUT",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe Updated",
address: "456 New Street",
city: "Manchester",
}),
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe Updated",
"address" => "456 New Street",
"city" => "Manchester"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers/{customerId}"
payload := strings.NewReader(`{
"fullName": "John Doe Updated",
"address": "456 New Street",
"city": "Manchester"
}`)
req, _ := http.NewRequest("PUT", 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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.put("https://api.atoa.me/api/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe Updated\",\"address\":\"456 New Street\",\"city\":\"Manchester\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe Updated",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "456 New Street",
"city": "Manchester",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "NOT_FOUND",
"message": "Customer not found",
"status": 404,
"errors": []
}
⌘I