Monetate Data API
Schema

Update an Existing Schema

code examples curl location globoff request patch 'https //api monetate net/api/data/v1/{retailershortname}/production/schema/{schema name}/' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "fields" "" }'\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //api monetate net/api/data/v1/{retailershortname}/production/schema/{schema name}/', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'patch', curlopt postfields =>'{ "fields" "" }', 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({ "fields" "" }); var requestoptions = { method 'patch', headers myheaders, body raw, redirect 'follow' }; fetch("https //api monetate net/api/data/v1/{retailershortname}/production/schema/{schema name}/", 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/schema/{schema name}/" payload = json dumps({ "fields" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("patch", 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/schema/{schema name}/") https = net http new(url host, url port) https use ssl = true request = net http patch new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "fields" "" }) response = https request(request) puts response read body responses // schema patched content is the definition of the modified schema { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" { "fields" "" } }// 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" {} }// unknown error please try again or contact your account manager for more information { "meta" { "code" 200, "warnings" \[ {} ], "errors" \[ {} ] }, "data" {} }