Update a customer
PATCH
/customers/{id}
const url = 'https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"tradingName":"Camden Lock Grill","paymentTerms":"prepaid","preferredLocale":"en-GB","paymentTermsDays":1,"kind":"commercial","hireBillingPeriod":"weekly","cylinderCharge":"deposit","rateSetId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","invoiceSchedule":{"mode":"business"},"legalName":"Camden Lock Grill Ltd","contactName":"Priya Shah","email":"orders@camdenlockgrill.co.uk","phone":"07700 900123","notes":"example","accountNumber":"BTL00313","legalHold":true,"surchargeRule":"add","blockNewOrdersWhenUnpaid":true,"blockBookedDeliveriesWhenUnpaid":true,"billingAddressId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "tradingName": "Camden Lock Grill", "paymentTerms": "prepaid", "preferredLocale": "en-GB", "paymentTermsDays": 1, "kind": "commercial", "hireBillingPeriod": "weekly", "cylinderCharge": "deposit", "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "invoiceSchedule": { "mode": "business" }, "legalName": "Camden Lock Grill Ltd", "contactName": "Priya Shah", "email": "orders@camdenlockgrill.co.uk", "phone": "07700 900123", "notes": "example", "accountNumber": "BTL00313", "legalHold": true, "surchargeRule": "add", "blockNewOrdersWhenUnpaid": true, "blockBookedDeliveriesWhenUnpaid": true, "billingAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
tradingName
string
Example
Camden Lock GrillpaymentTerms
string
preferredLocale
A language: en-GB English, ar Arabic, ur Urdu, pa Punjabi (Gurmukhi), hi Hindi, bn Bengali, gu Gujarati, zh-Hans Chinese (Simplified), pl Polish, ro Romanian, es Spanish, fr French, de German.
string | null
paymentTermsDays
integer | null
kind
string
hireBillingPeriod
string | null
cylinderCharge
Deposit: paid once with the cylinder and refunded on return. rent: charged while they keep it, no deposit.
string | null
rateSetId
UUID v7
string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8finvoiceSchedule
legalName
string | null
Example
Camden Lock Grill LtdcontactName
string | null
Example
Priya Shahemail
string | null format: email
Example
orders@camdenlockgrill.co.ukphone
string | null
Example
07700 900123notes
string | null
accountNumber
string | null
Example
BTL00313legalHold
boolean
surchargeRule
string | null
blockNewOrdersWhenUnpaid
boolean
blockBookedDeliveriesWhenUnpaid
boolean
billingAddressId
UUID v7
string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”Updated
Media typeapplication/json
object
accountAccess
object
unpaidInvoices
required
boolean
newOrdersBlocked
required
boolean
deliveriesBlocked
required
boolean
id
required
UUID v7
string format: uuid
tradingName
required
string
accountNumber
string | null
kind
required
string
legalName
required
string | null
contactName
required
string | null
email
required
string | null format: email
phone
required
string | null
paymentTerms
required
string
surchargeRule
string | null
blockNewOrdersWhenUnpaid
boolean
blockBookedDeliveriesWhenUnpaid
boolean
preferredLocale
required
A language: en-GB English, ar Arabic, ur Urdu, pa Punjabi (Gurmukhi), hi Hindi, bn Bengali, gu Gujarati, zh-Hans Chinese (Simplified), pl Polish, ro Romanian, es Spanish, fr French, de German.
string | null
paymentTermsDays
required
integer | null
billingAddressId
required
UUID v7
string | null format: uuid
hireBillingPeriod
required
string | null
cylinderCharge
required
Deposit: paid once with the cylinder and refunded on return. rent: charged while they keep it, no deposit.
string | null
rateSetId
required
UUID v7
string | null format: uuid
invoiceSchedule
hireBilledTo
required
string | null format: date
notes
required
string | null
archivedAt
required
string | null format: date-time
mergedIntoId
required
UUID v7
string | null format: uuid
legalHold
required
boolean
erasedAt
required
string | null format: date-time
contacts
Array<object>
object
id
required
UUID v7
string format: uuid
name
required
string
email
required
string format: email
phone
required
string | null
kind
required
string
relationship
required
string | null
shopperAccounts
Array<object>
object
id
required
UUID v7
string format: uuid
email
required
string
verified
required
boolean
lastSignInAt
required
string | null format: date-time
twoFactor
required
boolean
role
required
string
shopperInvitations
Array<object>
object
id
required
UUID v7
string format: uuid
email
required
string
role
required
string
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "tradingName": "Camden Lock Grill", "accountNumber": "BTL00313", "kind": "commercial", "legalName": "Camden Lock Grill Ltd", "contactName": "Priya Shah", "email": "orders@camdenlockgrill.co.uk", "phone": "07700 900123", "paymentTerms": "prepaid", "surchargeRule": "add", "preferredLocale": "en-GB", "billingAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "hireBillingPeriod": "weekly", "cylinderCharge": "deposit", "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "invoiceSchedule": { "mode": "business" }, "mergedIntoId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "contacts": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "phone": "07700 900123", "kind": "normal", "relationship": "Accounts" } ], "shopperAccounts": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "role": "manager" } ], "shopperInvitations": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "role": "manager" } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member of that tenant
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not found
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}