Schema

Schema

Shopping

Schema is a cloud ecommerce platform that offers a wide range of standard features designed for flexibility and performance. The API can be extended and customized to fit the varying needs of creative online retailers.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Schema

🚀 Quick Start Examples

Schema Javascript Examplejavascript
// Schema API Example
const response = await fetch('https://schema.io/docs', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Introduction to Schema.io API Docs

Schema.io is a platform that allows you to build and manage your graph data. The Schema.io API Docs provide documentation and examples to help developers build applications using the Schema.io API.

In this blog post, we will explore some of the examples provided in the documentation and show how to use them in JavaScript.

Example 1: Creating a Node

To create a new node in a Schema graph, you send a POST request to the /node endpoint, specifying the label and properties of the node. Here is an example of how to do this in JavaScript using the fetch API:

fetch('https://api.schema.io/node', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer <API-KEY>'
  },
  body: JSON.stringify({
    label: 'person',
    properties: {
      name: 'Alice',
      age: 30
    }
  })
})

In this example, we are creating a new node with the label person and two properties: name and age. We also include an Authorization header with our API key.

Example 2: Querying Nodes

To query nodes from a Schema graph, you send a GET request to the /node endpoint, specifying the label and properties you want to filter by. Here is an example of how to do this in JavaScript:

fetch('https://api.schema.io/node?label=person&name=Alice', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <API-KEY>'
  }
})

In this example, we are querying for nodes with the label person and the name property equal to Alice. We use a GET request and include our API key in the Authorization header.

Conclusion

The Schema.io API Docs provide a useful resource for developers building applications that use the Schema.io API. In this blog post, we demonstrated how to create and query nodes in a Schema graph using JavaScript. There are many more examples and endpoints available in the API documentation, so be sure to check it out for more information.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

May 31Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 2904008001440Minutes
Online
Offline

Related APIs in Shopping