{
  "openapi": "3.1.0",
  "info": {
    "title": "Segmenta Marketing API",
    "description": "Public read-only API for discovering Segmenta Marketing services, pages and articles.",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://segmentamarketing.com/wp-json/wp/v2"
    }
  ],
  "paths": {
    "/pages": {
      "get": {
        "operationId": "getPages",
        "summary": "Retrieve public website pages and services",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public website pages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "link": {
                        "type": "string",
                        "format": "uri"
                      },
                      "title": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/posts": {
      "get": {
        "operationId": "getPosts",
        "summary": "Retrieve published blog articles",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "date": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "link": {
                        "type": "string",
                        "format": "uri"
                      },
                      "title": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      },
                      "excerpt": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "searchContent",
        "summary": "Search public website content",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching public content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "title": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
                        "type": "string"
                      },
                      "subtype": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}