Archive a customer
DELETE
/customers/{id}
const url = 'https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'DELETE', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Soft delete. The customer stays resolvable for historic invoices.
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
Responses
Section titled “Responses”Archived
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 or already archived
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" } ]}