curl -X POST "https://api.hermai.ai/v1/schemas" \
-H "Authorization: Bearer hm_sk_..." \
-H "Content-Type: application/json" \
-d '{
"site": "allbirds.com",
"intent_category": "commerce",
"schema_format_version": "0.1",
"name": "allbirds-shopify",
"description": "Shopify AJAX API for allbirds.com — product catalog and cart",
"endpoints": [
{
"name": "shopify_products",
"method": "GET",
"url_template": "https://www.allbirds.com/products.json",
"description": "Public product catalog",
"headers": {},
"response_schema": {
"type": "object",
"fields": [
{ "name": "products", "type": "array" }
]
}
},
{
"name": "shopify_product",
"method": "GET",
"url_template": "https://www.allbirds.com/products/{handle}.json",
"description": "Single product detail by handle",
"variables": [
{ "name": "handle", "source": "path" }
]
}
],
"actions": [
{
"name": "add_to_cart",
"method": "POST",
"url_template": "https://www.allbirds.com/cart/add.js",
"description": "Add a product variant to the shopping cart",
"kind": "api_call",
"transport": "api_call",
"headers": { "Content-Type": "application/json" },
"params": [
{ "name": "id", "in": "body", "type": "integer", "required": true, "description": "Product variant ID" },
{ "name": "quantity", "in": "body", "type": "integer", "required": true, "default": "1", "description": "Quantity to add" }
],
"confidence": 0.98,
"source": "manual"
},
{
"name": "get_cart",
"method": "GET",
"url_template": "https://www.allbirds.com/cart.js",
"description": "Get current cart contents",
"kind": "api_call",
"transport": "api_call",
"headers": {},
"confidence": 0.98,
"source": "manual"
},
{
"name": "update_cart",
"method": "POST",
"url_template": "https://www.allbirds.com/cart/update.js",
"description": "Update item quantities by variant ID. Pass {variant_id: new_qty} for each line. Setting qty=0 removes the item.",
"kind": "api_call",
"transport": "api_call",
"headers": { "Content-Type": "application/json" },
"params": [
{ "name": "updates", "in": "body", "type": "object", "required": true, "description": "Map of variant ID to quantity, e.g. {\"41397031600208\": 2}" }
],
"confidence": 0.98,
"source": "manual"
}
]
}'