---
title: List Accounts
slug: metadata-api/list-accounts
description: The authentication and responses for the GET operation to obtain a list of accounts 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": "Y7pRZch6YOFKd1yu9JtSN",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account",
    "servers": [
      {
        "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account"
      }
    ],
    "name": "List Accounts",
    "description": "Return a list of accounts.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "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 list of account definitions.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "AccountListResponse",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMetaPagination",
                "customType": "ResponseMetaPagination",
                "schema": [],
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "ResponseMeta",
                    "description": "",
                    "modelRef": "#/components/schemas/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": "ResponsePagination",
                    "description": "",
                    "modelRef": "#/components/schemas/ResponsePagination",
                    "schema": [
                      {
                        "name": "count",
                        "kind": "optional",
                        "type": "integer",
                        "description": "The number of items returned in this response.",
                        "example": 1
                      },
                      {
                        "name": "next",
                        "kind": "optional",
                        "type": "string",
                        "description": "A URL to the next group of items, if any.",
                        "example": ""
                      },
                      {
                        "name": "previous",
                        "kind": "optional",
                        "type": "string",
                        "description": "A URL to the previous group of items, if any.",
                        "example": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "array",
                "description": "Data payload of this response.",
                "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/AccountListResponse",
            "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": "aO3kLmTOOLknk3dEA-Itt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account \\\n     --header 'accept: application/json'"
        },
        {
          "id": "bpiOmxgvNeDme6Su0JO0M",
          "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',\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": "mmniphOT6FXmdLyIA3nmm",
          "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\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1gunVi-NUw4r_1eBaqwyX",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/account\"\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": "OCOiktNMWiAJpmmRW5GBk",
          "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\")\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": "aO3kLmTOOLknk3dEA-Itt"
    },
    "results": {
      "languages": [
        {
          "id": "3fM1gP26Uv4WyjoPlwH3N",
          "language": "200",
          "code": "// A list of account definitions.\n{\n  \"meta\": {},\n  \"data\": [\n    {\n      \"id\": 0,\n      \"type\": \"\",\n      \"kind\": \"\",\n      \"archived\": false,\n      \"channel\": \"\",\n      \"name\": \"\",\n      \"preview_url\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "qytaqDi5lqqql8F0OZA53",
          "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": "Jbg1cSac44wkQOe14Gmuq",
          "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": "4Wroda5f2_ibUDwyB51_s",
          "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": "l5wFBNoJxmq862R8nWFB1",
          "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": "3fM1gP26Uv4WyjoPlwH3N"
    }
  },
  "children": [
    {
      "id": "Hjcntcocm7jheeMFpRh7E",
      "type": "paragraph",
      "children": [
        {
          "text": "Return a list of accounts."
        }
      ]
    }
  ]
}