StateSet API
Enterprise-grade REST API powering intelligent commerce. 50+ endpoints for complete order lifecycle management, built with Rust for maximum performance and reliability.
API Resources
Comprehensive REST endpoints for every aspect of your commerce operations
Orders
Complete order lifecycle management with line items, notes, and fulfillment tracking
Endpoints
/orders/orders/orders/{id}/orders/{id}/orders/{id}/orders/{id}/line-itemsFeatures
Authentication
Multiple authentication methods to suit your integration needs
JWT Authentication
Secure token-based authentication for user sessions
// Login to get JWT token
const response = await fetch('https://api.stateset.com/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'secure_password'
})
});
const { access_token, refresh_token } = await response.json();
// Use token in subsequent requests
const orders = await fetch('https://api.stateset.com/orders', {
headers: {
'Authorization': `Bearer ${access_token}`
}
});Built for Scale
Enterprise-grade architecture designed for high-throughput commerce operations
Rust + Axum
High-performance async runtime with type-safe routing and middleware
SeaORM
Async ORM with PostgreSQL/SQLite support and migration management
Event Sourcing
CQRS pattern with event outbox for reliable event publishing
gRPC Support
High-performance binary protocol for service-to-service communication
Webhook Delivery
Reliable webhook dispatch with retry logic and signature verification
Enterprise Security
JWT + API key auth, RBAC, audit logging, and data encryption
Request Flow Architecture
Agentic Commerce Protocol
Purpose-built for AI agents to interact with your commerce operations
ChatGPT Plugin
Native integration with OpenAI ChatGPT for conversational commerce
Agentic Commerce Protocol
Standardized protocol for AI agent interactions with commerce APIs
Tool Definitions
Pre-built function schemas for LLM tool use and function calling
Action Workflows
Multi-step action sequences that AI agents can execute autonomously
AI Agent Integration Example
Connect your AI agents to StateSet API with function calling
// Define tools for your AI agent
const tools = [
{
name: "create_order",
description: "Create a new order in the system",
parameters: {
customer_id: { type: "string", required: true },
line_items: { type: "array", required: true },
shipping_address: { type: "object", required: true }
}
},
{
name: "check_inventory",
description: "Check inventory levels for products",
parameters: {
product_ids: { type: "array", required: true },
warehouse_id: { type: "string", required: false }
}
},
{
name: "process_return",
description: "Initiate a return for an order",
parameters: {
order_id: { type: "string", required: true },
reason: { type: "string", required: true },
items: { type: "array", required: true }
}
}
];
// Agent executes tool calls via StateSet API
async function executeTool(name, params) {
const response = await fetch(`https://api.stateset.com/${name}`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
});
return response.json();
}Quick Start
Get started with the StateSet API in minutes
Get Your API Key
Sign up for StateSet and generate your API credentials from the dashboard
stateset_api_key_your_key_hereMake Your First Request
Test your connection by fetching orders from the API
curl -X GET https://api.stateset.com/orders \
-H "Authorization: Bearer stateset_api_key_..."Build Your Integration
Use our SDKs and documentation to build your commerce workflows
npm install @stateset/api-clientReady to Build?
Start building intelligent commerce experiences with the StateSet API