{
  "schema_version": "1.0",
  "name": "SIGNIFO Webstore",
  "description": "AI agent card for SIGNIFO Webstore — the official online store for SIGNIFO polyester canvas fabric. Browse 52+ colors, add to cart, check shipping costs, and place orders for delivery across Indonesia.",
  "provider": {
    "organization": "SIGNIFO Canvas",
    "url": "https://www.signifocanvas.com"
  },
  "url": "https://shop.signifocanvas.com",
  "version": "1.0.0",
  "documentationUrl": "https://shop.signifocanvas.com/llms.txt",
  "apiSpecUrl": "https://shop.signifocanvas.com/openapi.json",
  "capabilities": {
    "streaming": false,
    "pushNotifications": false
  },
  "defaultInputModes": ["text/plain", "application/json"],
  "defaultOutputModes": ["application/json"],
  "authentication": {
    "schemes": ["none", "google-oauth"],
    "note": "Read-only actions (color search, order status, shipping lookup) require no authentication beyond a session CSRF token. Cart and checkout actions require an active Google OAuth session. Agents must perform a GET on the target page first to establish a session and read the CSRF token from <meta name='csrf-token'>."
  },

  "skills": [
    {
      "id": "product_catalog",
      "name": "Product Catalog",
      "description": "Browse all active SIGNIFO polyester canvas products. Returns slug, color name, price per yard (IDR), hex color, image URL, and product page URL. Use ?slug= to retrieve a single product with its full description.",
      "tags": ["product", "catalog", "browse", "color", "price"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/products.php",
        "method": "GET",
        "authentication": { "type": "none" }
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Optional. Return a single product by slug, e.g. '26-moss-green'. Omit to return all products."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "oneOf": [
              {
                "description": "All products (no slug param)",
                "type": "object",
                "properties": {
                  "count":    { "type": "number" },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "slug":           { "type": "string" },
                        "name":           { "type": "string" },
                        "color_name":     { "type": "string" },
                        "price_per_yard": { "type": "number" },
                        "currency":       { "type": "string", "example": "IDR" },
                        "hex_color":      { "type": "string", "example": "#4A7C59" },
                        "image_url":      { "type": "string", "nullable": true },
                        "product_url":    { "type": "string" }
                      }
                    }
                  }
                }
              },
              {
                "description": "Single product (with ?slug=)",
                "type": "object",
                "properties": {
                  "slug":           { "type": "string" },
                  "name":           { "type": "string" },
                  "color_name":     { "type": "string" },
                  "price_per_yard": { "type": "number" },
                  "currency":       { "type": "string" },
                  "hex_color":      { "type": "string" },
                  "image_url":      { "type": "string", "nullable": true },
                  "description":    { "type": "string" },
                  "product_url":    { "type": "string" }
                }
              }
            ]
          }
        }
      },
      "examples": [
        { "request": "GET /api/products.php",                      "description": "List all 52+ active products" },
        { "request": "GET /api/products.php?slug=26-moss-green",   "description": "Get single product detail" }
      ]
    },

    {
      "id": "color_search",
      "name": "AI Color Search",
      "description": "Search SIGNIFO's 52+ polyester canvas colors using natural language in English or Bahasa Indonesia. Returns 3–5 ranked color slugs suitable for use in cart actions.",
      "tags": ["color", "search", "product", "ai"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/color_search.php",
        "method": "POST",
        "contentType": "application/json",
        "authentication": {
          "type": "csrf-session",
          "delivery": "header",
          "header": "X-CSRF-TOKEN",
          "sessionSetup": "GET https://shop.signifocanvas.com/ — CSRF token is in <meta name='csrf-token'>"
        }
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "userQuery": {
            "type": "string",
            "maxLength": 25,
            "description": "Natural language color description in English or Bahasa Indonesia"
          }
        },
        "required": ["userQuery"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Ranked color slugs, e.g. ['26-moss-green', '41-sage-green', '31-forest-green']"
          }
        }
      },
      "examples": [
        { "input": { "userQuery": "hijau alami" },  "description": "Natural green tones" },
        { "input": { "userQuery": "earthy brown" },  "description": "Earthy brown tones" },
        { "input": { "userQuery": "warna gelap" },   "description": "Dark / deep tones" },
        { "input": { "userQuery": "pastel soft" },   "description": "Soft pastel tones" }
      ],
      "alternativeUrl": "https://shop.signifocanvas.com/"
    },

    {
      "id": "shipping_lookup",
      "name": "Shipping Cost Lookup",
      "description": "Get available courier services and costs for a given destination city and total cart weight in grams.",
      "tags": ["shipping", "courier", "cost", "delivery"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/shipping.php",
        "method": "POST",
        "contentType": "application/json",
        "authentication": {
          "type": "csrf-session",
          "delivery": "header",
          "header": "X-CSRF-TOKEN",
          "sessionSetup": "GET https://shop.signifocanvas.com/checkout.php"
        }
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "destination_id": {
            "type": "string",
            "description": "RajaOngkir city/subdistrict ID for the delivery destination"
          },
          "weight": {
            "type": "number",
            "description": "Total cart weight in grams"
          }
        },
        "required": ["destination_id", "weight"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "courier": { "type": "string" },
                "service": { "type": "string" },
                "cost":    { "type": "number" },
                "etd":     { "type": "string", "description": "Estimated transit days, e.g. '2-3'" }
              }
            }
          }
        }
      }
    },

    {
      "id": "cart_management",
      "name": "Cart Management",
      "description": "Add items to cart, update quantities, or remove items from the session cart. Use color slugs from color_search as product identifiers.",
      "tags": ["cart", "add", "update", "remove", "product"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/cart_handler.php",
        "method": "POST",
        "contentType": "application/json",
        "authentication": {
          "type": "csrf-session",
          "delivery": "header",
          "header": "X-CSRF-TOKEN",
          "sessionSetup": "GET https://shop.signifocanvas.com/"
        }
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": ["add_item", "update_quantity", "remove_item"]
          },
          "product_id": { "type": "string", "description": "Product slug, e.g. '26-moss-green'" },
          "quantity":   { "type": "number", "description": "Required for add_item and update_quantity" }
        },
        "required": ["action", "product_id"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "message": { "type": "string" },
          "data": {
            "type": "object",
            "properties": {
              "cart_count": { "type": "number" },
              "subtotal":   { "type": "number" }
            }
          }
        }
      }
    },

    {
      "id": "order_status",
      "name": "Order Status Check",
      "description": "Retrieve the current status of an order by order ID. No authentication required — the order ID acts as the access token.",
      "tags": ["order", "status", "tracking"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/get_order_status.php",
        "method": "GET",
        "authentication": { "type": "none" }
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "Order ID, e.g. 'INV-20260405-A1B2C3D4'"
          }
        },
        "required": ["order_id"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "object",
            "properties": {
              "order_id":      { "type": "string" },
              "status":        { "type": "string", "description": "paid | settlement | capture | pending | unpaid | payment_failed" },
              "customer_name": { "type": "string" },
              "gross_amount":  { "type": "number" }
            }
          }
        }
      },
      "alternativeUrl": "https://shop.signifocanvas.com/payment/payment_details.php?order_id={order_id}"
    },

    {
      "id": "create_transaction",
      "name": "Create Transaction",
      "description": "Place an order from the current session cart. Requires an active Google OAuth session and a shipping method already selected in the session via the checkout page.",
      "tags": ["checkout", "order", "transaction", "purchase"],
      "endpoint": {
        "url": "https://shop.signifocanvas.com/api/create_transaction.php",
        "method": "POST",
        "contentType": "application/json",
        "authentication": {
          "type": "google-oauth-session",
          "note": "User must be logged in via Google OAuth. Agent must use the user's authenticated session."
        }
      },
      "inputSchema": {
        "type": "object",
        "description": "No body fields required — cart and shipping are read from the session. CSRF token must be in the X-CSRF-TOKEN header.",
        "properties": {}
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "object",
            "properties": {
              "order_id":     { "type": "string" },
              "payment_type": { "type": "string" },
              "redirect_url": { "type": "string" }
            }
          }
        }
      },
      "prerequisites": [
        "Cart must be non-empty (use cart_management skill)",
        "Shipping must be selected on GET /checkout.php",
        "User must be authenticated via Google OAuth"
      ]
    },

    {
      "id": "ai_chatbot",
      "name": "SIGNIFO AI Product Assistant",
      "description": "Real-time AI assistant for product questions, color matching, stock availability, and ordering in Bahasa Indonesia. Available as a chat widget on the storefront.",
      "tags": ["chat", "support", "assistant", "bahasa-indonesia", "realtime"],
      "url": "https://chatbot.signifocanvas.com",
      "documentationUrl": "https://chatbot.signifocanvas.com/llms.txt",
      "inputModes": ["text/plain"],
      "outputModes": ["text/plain"]
    }
  ],

  "ordering_flow": {
    "description": "Recommended step-by-step flow for an AI agent to complete a purchase on behalf of a user.",
    "steps": [
      { "step": 1, "action": "GET https://shop.signifocanvas.com/",                          "purpose": "Establish session, read CSRF token from <meta name='csrf-token'>" },
      { "step": 2, "action": "POST /api/color_search.php",                                   "purpose": "Find color slugs matching the user's description" },
      { "step": 3, "action": "POST /api/cart_handler.php (action: add_item)",                "purpose": "Add selected colors to cart" },
      { "step": 4, "action": "GET /checkout.php (requires Google OAuth)",                    "purpose": "Load checkout, select shipping destination and method" },
      { "step": 5, "action": "POST /api/shipping.php",                                       "purpose": "Retrieve courier options and costs for the destination" },
      { "step": 6, "action": "POST /api/create_transaction.php",                             "purpose": "Place the order; returns order_id and redirect_url" },
      { "step": 7, "action": "GET /api/get_order_status.php?order_id={order_id}",            "purpose": "Confirm order was created and check payment status" }
    ]
  },

  "related": {
    "parentBrand": {
      "agentCard": "https://www.signifocanvas.com/.well-known/agent-card.json",
      "aiAgent":   "https://www.signifocanvas.com/ai-agent.json",
      "llmsTxt":   "https://www.signifocanvas.com/llms.txt"
    },
    "webstore": {
      "llmsTxt": "https://shop.signifocanvas.com/llms.txt",
      "sitemap":  "https://shop.signifocanvas.com/sitemap.xml"
    }
  }
}
