---
title: Post Data for example_schema 
slug: data-api/post-data-for-exampleschema
docTags: 
createdAt: 2026-05-15T19:39:37.743Z
---

{
  "id": "6XEWhGNCfCxdhGlI-pacK",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/",
    "servers": [
      {
        "url": "https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/"
      }
    ],
    "name": "Post Data for example_schema ",
    "description": "<p>Creates new data records within the schema <code>example_schema</code>.</p>\n<p>If your request contains a unique key that matches a record already received by Monetate, the record is updated with the latest data.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "<p>Representation of the <code>fields</code> for this Schema.</p>",
          "customType": "example_schemaDataRequest",
          "schema": [
            {
              "name": "schema_rows",
              "kind": "required",
              "type": "array",
              "description": "",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "example_field1",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "example_field2",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "description": "",
                  "format": "date-time"
                },
                {
                  "name": "example_field3",
                  "kind": "optional",
                  "type": "boolean",
                  "description": ""
                },
                {
                  "name": "example_field4",
                  "kind": "optional",
                  "type": "number",
                  "description": ""
                },
                {
                  "name": "example_field5",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "_sent_time",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "The time the request was sent",
              "format": "date-time"
            }
          ],
          "modelRef": "#/components/schemas/example_schemaDataRequest",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "schema_rows",
                  "kind": "required",
                  "type": "array",
                  "description": "",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "example_field1",
                      "kind": "required",
                      "type": "string",
                      "description": ""
                    },
                    {
                      "name": "example_field2",
                      "kind": "optional",
                      "type": "string<date-time>",
                      "description": "",
                      "format": "date-time"
                    },
                    {
                      "name": "example_field3",
                      "kind": "optional",
                      "type": "boolean",
                      "description": ""
                    },
                    {
                      "name": "example_field4",
                      "kind": "optional",
                      "type": "number",
                      "description": ""
                    },
                    {
                      "name": "example_field5",
                      "kind": "optional",
                      "type": "string",
                      "description": ""
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/example_schemaData",
              "customType": "example_schemaData"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "_sent_time",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "description": "The time the request was sent",
                  "format": "date-time"
                }
              ]
            }
          ],
          "complexType": "allOf",
          "isExpanded": true
        }
      ],
      "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": "201",
        "description": "Data was posted for the schema and will be made available for targetting.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "example_schemaDataResponse",
            "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 the <code>fields</code> for this Schema.</p>",
                "example": "{\"schema_rows\":[{\"example_field1\":\"example string\",\"example_field2\":\"2016-09-30T12:10:45.000145Z\",\"example_field3\":true,\"example_field4\":10.5,\"example_field5\":\"example,secondexample\"}]}",
                "modelRef": "#/components/schemas/example_schemaData",
                "customType": "example_schemaData",
                "schema": [
                  {
                    "name": "schema_rows",
                    "kind": "required",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "example_field1",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "example_field2",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "format": "date-time"
                      },
                      {
                        "name": "example_field3",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "example_field4",
                        "kind": "optional",
                        "type": "number",
                        "description": ""
                      },
                      {
                        "name": "example_field5",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/example_schemaDataResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Validation error.</p>\n<p>One or more values being sent was not in the correct format, or a required value was missing.</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": "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": "ij_X2VikDvPp0BguYNyrx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/ \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"schema_rows\": [\n     {\n     \"example_field1\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "DJKR4KesxGfSQRE1yOpCn",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"schema_rows\": [\n      {\n         \"example_field1\": \"\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "EjXntk6EeyXlFRhbV7nkB",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"schema_rows\": [\n      {\n         \"example_field1\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "dhmp5KmNfAN4_5R3uINSJ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monetate.net/api/data/v1/{retailerShortname}/production/data/example_schema/\"\n\npayload = json.dumps({\n   \"schema_rows\": [\n      {\n         \"example_field1\": \"\"\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ij_X2VikDvPp0BguYNyrx"
    },
    "results": {
      "languages": [
        {
          "id": "ZYQ0GYL2coa5-i71qbwJE",
          "language": "201",
          "code": "// Data was posted for the schema and will be made available for targetting.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {\n    \"schema_rows\": [\n      {\n        \"example_field1\": \"\",\n        \"example_field2\": \"\",\n        \"example_field3\": false,\n        \"example_field4\": 0,\n        \"example_field5\": \"\"\n      }\n    ]\n  }\n}"
        },
        {
          "id": "wfXnAD08jHmFix723NvVG",
          "language": "400",
          "code": "// Validation error.\nOne or more values being sent was not in the correct format, or a required value was missing.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "unCquOat_2J6lVhW_UkSQ",
          "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": "KoNmXzrABODDLTRM9BZ1v",
          "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": "ESES12W1d81ZCc1sXdgg2",
          "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": "MYz7g3ZRRlrdXccAepzaO",
          "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": "ZYQ0GYL2coa5-i71qbwJE"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}