Monetate Data API
Data
Post Data for example_schema
code examples curl location globoff 'https //api monetate net/api/data/v1/{retailershortname}/production/data/example schema/' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "schema rows" \[ { "example field1" "" } ] }'\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //api monetate net/api/data/v1/{retailershortname}/production/data/example schema/', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'post', curlopt postfields =>'{ "schema rows" \[ { "example field1" "" } ] }', curlopt httpheader => array( 'accept application/json', 'content type application/json' ), )); $response = curl exec($curl); curl close($curl); echo $response; var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "schema rows" \[ { "example field1" "" } ] }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api monetate net/api/data/v1/{retailershortname}/production/data/example schema/", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));import requests import json url = "https //api monetate net/api/data/v1/{retailershortname}/production/data/example schema/" payload = json dumps({ "schema rows" \[ { "example field1" "" } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) require "uri" require "json" require "net/http" url = uri("https //api monetate net/api/data/v1/{retailershortname}/production/data/example schema/") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "schema rows" \[ { "example field1" "" } ] }) response = https request(request) puts response read body responses // data was posted for the schema and will be made available for targetting { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" { "schema rows" \[ { "example field1" "", "example field2" "", "example field3" false, "example field4" 0, "example field5" "" } ] } }// validation error one or more values being sent was not in the correct format, or a required value was missing { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }// unauthorized 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 { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }// forbidden the request included a token that has been revoked please contact your account administrator to generate a new token { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }// not found the resource you are trying to fetch does not exist, or has been deleted { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }// unknown error please try again or contact your account manager for more information { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }