---
title: Deletes the contact.
slug: commerce-connect-15/service-api/ydiw-deletes-the-contact
docTags: 
createdAt: 2026-10-09T17:33:31.916Z
---

{
  "id": "8Ic9LUIYqBSyYRNzAcPjB",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "http://localhost:64424/episerverapi/commerce/customers/contact/{contactId}",
    "servers": [
      {
        "url": "http://localhost:64424/episerverapi/commerce/customers/contact/{contactId}"
      },
      {
        "url": "https://localhost:64424/episerverapi/commerce/customers/contact/{contactId}"
      }
    ],
    "name": "Deletes the contact.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "contactId",
          "type": "string<uuid>",
          "description": "<p>Contact ID (GUID).</p>",
          "format": "uuid"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Contact is deleted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Contact model.",
            "customType": "EPiServer.ServiceApi.Commerce.Models.Order.ContactModel",
            "schema": [
              {
                "name": "PrimaryKeyId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "<p>Contact ID (GUID).</p>",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid"
              },
              {
                "name": "Addresses",
                "kind": "optional",
                "type": "array",
                "description": "Contacts addresses.",
                "modelRef": "#/components/schemas/EPiServer.ServiceApi.Commerce.Models.Order.AddressModel",
                "customType": "EPiServer.ServiceApi.Commerce.Models.Order.AddressModel[]",
                "schema": [
                  {
                    "name": "AddressId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "<p>Address ID (GUID).</p>",
                    "example": "00000000-0000-0000-0000-000000000000",
                    "format": "uuid"
                  },
                  {
                    "name": "Modified",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "Last modified date.",
                    "format": "date-time"
                  },
                  {
                    "name": "Name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Address name."
                  },
                  {
                    "name": "FirstName",
                    "kind": "optional",
                    "type": "string",
                    "description": "First name."
                  },
                  {
                    "name": "LastName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Last name."
                  },
                  {
                    "name": "CountryName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Country name."
                  },
                  {
                    "name": "CountryCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Country code."
                  },
                  {
                    "name": "City",
                    "kind": "optional",
                    "type": "string",
                    "description": "City."
                  },
                  {
                    "name": "PostalCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Postal code (Zip code).</p>"
                  },
                  {
                    "name": "Line1",
                    "kind": "optional",
                    "type": "string",
                    "description": "Address line 1."
                  },
                  {
                    "name": "Line2",
                    "kind": "optional",
                    "type": "string",
                    "description": "Address line 2."
                  },
                  {
                    "name": "RegionName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Region name."
                  },
                  {
                    "name": "RegionCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Region code."
                  },
                  {
                    "name": "Email",
                    "kind": "optional",
                    "type": "string",
                    "description": "Email."
                  },
                  {
                    "name": "ShippingDefault",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Check if this is default shipping address. This property is misleading and has been obsolete. Use IsShippingAddress instead."
                  },
                  {
                    "name": "BillingDefault",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Check if this is default billing address. This property is misleading and has been obsolete. Use IsBillingAddress instead."
                  },
                  {
                    "name": "IsShippingAddress",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Flag to indicate if this is a shipping address or not."
                  },
                  {
                    "name": "IsBillingAddress",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Flag to indicate if this is a billing address or not."
                  },
                  {
                    "name": "DaytimePhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Daytime phone number."
                  },
                  {
                    "name": "EveningPhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Evening phone number."
                  },
                  {
                    "name": "Organization",
                    "kind": "optional",
                    "type": "string",
                    "description": "Organization name."
                  },
                  {
                    "name": "AddressType",
                    "kind": "optional",
                    "type": "array",
                    "description": "Address type.",
                    "example": "",
                    "itemType": "integer",
                    "customType": "integer[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "FirstName",
                "kind": "optional",
                "type": "string",
                "description": "First name."
              },
              {
                "name": "LastName",
                "kind": "optional",
                "type": "string",
                "description": "Last name."
              },
              {
                "name": "Email",
                "kind": "optional",
                "type": "string",
                "description": "Email."
              },
              {
                "name": "RegistrationSource",
                "kind": "optional",
                "type": "string",
                "description": "Registration source."
              }
            ],
            "modelRef": "#/components/schemas/EPiServer.ServiceApi.Commerce.Models.Order.ContactModel",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "If contact does not exist.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "MqrKUFqlpS7QbiFrSPAS2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url http://localhost:64424/episerverapi/commerce/customers/contact/{contactId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "VvmdjjZRQF3utlpFlOzmZ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:64424/episerverapi/commerce/customers/contact/{contactId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "nh18fo3wK_Mp0FWCpw3GO",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:64424/episerverapi/commerce/customers/contact/{contactId}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "n6vUxrGceEi5f3rGuHsJb",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:64424/episerverapi/commerce/customers/contact/{contactId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "MqrKUFqlpS7QbiFrSPAS2"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Contact is deleted.\n{\n  \"PrimaryKeyId\": \"00000000-0000-0000-0000-000000000000\",\n  \"Addresses\": [\n    {\n      \"AddressId\": \"00000000-0000-0000-0000-000000000000\",\n      \"Modified\": \"\",\n      \"Name\": \"\",\n      \"FirstName\": \"\",\n      \"LastName\": \"\",\n      \"CountryName\": \"\",\n      \"CountryCode\": \"\",\n      \"City\": \"\",\n      \"PostalCode\": \"\",\n      \"Line1\": \"\",\n      \"Line2\": \"\",\n      \"RegionName\": \"\",\n      \"RegionCode\": \"\",\n      \"Email\": \"\",\n      \"ShippingDefault\": false,\n      \"BillingDefault\": false,\n      \"IsShippingAddress\": false,\n      \"IsBillingAddress\": false,\n      \"DaytimePhoneNumber\": \"\",\n      \"EveningPhoneNumber\": \"\",\n      \"Organization\": \"\",\n      \"AddressType\": [\n        0\n      ]\n    }\n  ],\n  \"FirstName\": \"\",\n  \"LastName\": \"\",\n  \"Email\": \"\",\n  \"RegistrationSource\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// If contact does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}