---
title: Updates the contact.
slug: commerce-connect-15/service-api/GMif-updates-the-contact
docTags: 
createdAt: 2026-10-09T17:33:30.457Z
---

{
  "id": "MNKBND-Byvf4OXLuys9lP",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "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": "Updates the contact.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "contactId",
          "type": "string<uuid>",
          "description": "Contact ID.",
          "format": "uuid"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "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
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "The contact is saved.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "If the contact model is not valid.",
        "jsonExample": "",
        "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": "4q4OoxsRwiDBOgz4KhGcQ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url http://localhost:64424/episerverapi/commerce/customers/contact/{contactId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "brRhLGDsSCN8tI1Q8NDCX",
          "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: 'PUT',\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": "pWG4yYOtDVBa4CEd-rw8-",
          "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::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "n_ODwi4KrtlUqMNZHTHLw",
          "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(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "4q4OoxsRwiDBOgz4KhGcQ"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// The contact is saved.\n{}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// If the contact model is not valid.\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// If contact does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}