{
    "openapi": "3.1.0",
    "info": {
        "title": "Treet Corporation Limited public content API",
        "version": "1.24.29",
        "description": "Shaping industries, empowering lives. Read-only access to the published pages and news on https://staging.treetcorp.com/. No authentication is needed. Responses are JSON; HTML fields hold the content as shown on the site."
    },
    "servers": [
        {
            "url": "https://staging.treetcorp.com/wp-json/wp/v2"
        }
    ],
    "tags": [
        {
            "name": "Pages",
            "description": "Company, business, investor, social impact and careers pages."
        },
        {
            "name": "News",
            "description": "News Room articles and press releases."
        },
        {
            "name": "Search",
            "description": "Keyword search across the site."
        }
    ],
    "externalDocs": {
        "description": "WordPress REST API reference",
        "url": "https://developer.wordpress.org/rest-api/reference/"
    },
    "paths": {
        "/posts": {
            "get": {
                "operationId": "listNews",
                "summary": "List news articles and press releases",
                "description": "Published News Room articles, newest first. Filter by category ID with the categories parameter.",
                "tags": [
                    "News"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Only return items that match these words.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page of results, starting at 1.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    },
                    {
                        "name": "orderby",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "date",
                                "modified",
                                "title",
                                "relevance",
                                "id",
                                "slug"
                            ],
                            "default": "date"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "slug",
                        "in": "query",
                        "description": "Only return the item with this URL slug.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/fields"
                    },
                    {
                        "name": "categories",
                        "in": "query",
                        "description": "Comma-separated category IDs (see listNewsCategories).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of articles.",
                        "headers": {
                            "X-WP-Total": {
                                "description": "Total number of matching items.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-WP-TotalPages": {
                                "description": "Total number of pages.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Post"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/posts/{id}": {
            "get": {
                "operationId": "getNewsArticle",
                "summary": "Get one news article",
                "tags": [
                    "News"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Numeric ID.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/fields"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The article.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Post"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            }
        },
        "/pages": {
            "get": {
                "operationId": "listPages",
                "summary": "List website pages",
                "description": "Published pages such as About Treet, the business verticals, Investor Relations, Social Impact, Careers and Contact Us.",
                "tags": [
                    "Pages"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Only return items that match these words.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page of results, starting at 1.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    },
                    {
                        "name": "orderby",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "date",
                                "modified",
                                "title",
                                "relevance",
                                "id",
                                "slug"
                            ],
                            "default": "date"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "slug",
                        "in": "query",
                        "description": "Only return the item with this URL slug.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/fields"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of pages.",
                        "headers": {
                            "X-WP-Total": {
                                "description": "Total number of matching items.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-WP-TotalPages": {
                                "description": "Total number of pages.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Page"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/pages/{id}": {
            "get": {
                "operationId": "getPage",
                "summary": "Get one website page",
                "tags": [
                    "Pages"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Numeric ID.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/fields"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The page.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Page"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "operationId": "listNewsCategories",
                "summary": "List news categories",
                "tags": [
                    "News"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    },
                    {
                        "name": "hide_empty",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of categories.",
                        "headers": {
                            "X-WP-Total": {
                                "description": "Total number of matching items.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-WP-TotalPages": {
                                "description": "Total number of pages.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Category"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/search": {
            "get": {
                "operationId": "searchSite",
                "summary": "Search the whole website",
                "description": "Search pages and news articles by keyword. Returns titles and links; fetch the full item with getPage or getNewsArticle.",
                "tags": [
                    "Search"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Words to search for.",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    {
                        "name": "subtype",
                        "in": "query",
                        "description": "Limit to pages or news articles.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "page",
                                "post",
                                "any"
                            ],
                            "default": "any"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching pages and articles.",
                        "headers": {
                            "X-WP-Total": {
                                "description": "Total number of matching items.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-WP-TotalPages": {
                                "description": "Total number of pages.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SearchResult"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "parameters": {
            "fields": {
                "name": "_fields",
                "in": "query",
                "description": "Comma-separated list of fields to return, for example id,link,title.",
                "schema": {
                    "type": "string"
                }
            }
        },
        "responses": {
            "NotFound": {
                "description": "No published item has this ID.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "schemas": {
            "Post": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Publish date in the site time zone."
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri",
                        "description": "Public URL of the item."
                    },
                    "title": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "content": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "excerpt": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "featured_media": {
                        "type": "integer"
                    }
                }
            },
            "Page": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Publish date in the site time zone."
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri",
                        "description": "Public URL of the item."
                    },
                    "title": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "content": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "excerpt": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string",
                                "description": "HTML."
                            }
                        }
                    },
                    "parent": {
                        "type": "integer"
                    }
                }
            },
            "Category": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "count": {
                        "type": "integer"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "SearchResult": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "type": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string",
                        "description": "page or post"
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "status": {
                                "type": "integer"
                            }
                        }
                    }
                }
            }
        }
    }
}