---
title: Get Schema Details
slug: data-api/get-schema-details
docTags: 
createdAt: 2026-05-15T19:39:37.743Z
---

{
  "id": "lNWzycquLHuWAn-ArCceM",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.monetate.net/api/data/v1/{retailerShortname}/production/schema/{schema-name}/",
    "servers": [
      {
        "url": "https://api.monetate.net/api/data/v1/{retailerShortname}/production/schema/{schema-name}/"
      }
    ],
    "name": "Get Schema Details",
    "description": "Returns a list of all data types and schemas.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "schema-name",
          "type": "string",
          "description": "The name of the Schema."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "row_count",
          "type": "boolean",
          "description": "<p>Adds a field called <code>row_count</code> which is an Integer that is the number of available rows for targeting (there may be an hour delay between uploading data and this value updating)</p>"
        },
        {
          "kind": "optional",
          "name": "latest_upload",
          "type": "boolean",
          "description": "<p>Adds a field called <code>last_file_upload</code> with the format:</p>\n<pre><code>\"last_file_upload\": {\n    \"status\": \"COMPLETE\",\n    \"upload_time\": \"2016-03-24T10:56:52.000000Z\",\n    \"import_start_time\": \"2017-04-04T18:05:34.000000Z\",\n    \"import_end_time\": \"2017-04-04T18:05:35.000000Z\",\n    \"validation_error\": \"\"\n}\n</code></pre>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Token Authentication",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>The Monetate Data API uses Token Authentication, so requests to the Data 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"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A single Schema definition.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "SchemaResponse",
            "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": "<p>Representation of a Schema object.  A schema must have a name, and at least one field.</p>\n<p>Schemata for your account must have unique names.  If you are trying to re-create a Schema that already exists, please delete the old one first.</p>\n<p>Within a Schema, fields must have unique names.</p>\n<p>Exactly one field must be designated as the <code>identifier</code>.  This field will be used to link to a Person ID for testing and targeting.</p>\n<p>Optionally, one field may be designated as a <code>unique_key</code>.  If a Schema defines a unique key, then only one record can exist in your data for a given value of the unique key.  Successive data updates with the same unique key value will replace earlier data updates.  If no unique key is defined, then all data updates will be considered new data and will never replace earlier data.</p>",
                "example": "{\"name\":\"purchase_event\",\"named_identifier\":\"valid_named_identifier\",\"type\":\"event\",\"fields\":{\"purchase_id\":{\"data_type\":\"STRING\",\"unique_key\":true},\"customer_id\":{\"data_type\":\"STRING\",\"identifier\":true},\"purchase_time\":{\"data_type\":\"DATETIME\",\"event_time\":true},\"product_id\":{\"data_type\":\"STRING\"},\"product_category\":{\"data_type\":\"STRING\"},\"product_price\":{\"data_type\":\"NUMBER\"}}}",
                "modelRef": "#/components/schemas/Schema",
                "customType": "Schema",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The name of the Schema.</p>\n<p>Schema names must begin with a letter and contain only letters, numbers, hyphens, and the underscore character.</p>\n<p>Maximum length of 64 characters.</p>",
                    "maxLength": 64,
                    "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string<agil_one | attribute | behavioral_trigger | custom_list | customer_data_privacy | email_metadata | event | inventory | product | product_recommendation | purchase>",
                    "description": "The type of this schema.",
                    "enum": [
                      "agil_one",
                      "attribute",
                      "behavioral_trigger",
                      "custom_list",
                      "customer_data_privacy",
                      "email_metadata",
                      "event",
                      "inventory",
                      "product",
                      "product_recommendation",
                      "purchase"
                    ]
                  },
                  {
                    "name": "fields",
                    "kind": "required",
                    "type": "map",
                    "description": "The fields that define the structure of this Schema.",
                    "example": "",
                    "customType": "map<string, Field>",
                    "schema": []
                  },
                  {
                    "name": "created_date",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "The time the schema was created.",
                    "format": "date-time"
                  },
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "readOnly": true,
                    "description": "Monetate internal identifier for this schema."
                  },
                  {
                    "name": "named_identifier",
                    "kind": "optional",
                    "type": "string",
                    "description": "\nIdentifier Name to associate with the schema.\n\nIdentifier Name must be set for the schema to be used."
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/SchemaResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized.</p>\n<p>The 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.</p>",
        "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": "<p>Not found.</p>\n<p>The resource you are trying to fetch does not exist, or has been deleted.</p>",
        "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": "HQ830QA86LyXFcGVnBnRm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.monetate.net/api/data/v1/{retailerShortname}/production/schema/{schema-name}/ \\\n     --header 'accept: application/json'"
        },
        {
          "id": "fsFzBb98p6XuUK0VQk2N9",
          "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/data/v1/{retailerShortname}/production/schema/{schema-name}/\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "L_Dl4SfldFlDo2vrKyk9Z",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.monetate.net/api/data/v1/{retailerShortname}/production/schema/{schema-name}/\")\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"
        },
        {
          "id": "a2rVcP3U_GWr2kBGcHZBg",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monetate.net/api/data/v1/{retailerShortname}/production/schema/{schema-name}/\"\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": "HQ830QA86LyXFcGVnBnRm"
    },
    "results": {
      "languages": [
        {
          "id": "c5xsE3BSJgwLarW6B_97U",
          "language": "200",
          "code": "// A single Schema definition.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {\n    \"name\": \"\",\n    \"type\": \"\",\n    \"fields\": \"\",\n    \"created_date\": \"\",\n    \"id\": 0,\n    \"named_identifier\": \"\"\n  }\n}"
        },
        {
          "id": "_K_Wd9UQPgV2r-3y6wvfy",
          "language": "401",
          "code": "// Unauthorized.\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": "hMuxBcbwq3RvrS55PS3X_",
          "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": "gyPfh34x0jsrGI5n3dUVs",
          "language": "404",
          "code": "// Not found.\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": "NcjVFlfJ-ElwJNE4vTEYH",
          "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": "c5xsE3BSJgwLarW6B_97U"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}