{
    "openapi": "3.1.0",
    "info": {
        "title": "Alsaydaliya Public Product Catalog API",
        "version": "1.0.0",
        "description": "Read-only access to publicly published WooCommerce product listings. This specification intentionally documents no cart, checkout, order, payment, account, or customer-data operations."
    },
    "servers": [
        {
            "url": "https://alsaydaliya.com/"
        }
    ],
    "paths": {
        "/wp-json/wc/store/v1/products": {
            "get": {
                "summary": "List and search public products",
                "description": "Returns published WooCommerce products. Use the search, slug, category, price, and pagination filters supported by the WooCommerce Store API.",
                "operationId": "listPublicProducts",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search product names and descriptions.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "slug",
                        "in": "query",
                        "description": "Filter by one or more product slugs.",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": false
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Filter by product category IDs.",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "style": "form",
                        "explode": false
                    },
                    {
                        "name": "min_price",
                        "in": "query",
                        "description": "Minimum price in the currency\u2019s smallest unit (minor units), as required by the WooCommerce Store API.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "max_price",
                        "in": "query",
                        "description": "Maximum price in the currency\u2019s smallest unit (minor units), as required by the WooCommerce Store API.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of products per page, within WooCommerce Store API limits.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of publicly visible products.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Product"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid query parameter."
                    }
                },
                "externalDocs": {
                    "description": "WooCommerce Store API product endpoint documentation.",
                    "url": "https://developer.woocommerce.com/docs/apis/store-api/resources-endpoints/products/"
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Product": {
                "type": "object",
                "description": "A publicly visible WooCommerce product.",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "permalink": {
                        "type": "string",
                        "format": "uri"
                    },
                    "prices": {
                        "type": "object",
                        "description": "Price data returned by the Store API. Price strings are expressed in the currency\u2019s smallest unit; use currency_minor_unit to interpret decimal places.",
                        "properties": {
                            "price": {
                                "type": "string",
                                "description": "Price amount in minor units."
                            },
                            "regular_price": {
                                "type": "string",
                                "description": "Regular price amount in minor units."
                            },
                            "sale_price": {
                                "type": "string",
                                "description": "Sale price amount in minor units."
                            },
                            "currency_code": {
                                "type": "string",
                                "example": "EGP"
                            },
                            "currency_symbol": {
                                "type": "string"
                            },
                            "currency_minor_unit": {
                                "type": "integer",
                                "description": "Number of decimal places used by the currency."
                            },
                            "currency_decimal_separator": {
                                "type": "string"
                            },
                            "currency_thousand_separator": {
                                "type": "string"
                            },
                            "currency_prefix": {
                                "type": "string"
                            },
                            "currency_suffix": {
                                "type": "string"
                            }
                        }
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "src": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "thumbnail": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "srcset": {
                                    "type": "string"
                                },
                                "sizes": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "alt": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}