{
    "openapi": "3.1.0",
    "info": {
        "title": "qsync networks store API for AI agents",
        "version": "2.0.5",
        "description": "Read-only catalog of qsync networks (hosting provider: VPS, managed cloud apps, AI hosting). Find products, compare plans and build a pre-filled checkout link. The customer logs in and pays on the checkout page. No authentication required. MCP endpoint: https://qsync.net/mcp",
        "contact": {
            "name": "qsync networks",
            "url": "https://qsync.net",
            "email": "contact@qsync.net"
        }
    },
    "servers": [
        {
            "url": "https://qsync.net/api/agent/v1"
        }
    ],
    "paths": {
        "/store": {
            "get": {
                "operationId": "getStoreInfo",
                "summary": "Store information, currencies, payment methods and how to buy",
                "responses": {
                    "200": {
                        "description": "Store information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "operationId": "listCategories",
                "summary": "List public product categories",
                "responses": {
                    "200": {
                        "description": "Categories",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/products": {
            "get": {
                "operationId": "searchProducts",
                "summary": "Search products by keyword, category and budget",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Keywords, e.g. \"n8n\" or \"vps 8gb\""
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Category slug or name"
                    },
                    {
                        "name": "max_monthly_price",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "in_stock",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "BRL"
                        },
                        "description": "ISO currency code"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching products with starting prices",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/products/{product}": {
            "get": {
                "operationId": "getProduct",
                "summary": "Product details: plans, prices, configurable options",
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Product id or slug"
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "BRL"
                        },
                        "description": "ISO currency code"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/catalog": {
            "get": {
                "operationId": "getCatalog",
                "summary": "Entire catalog in one response",
                "parameters": [
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "BRL"
                        },
                        "description": "ISO currency code"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Catalog",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout-link": {
            "post": {
                "operationId": "createCheckoutLink",
                "summary": "Validate a configuration and get a pre-filled checkout URL with a price estimate",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Checkout link",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid configuration",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Unknown product",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Generic"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Generic": {
                "type": "object",
                "additionalProperties": true
            },
            "CheckoutRequest": {
                "type": "object",
                "required": [
                    "product"
                ],
                "properties": {
                    "product": {
                        "type": "string",
                        "description": "Product id, slug or category_slug/product_slug"
                    },
                    "plan_id": {
                        "type": "integer",
                        "description": "Plan id from getProduct; defaults to the cheapest plan"
                    },
                    "options": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "option_id => value_id (select/radio), true (checkbox) or a text/number value"
                    },
                    "currency": {
                        "type": "string"
                    }
                }
            }
        }
    }
}