---
title: Gets the contacts, by paging.
slug: commerce-connect-15/service-api/kHkN-gets-the-contacts-by-paging
docTags: 
createdAt: 2026-10-09T17:33:30.457Z
---

{
  "id": "9ZofiNtANaNhI5fMCw4Vk",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}",
    "servers": [
      {
        "url": "http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}"
      },
      {
        "url": "https://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}"
      }
    ],
    "name": "Gets the contacts, by paging.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "startIndex",
          "type": "integer<int32>",
          "description": "The start index.",
          "format": "int32"
        },
        {
          "kind": "required",
          "name": "recordsToRetrieve",
          "type": "integer<int32>",
          "description": "Number of contacts to get.",
          "format": "int32"
        }
      ],
      "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": "Return the contacts.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "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
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "45HmQxr_N-ZFWlvVu5VZW",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "ebgNHU9NV2LcqgZK3EwuH",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lyvsJBx3GlAUoOY6wU672",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "pwBGmHUnektIUtDKppxt-",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:64424/episerverapi/commerce/customers/contact/{startIndex}/{recordsToRetrieve}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "45HmQxr_N-ZFWlvVu5VZW"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Return the contacts.\n[\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  }\n]"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}