SLO API
Connect your tools to your shop. Update products, manage drops, handle orders — from your own scripts, ChatGPT, or any tool you already use.
What can you do with it?
The SLO API gives you a single connection to everything in your shop. Instead of clicking through the dashboard, you can let a script or assistant do the work for you.
Products
Create, update, and remove products. Set prices, descriptions, and inventory — all at once or one at a time.
Drops
Set up new drops with dates, channels, and products. Open and close them when you're ready.
Orders
See incoming orders, confirm or cancel them, update fulfillment status as you pack and deliver.
Inventory
Update stock levels globally or per channel. Keep availability in sync without manual entry.
Channels
List your sales channels — delivery, pickup, wholesale — and manage which ones are active.
Everything works through one endpoint. Send a tool name and parameters, get structured data back. That's it.
Quick start
Get an API key
Shop admin → Apps → Create Key. Copy it — shown once.
Call a tool
curl -X POST https://slo.earth/api/agent \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"tool": "listProducts"}'Get structured data back
{
"ok": true,
"result": {
"products": [...],
"total": 12
}
}Endpoint
POST https://slo.earth/api/agent Content-Type: application/json Authorization: Bearer sk_live_...
Request
{
"tool": "toolName",
"params": { ... }
}Success
{
"ok": true,
"result": { ... }
}Error
{
"ok": false,
"error": {
"code": "not_found",
"message": "Product with id 'abc' not found"
}
}Authentication
Bearer token in the Authorization header. Each key is scoped to one shop and can be revoked any time.
Authorization: Bearer sk_live_your_key_here
Tools
products
listProductsList all products for your shop
Params
{
"tool": "listProducts",
"params": {}
}→ { products: Product[], total: number }
getProductGet a single product by ID
Params
{
"tool": "getProduct",
"params": {
"productId": "product_abc123"
}
}→ { product: Product }
createProductCreate a new product
Params
{
"tool": "createProduct",
"params": {
"title": "Organic Tomatoes"
}
}→ { product: Product }
updateProductUpdate an existing product. Only send fields you want to change.
Params
{
"tool": "updateProduct",
"params": {
"productId": "product_abc123"
}
}→ { product: Product }
batchUpdateProductsUpdate multiple products at once. Send a JSON array of updates as a string.
Params
{
"tool": "batchUpdateProducts",
"params": {
"updates": "..."
}
}→ { results: { productId, ok, title?, error? }[] }
deleteProductDelete a product
Params
{
"tool": "deleteProduct",
"params": {
"productId": "product_abc123"
}
}→ { deleted: true }
uploadProductImageUpload an image and set it as the product's primary image. Provide either imageUrl (public HTTPS link) or imageBase64 (base64-encoded image data). Use imageBase64 when the user uploads a file directly.
Params
{
"tool": "uploadProductImage",
"params": {
"productId": "product_abc123"
}
}→ { product: Product }
inventory
updateInventoryUpdate inventory for a product (global or per-channel)
Params
{
"tool": "updateInventory",
"params": {
"productId": "product_abc123"
}
}→ { product: Product }
drops
listDropsList drops for your shop
Params
{
"tool": "listDrops",
"params": {}
}→ { drops: Drop[] }
getDropGet a single drop by ID
Params
{
"tool": "getDrop",
"params": {
"dropId": "drop_abc123"
}
}→ { drop: Drop }
createDropCreate a new drop (scheduled product release). Creates as draft with defaults, then applies any optional fields.
Params
{
"tool": "createDrop",
"params": {
"channelIds": [
"channel_abc123"
]
}
}→ { drop: Drop }
updateDropUpdate an existing drop. Only send fields you want to change.
Params
{
"tool": "updateDrop",
"params": {
"dropId": "drop_abc123"
}
}→ { drop: Drop }
deleteDropDelete a drop. Fails if the drop has associated orders.
Params
{
"tool": "deleteDrop",
"params": {
"dropId": "drop_abc123"
}
}→ { deleted: true }
addProductsToDropAdd products to an existing drop (appends, does not replace)
Params
{
"tool": "addProductsToDrop",
"params": {
"dropId": "drop_abc123",
"products": []
}
}→ { drop: Drop }
removeProductFromDropRemove a product from a drop by its _key
Params
{
"tool": "removeProductFromDrop",
"params": {
"dropId": "drop_abc123",
"productKey": "..."
}
}→ { drop: Drop }
orders
listOrdersList orders for your shop
Params
{
"tool": "listOrders",
"params": {}
}→ { orders: Order[], total: number }
getOrderGet a single order by ID
Params
{
"tool": "getOrder",
"params": {
"orderId": "order_abc123"
}
}→ { order: Order }
updateOrderStatusUpdate the status of an order
Params
{
"tool": "updateOrderStatus",
"params": {
"orderId": "order_abc123",
"status": "active"
}
}→ { order: Order }
channels
listChannelsList all channels for your shop
{
"tool": "listChannels"
}→ { channels: Channel[] }
shop
getShopGet your shop details
{
"tool": "getShop"
}→ { shop: Shop }
meta
listToolsList all available API tools and their parameters
{
"tool": "listTools"
}→ { tools: ToolDefinition[] }
Errors
unauthorizedInvalid or revoked API key
forbiddenKey doesn't have permission for this tool
not_foundResource doesn't exist, or unknown tool name
validationMissing or invalid params
rate_limitToo many requests — 60/min per key
internalSomething went wrong on our end
Rate limits
60 requests per minute per key. Check the response headers:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1708617600
For agents
If you're an AI agent: call listTools first to discover every available operation and its parameter schema.
{ "tool": "listTools" }The response includes name, description, category, params, and return shape — everything you need.