---
title: Retrieve address
slug: docs/demo/retrieve-address
description: Learn how to make a GET request to a fictional API endpoint using Curl command with this code example. Ensure seamless communication by including headers for accepting and sending JSON data. Enhance your programming skills now.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "fyG3bVEqYKup6RDwWbqbo",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/addresses/{addressReference}",
    "name": "Retrieve address",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": "The account reference identifier."
        },
        {
          "kind": "required",
          "name": "addressReference",
          "type": "string",
          "description": "The address reference."
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "addressIdentifier",
                "type": "string",
                "example": "",
                "description": "The address identifier"
              },
              {
                "kind": "optional",
                "name": "houseName",
                "type": "string",
                "example": "",
                "description": "House name"
              },
              {
                "kind": "optional",
                "name": "houseNumber",
                "type": "string",
                "example": "",
                "description": "House number"
              },
              {
                "kind": "optional",
                "name": "street",
                "type": "string",
                "example": "",
                "description": "Street name"
              },
              {
                "kind": "optional",
                "name": "townCity",
                "type": "string",
                "example": "",
                "description": "Name of town city"
              },
              {
                "kind": "optional",
                "name": "district",
                "type": "string",
                "example": "",
                "description": "Name of district"
              },
              {
                "kind": "optional",
                "name": "state",
                "type": "string",
                "example": "",
                "description": "State"
              },
              {
                "kind": "optional",
                "name": "county",
                "type": "string",
                "example": "",
                "description": "County"
              },
              {
                "kind": "optional",
                "name": "postCode",
                "type": "string",
                "example": "",
                "description": "Post code"
              },
              {
                "kind": "optional",
                "name": "country",
                "type": "string",
                "example": "",
                "description": "Country"
              },
              {
                "kind": "optional",
                "name": "isDefault",
                "type": "boolean",
                "example": "",
                "description": "Is default"
              },
              {
                "kind": "optional",
                "name": "defaultInvoice",
                "type": "boolean",
                "example": "",
                "description": "Is default invoice address"
              },
              {
                "kind": "optional",
                "name": "defaultShipping",
                "type": "boolean",
                "example": "",
                "description": "Is default shipping address"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v3.AddressResource",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v3.AddressResource",
            "isExpanded": true,
            "description": "Address base details"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "•Account cannot be found\r\n            <br />•The ServiceGroup specified does not exist.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to retrieve a specific address from the eSuite platform",
    "examples": {
      "languages": [
        {
          "id": "80fZwUcNGMSfsVD951rFH",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/addresses/{addressReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "aXFZVPG405g7rb5Zhfp9b",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/addresses/{addressReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4wl5broQAP92I0lEDXst7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/addresses/{addressReference}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "FXOcxtyHcDCReGP7GYUQo",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/addresses/{addressReference}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "80fZwUcNGMSfsVD951rFH"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"addressIdentifier\": \"\",\n  \"houseName\": \"\",\n  \"houseNumber\": \"\",\n  \"street\": \"\",\n  \"townCity\": \"\",\n  \"district\": \"\",\n  \"state\": \"\",\n  \"county\": \"\",\n  \"postCode\": \"\",\n  \"country\": \"\",\n  \"isDefault\": false,\n  \"defaultInvoice\": false,\n  \"defaultShipping\": false\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// •Account cannot be found\r\n            •The ServiceGroup specified does not exist.\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}