Andrew Luke
09/04/2025, 3:47 PMCeligo AI
09/04/2025, 3:47 PMAI generated answer (using internal Slack threads):To remove a customer address using the REST API, you would need to use the PATCH method on the /customer/id endpoint. The addressbook is a keyed sublist with the addressId as the key. You would need to GET the AddressBook(List), iterate, and delete an address record there. Here is a general idea of how you might structure your PATCH request:
json
{
"addressbookList": {
"addressbook": [
{
"addr1": "123 Main St",
"addr2": null,
"addr3": null,
"addressee": "John Doe",
"addressId": 123,
"city": "Anytown",
"country": "US",
"defaultBilling": true,
"defaultShipping": true,
"isResidential": false,
"label": "Work",
"override": false,
"state": "NY",
"zip": "12345"
}
],
"replaceAll": true
}
}
In this example, the address with addressId 123 is being replaced. Any addresses not included in the addressbook array will be removed. The replaceAll attribute is set to true, which means all existing addresses will be replaced by the ones in the addressbook array.
Please note that this operation should be done with caution, especially if there are transactions affiliated with the customer. Removing an address that is used in transactions can cause issues.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
09/04/2025, 3:48 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.902892947
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.853210449
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.852783203
Celigo AI
09/04/2025, 3:48 PM