Deletes addresses from a customer’s address list. Identify the customer by ID or login and pass the address IDs in CustomerAddress_IDs. The response says how many addresses were deleted.
Before you begin#
- The API token needs
CustomerAddressList_Delete, either assigned directly under Functions or through a group. See Create an API token. - Requests must be signed if the token requires it. See Make a signed request with HMAC.
- You need the customer’s
Customer_ID,Customer_LoginorEdit_Customer, and the IDs of the addresses.CustomerAddressList_Load_Queryreturns them.
Example requests#
Delete a customer address#
Deletes the address with ID 26 from the customer.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CustomerAddressList_Delete",
"Customer_ID": "{{Customer_ID}}",
"CustomerAddress_IDs": 26
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_idedit_customercustomer_login |
Number String String |
The customer id The customer login The customer login |
|
customeraddress_ids |
Array | Yes | Array of the address IDs to be deleted |
Example response#
{
"success": 1,
"processed": 1
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
processed |
Number | Number of customer addresses deleted |
Related functions#
| Function | Use it to |
|---|---|
CustomerAddressList_Load_Query |
Find the address IDs |
CustomerAddress_Delete |
Delete a single address |
CustomerAddress_Insert |
Add an address to a customer |
CustomerAddress_Update |
Change a saved address |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Customers > CustomerAddressList_Delete. See Set Up Postman.