Everything you need to build with NormaTrack API
Test queries and mutations
Complete API reference
Manage your data
Source & examples
Modern, flexible API for querying and mutating data with a single endpoint.
POST /api/graphqlLearn more →Strongly typed schema including Company, Product, Variant, Material, and more.
• Company
• Product
• Material
Seamlessly integrated with Prisma ORM and SQLite database.
• Auto-generated types
• Type-safe queries
• Built-in migrations
fetchconst query = `{
getStatistics {
totalProducts
totalVariants
averageSustainabilityScore
}
}`;
const response = await fetch('/api/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query })
});
const data = await response.json();
console.log(data);requestsimport requests
import json
query = """{
products(take: 10) {
id
name
brand
sustainabilityScore
}
}"""
response = requests.post(
'http://localhost:3000/api/graphql',
json={"query": query},
headers={"Content-Type": "application/json"}
)
data = response.json()
print(json.dumps(data, indent=2))clicurl -X POST http://localhost:3000/api/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "{ materials(take: 5) { id name supplier carbonFootprint } }"
}'