{
    "openapi": "3.1.0",
    "info": {
        "title": "Creative Native Threads Store API",
        "version": "1.0.0",
        "description": "Public, read-only access to the Creative Native Threads product catalog. No authentication is required for these endpoints. Purchases are completed on the website at https://creativenativethreads.com/shop/.",
        "contact": {
            "name": "Creative Native Threads",
            "email": "greg.c.rose@gmail.com",
            "url": "https://creativenativethreads.com"
        }
    },
    "externalDocs": {
        "description": "WooCommerce Store API reference",
        "url": "https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/src/StoreApi/docs/README.md"
    },
    "servers": [
        {
            "url": "https://creativenativethreads.com/wp-json/wc/store/v1",
            "description": "Production"
        }
    ],
    "security": [],
    "tags": [
        {
            "name": "Products",
            "description": "Product catalog"
        }
    ],
    "paths": {
        "/products": {
            "get": {
                "operationId": "listProducts",
                "tags": [
                    "Products"
                ],
                "summary": "List or search products",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search text",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Category ID or slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "orderby",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "date",
                                "price",
                                "popularity",
                                "rating",
                                "title",
                                "menu_order"
                            ]
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests. See Retry-After and RateLimit headers.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/products/{id}": {
            "get": {
                "operationId": "getProduct",
                "tags": [
                    "Products"
                ],
                "summary": "Get one product, including price, images, variations and stock",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests. See Retry-After and RateLimit headers.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/products/categories": {
            "get": {
                "operationId": "listCategories",
                "tags": [
                    "Products"
                ],
                "summary": "List product categories",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests. See Retry-After and RateLimit headers.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "detail": {
                        "type": "string"
                    },
                    "instance": {
                        "type": "string"
                    }
                }
            }
        }
    }
}