Method Remove customer account using shopify API

Highlighted
Shopify Partner
21 2 4

Dear all,

I am working new online store for client, in which i need to provide the option like  "Delete user account" for customer to delete their account.

I have used following function to delete it. But it was not deleting the account. Instead it just displaying the .json file in page as shown in image.  Please help me to resolve this issue. 

 

Thanks & Regards,

Pon maheswaran K

JSON OUTPUTJSON OUTPUT

 

<form
  class="address-delete-form"
  method="delete"
  action="/admin/api/2019-04/customers/{{customer.id}}.json"
  data-confirm-message="{{ 'customer.addresses.delete_confirm' | t }}"
>
  <input type="hidden" name="_method" value="delete" />
  <button type="submit">
    {{ 'customer.addresses.delete' | t }}
  </button>
</form> 
0 Likes