Skip to main content
PUT
/
public
/
v1
/
customers
/
{customer_id}
/
Update customer
curl --request PUT \
  --url https://api.dualentry.com/public/v1/customers/{customer_id}/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "custom_fields": [
    {}
  ],
  "name": "<string>",
  "unique_id": "<string>",
  "email": "<string>",
  "address": "<string>",
  "country": "<string>",
  "phone": "<string>",
  "website": "<string>",
  "full_address": {
    "street": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "state": "",
    "country": "",
    "second_line": "",
    "name": "<string>"
  },
  "shipping_address": {
    "street": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "state": "",
    "country": "",
    "second_line": "",
    "name": "<string>"
  }
}
'
import requests

url = "https://api.dualentry.com/public/v1/customers/{customer_id}/"

payload = {
"custom_fields": [{}],
"name": "<string>",
"unique_id": "<string>",
"email": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>",
"website": "<string>",
"full_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"shipping_address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_fields: [{}],
name: '<string>',
unique_id: '<string>',
email: '<string>',
address: '<string>',
country: '<string>',
phone: '<string>',
website: '<string>',
full_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
shipping_address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
}
})
};

fetch('https://api.dualentry.com/public/v1/customers/{customer_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dualentry.com/public/v1/customers/{customer_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'custom_fields' => [
[

]
],
'name' => '<string>',
'unique_id' => '<string>',
'email' => '<string>',
'address' => '<string>',
'country' => '<string>',
'phone' => '<string>',
'website' => '<string>',
'full_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'shipping_address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.dualentry.com/public/v1/customers/{customer_id}/"

payload := strings.NewReader("{\n \"custom_fields\": [\n {}\n ],\n \"name\": \"<string>\",\n \"unique_id\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"<string>\",\n \"website\": \"<string>\",\n \"full_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n }\n}")

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

req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.dualentry.com/public/v1/customers/{customer_id}/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custom_fields\": [\n {}\n ],\n \"name\": \"<string>\",\n \"unique_id\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"<string>\",\n \"website\": \"<string>\",\n \"full_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dualentry.com/public/v1/customers/{customer_id}/")

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

request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_fields\": [\n {}\n ],\n \"name\": \"<string>\",\n \"unique_id\": \"<string>\",\n \"email\": \"<string>\",\n \"address\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": \"<string>\",\n \"website\": \"<string>\",\n \"full_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"shipping_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "address": "<string>",
  "country": "<string>",
  "name": "<string>",
  "unique_id": "<string>",
  "website": "<string>",
  "email": "<string>",
  "customer_type": "<string>",
  "is_active": true,
  "phone": "<string>",
  "record_status": "<string>",
  "is_taxable": true,
  "default_tax_code": "<string>",
  "tax_registration_number": "<string>",
  "custom_fields": [],
  "created_by": {
    "actor_type": "<string>",
    "email": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "timestamp": "2023-11-07T05:31:56Z"
  },
  "updated_by": {
    "actor_type": "<string>",
    "email": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "timestamp": "2023-11-07T05:31:56Z"
  },
  "approval_status": "<string>",
  "next_approvers": [
    {
      "id": 123,
      "first_name": "<string>",
      "last_name": "<string>",
      "email": "<string>",
      "full_name": "<string>",
      "avatar_url": "<string>"
    }
  ],
  "rejected_by": {
    "id": 123,
    "first_name": "<string>",
    "last_name": "<string>",
    "email": "<string>",
    "full_name": "<string>",
    "rejection_reason": "<string>"
  },
  "shipping_address": {
    "street": "<string>",
    "city": "<string>",
    "postal_code": "<string>",
    "state": "",
    "country": "",
    "second_line": "",
    "name": "<string>"
  }
}
{
"errors": {},
"success": false
}
{
"errors": {},
"success": false
}
{
"errors": {},
"success": false
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

customer_id
integer
required

Body

application/json

Partial update payload for PUT /public/customers/{id}/.

Every field is optional: send only the fields you want to change. Unset fields are left untouched on the existing record. This is the partial-update semantic clients expect from a modern REST API.

custom_fields
Custom Fields · object[] | null
name
string | null
unique_id
string | null
Required string length: 1 - 64
email
string | null
address
string | null
country
string | null
phone
string | null
Maximum string length: 64
Pattern: ^[0-9\s\+\-\.\(\)]*$
website
string | null
full_address
AddressSchemaIn · object | null
shipping_address
AddressSchemaIn · object | null

Response

OK

id
integer
required
address
string
required
country
string
required
name
string
required
unique_id
string | null
required
website
string
required
email
string
required
customer_type
string
required
is_active
boolean
required
phone
string
required
record_status
string
required
is_taxable
boolean
required
default_tax_code
string
required
tax_registration_number
string
required
default_currency
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
YER,
ZAR,
ZMW,
ZWL
custom_fields
CustomFieldValuePairOutputSchema · object[]
created_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

updated_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

approval_status
string | null
next_approvers
ApproverDictSchema · object[] | null
rejected_by
RejectedBySchema · object | null

Schema for rejector information including rejection reason.

shipping_address
AddressSchemaIn · object | null
Last modified on July 13, 2026