---
title: Get Account
slug: metadata-api/get-account
description: The authentication, path parameter, and responses for the GET operation to obtain account information in the Monetate Metadata API
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-06-26T17:38:51.912Z
---

{
  "id": "zSqcB6owT1ljxioXzs8p4",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}",
    "servers": [
      {
        "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}"
      }
    ],
    "name": "Get Account",
    "description": "Returns information about a single account.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "account-id",
          "type": "integer",
          "description": "The identifier of a account."
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "TokenAuthentication",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>The Monetate Metadata API uses Token Authentication. Requests to the Metadata API must include a valid, active authentication token. Include an <code>Authorization</code> header with the value <code>Token [token_string]</code> with every request. See <a href=\"https://developer.monetate.com/auth-api\" target=\"_blank\">Auth API</a> for information on obtaining the <em>token_string</em>.</p>",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A single account definition.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "AccountResponse",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "Representation of an Experience object.",
                "example": "{\"id\":123456,\"type\":\"production\",\"kind\":\"retail\",\"archived\":true,\"channel\":\"a-b6206def/p/demo.website.com\",\"name\":\"demo.website.com\",\"preview_url\":\"http://demo.website.com?__store=one\"}",
                "modelRef": "#/components/schemas/Account",
                "customType": "Account",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "readOnly": true,
                    "description": "Monetate internal identifier for accounts.",
                    "example": 0
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The instance type of account (production, development, etc.).",
                    "example": ""
                  },
                  {
                    "name": "kind",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The kind of account (retail, travel, etc.).",
                    "example": ""
                  },
                  {
                    "name": "archived",
                    "kind": "optional",
                    "type": "boolean",
                    "readOnly": true,
                    "description": "Whether the account has been archived.",
                    "example": ""
                  },
                  {
                    "name": "channel",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The instance name, instance type identifier, and account domain concatenated together as a single token.",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The name of the account.",
                    "example": ""
                  },
                  {
                    "name": "preview_url",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The account preview token URL as defined in the UI.",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/AccountResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized. \n\nThe request did not include a token, or the token provided was invalid. Please ensure that your token is correct and that the Authorization header is properly formatted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden.\n\nThe request included a token that has been revoked. Please contact your account administrator to generate a new token.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found.\n\nThe resource you are trying to fetch does not exist, or has been deleted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Unknown error.\n\nPlease try again or contact your account manager for more information.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "DXQJsHFv1fkoqiBk4ySBe",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "h7kjIgTjKkuKwYkeHO3un",
          "language": "php",
          "label": "PHP",
          "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n   CURLOPT_URL => 'https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}',\n   CURLOPT_RETURNTRANSFER => true,\n   CURLOPT_ENCODING => '',\n   CURLOPT_MAXREDIRS => 10,\n   CURLOPT_TIMEOUT => 0,\n   CURLOPT_FOLLOWLOCATION => true,\n   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n   CURLOPT_CUSTOMREQUEST => 'GET',\n   CURLOPT_HTTPHEADER => array(\n      'accept: application/json',\n      'content-type: application/json'\n   ),\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n"
        },
        {
          "id": "8fW322yCZnNLSTbEeE8el",
          "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(\"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "cmHFY6WakVh07F9gzwWc4",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}\"\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"
        },
        {
          "id": "v_C2ABmtsu1IMB7l-6qtD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account/{account-id}\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        }
      ],
      "selectedLanguageId": "DXQJsHFv1fkoqiBk4ySBe"
    },
    "results": {
      "languages": [
        {
          "id": "QAHP806GNLzpmHBYIap2s",
          "language": "200",
          "code": "// A single account definition.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {\n    \"id\": 0,\n    \"type\": \"\",\n    \"kind\": \"\",\n    \"archived\": false,\n    \"channel\": \"\",\n    \"name\": \"\",\n    \"preview_url\": \"\"\n  }\n}"
        },
        {
          "id": "E64hcpjGRKcv4jD8LvCev",
          "language": "401",
          "code": "// Unauthorized. \n\nThe request did not include a token, or the token provided was invalid. Please ensure that your token is correct and that the Authorization header is properly formatted.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "cDaeKvnoIYE7wdT9-AeeZ",
          "language": "403",
          "code": "// Forbidden.\n\nThe request included a token that has been revoked. Please contact your account administrator to generate a new token.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "kJVM6H0rQpqqPx1r3i5z-",
          "language": "404",
          "code": "// Not found.\n\nThe resource you are trying to fetch does not exist, or has been deleted.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "5BEZJQTl3RXgOdrXb2hZr",
          "language": "500",
          "code": "// Unknown error.\n\nPlease try again or contact your account manager for more information.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        }
      ],
      "selectedLanguageId": "QAHP806GNLzpmHBYIap2s"
    }
  },
  "children": [
    {
      "id": "EaKL0vIdWiYO1ED_o4Loe",
      "type": "paragraph",
      "children": [
        {
          "text": "Returns information about a single account."
        }
      ]
    }
  ]
}