deleteCustomerAddress mutation

Use the deleteCustomerAddress mutation to delete the specified customer address.

To return or modify information about a customer, Magento recommends you use customer tokens in the header of your GraphQL calls. However, you also can use session authentication.

Syntax

mutation: {deleteCustomerAddress(id: Int!) {Boolean}}

Example usage

The following call deletes a customer’s address.

Request

1
2
3
mutation {
  deleteCustomerAddress(id: 4)
}

Response

1
2
3
4
5
{
  "data": {
    "deleteCustomerAddress": true
  }
}

Input attributes

The deleteCustomerAddress mutation requires the following input:

Attribute Data Type Description
id Int! The ID assigned to the address object

Output attributes

The deleteCustomerAddress mutation returns a Boolean value that indicates whether the operation was successful.