{
    "openapi": "3.1.0",
    "info": {
        "title": "Best Product Packaging API for AI agents",
        "description": "Custom printed boxes and packaging for brands across industries in the USA. Wholesale pricing, free design support, no die or plate charges, free shipping.",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://www.bestproductpackaging.com/wp-json/bpp-ai/v1"
        }
    ],
    "paths": {
        "/search": {
            "get": {
                "operationId": "search",
                "summary": "Search indexed content.",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search words. Empty returns the first items."
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "any",
                                "product",
                                "page",
                                "post"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "count": {
                                            "type": "integer"
                                        },
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Item"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/page": {
            "get": {
                "operationId": "getPage",
                "summary": "One page, product or post with its content as Markdown.",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Slug, numeric ID or full URL."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Item"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found or not public."
                    }
                }
            }
        },
        "/company": {
            "get": {
                "operationId": "getCompany",
                "summary": "Company facts.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/policies": {
            "get": {
                "operationId": "getPolicies",
                "summary": "Policies.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/quotes": {
            "post": {
                "operationId": "requestQuote",
                "summary": "Send a quote or enquiry request on behalf of a person who has agreed to be contacted.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Full name of the person asking."
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "phone": {
                                        "type": "string"
                                    },
                                    "company": {
                                        "type": "string"
                                    },
                                    "product": {
                                        "type": "string",
                                        "description": "Product or service the request is about."
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "minimum": 100
                                    },
                                    "material": {
                                        "type": "string",
                                        "description": "Material"
                                    },
                                    "dimensions": {
                                        "type": "string",
                                        "description": "Dimensions"
                                    },
                                    "print_colors": {
                                        "type": "string",
                                        "description": "Print colors"
                                    },
                                    "turnaround": {
                                        "type": "string",
                                        "description": "Turnaround"
                                    },
                                    "destination": {
                                        "type": "string",
                                        "description": "Destination"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Anything else the team should know."
                                    },
                                    "consent": {
                                        "type": "boolean",
                                        "description": "Must be true: the person has agreed to be contacted about this request."
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "product",
                                    "consent",
                                    "quantity"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid fields."
                    },
                    "429": {
                        "description": "Too many requests."
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Item": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "type": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "summary": {
                        "type": "string"
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "image": {
                        "type": "string"
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "price_from": {
                        "type": "number"
                    },
                    "price_currency": {
                        "type": "string"
                    },
                    "content_markdown": {
                        "type": "string"
                    }
                }
            }
        }
    }
}