Monetate Data API
Schema
Get Active Schema
code examples curl location globoff 'https //api monetate net/api/data/v1/{retailershortname}/production/schema/' \\ \ header 'accept application/json' \\ \ header 'content type application/json'\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //api monetate net/api/data/v1/{retailershortname}/production/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 => 'get', 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 requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api monetate net/api/data/v1/{retailershortname}/production/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/schema/" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", 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/") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body responses // a list of schema definitions { "meta" {}, "data" \[ { "name" "", "type" "", "fields" "", "created date" "", "id" 0, "named identifier" "" } ] }// 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" {} }