Skip to content

Delete Customer Address

Remove an address from the customer's address book.

Endpoint

DELETE /api/shop/customer-addresses/{addressId}

URL Parameters

ParameterTypeRequiredDescription
addressIdintegerYesAddress ID to delete

Request Headers

HeaderRequiredDescription
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Response

204 No Content with an empty body. There is no confirmation payload — the status is the confirmation.

Deletion Behaviour

  • The address row is removed outright and cannot be recovered.
  • Deleting the default address does not promote another one. The customer is left with no default until one is set explicitly, so re-set it with Update Address if the flow depends on a default.
  • The last remaining address can be deleted; an empty address book is allowed.
  • Addresses already captured on an order are snapshots stored with that order, so past orders keep their address after this call.
  • An ID belonging to another customer answers 404, the same as an ID that does not exist — the endpoint never confirms that someone else's address is real.

Use Cases

  • Address-book "remove" button — call with the row's id, then re-render from Get Customer Addresses; the response body carries nothing to render from.
  • Cleaning up after a checkout — the addresses saved during checkout carry an addressType of cart_billing or cart_shipping, so they can be pruned separately from the shopper's own entries.

Best Practices

  • Re-fetch the list after deleting — a 204 returns no data, so the client cannot patch its state from the response.
  • Check whether the deleted row was the default — nothing is promoted in its place, and a checkout that assumes a default will find none.
  • Treat 404 as "not yours or not there" — do not branch on it as proof the address never existed.

Released under the MIT License.