Gotham Greens Journal Posts API

Public, unauthenticated read access to the Gotham Greens Journal — recipes, company news and seasonal articles — via the WordPress core REST API. Verified live at 132 published posts.

OpenAPI Specification

gotham-greens-posts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Gotham Greens Journal Posts API
  version: wp/v2
  summary: Public read surface of the Gotham Greens Journal (blog) content API.
  description: >-
    Gotham Greens publishes its corporate website (gothamgreens.com) on WordPress with the core
    WordPress REST API enabled and anonymously readable. This specification was DERIVED by
    discovering the live route index at https://www.gothamgreens.com/wp-json/ (406 routes across
    17 namespaces) and probing each route for anonymous access; only routes verified to return
    HTTP 200 without credentials are documented here as public operations. This document covers
    the `post` type, which backs the Gotham Greens Journal — recipes, seasonal produce guides and
    company news. At time of capture the collection held 132 published posts (observed in the
    X-WP-Total response header). Write operations exist on the same routes but require
    authentication (WordPress cookie + X-WP-Nonce, or Application Passwords) and are not
    documented here; anonymous requests to them return HTTP 401. This is not a product API offered
    by Gotham Greens to customers — it is the content API of their marketing site, captured for
    discovery purposes.
  contact:
    name: Gotham Greens
    url: https://www.gothamgreens.com/contact/
  license:
    name: Site content — all rights reserved, see Terms of Use
    url: https://www.gothamgreens.com/terms-of-use/
  x-apis-io-provenance:
    method: derived
    source: https://www.gothamgreens.com/wp-json/
    derived_on: '2026-08-01'
    note: >-
      Routes enumerated from the live wp-json discovery document; each operation below was probed
      anonymously and returned HTTP 200. Schemas reflect the fields observed in live responses on
      2026-08-01, including the `acf` (Advanced Custom Fields) and `yoast_head_json` extensions
      this site adds. No fabricated operations or parameters.
servers:
- url: https://www.gothamgreens.com/wp-json
  description: Production
tags:
- name: Posts
  description: Gotham Greens Journal articles — recipes, produce guides, and company news.
paths:
  /wp/v2/posts:
    get:
      tags:
      - Posts
      operationId: listPosts
      summary: List Journal posts
      description: >-
        Returns a paginated collection of published Journal posts. Total item and page counts are
        returned in the X-WP-Total and X-WP-TotalPages response headers, and RFC 8288 `Link`
        headers carry `next` / `prev` relations.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderby'
      - $ref: '#/components/parameters/context'
      - name: categories
        in: query
        description: Limit results to posts assigned to the given category IDs.
        schema:
          type: array
          items:
            type: integer
      - name: categories_exclude
        in: query
        description: Exclude posts assigned to the given category IDs.
        schema:
          type: array
          items:
            type: integer
      - name: tags
        in: query
        description: Limit results to posts assigned to the given tag IDs.
        schema:
          type: array
          items:
            type: integer
      - name: slug
        in: query
        description: Limit results to posts with one of the given slugs.
        schema:
          type: array
          items:
            type: string
      - name: after
        in: query
        description: Limit results to posts published after a given ISO 8601 date.
        schema:
          type: string
          format: date-time
      - name: before
        in: query
        description: Limit results to posts published before a given ISO 8601 date.
        schema:
          type: string
          format: date-time
      - name: sticky
        in: query
        description: Limit results to sticky posts.
        schema:
          type: boolean
      responses:
        '200':
          description: A page of Journal posts.
          headers:
            X-WP-Total:
              $ref: '#/components/headers/XWPTotal'
            X-WP-TotalPages:
              $ref: '#/components/headers/XWPTotalPages'
            Link:
              $ref: '#/components/headers/LinkPagination'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Post'
              examples:
                firstPage:
                  summary: First page of Journal posts
                  externalValue: https://www.gothamgreens.com/wp-json/wp/v2/posts?per_page=1
        '400':
          $ref: '#/components/responses/InvalidParam'
  /wp/v2/posts/{id}:
    get:
      tags:
      - Posts
      operationId: getPost
      summary: Get a Journal post
      description: Returns a single published Journal post by its numeric WordPress post ID.
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/context'
      responses:
        '200':
          description: The requested post.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      description: Unique numeric identifier for the object.
      schema:
        type: integer
    page:
      name: page
      in: query
      description: Current page of the collection. Defaults to 1.
      schema:
        type: integer
        minimum: 1
        default: 1
    perPage:
      name: per_page
      in: query
      description: >-
        Maximum number of items to be returned in the result set. Verified live: values outside
        1-100 return HTTP 400 `rest_invalid_param`.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    search:
      name: search
      in: query
      description: Limit results to those matching a string.
      schema:
        type: string
    order:
      name: order
      in: query
      description: Order sort attribute ascending or descending.
      schema:
        type: string
        enum: [asc, desc]
        default: desc
    orderby:
      name: orderby
      in: query
      description: Sort collection by object attribute.
      schema:
        type: string
        enum: [author, date, id, include, modified, parent, relevance, slug, include_slugs, title]
        default: date
    context:
      name: context
      in: query
      description: >-
        Scope under which the request is made; determines fields present in the response. Only
        `view` and `embed` are available anonymously.
      schema:
        type: string
        enum: [view, embed]
        default: view
  headers:
    XWPTotal:
      description: Total number of items in the collection.
      schema:
        type: integer
      example: 132
    XWPTotalPages:
      description: Total number of pages in the collection at the current per_page.
      schema:
        type: integer
      example: 66
    LinkPagination:
      description: RFC 8288 Link header carrying `next` and `prev` pagination relations.
      schema:
        type: string
      example: <https://www.gothamgreens.com/wp-json/wp/v2/posts?per_page=2&page=2>; rel="next"
  responses:
    NotFound:
      description: The requested object does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rest_post_invalid_id
            message: Invalid post ID.
            data:
              status: 404
    InvalidParam:
      description: One or more query parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rest_invalid_param
            message: 'Invalid parameter(s): per_page'
            data:
              status: 400
              params:
                per_page: per_page must be between 1 (inclusive) and 100 (inclusive)
  schemas:
    RenderedText:
      type: object
      description: WordPress rendered-text object.
      properties:
        rendered:
          type: string
          description: HTML-rendered value.
      required: [rendered]
    Post:
      type: object
      description: >-
        A Gotham Greens Journal post as returned anonymously in `view` context. Field set observed
        live on 2026-08-01.
      properties:
        id:
          type: integer
        date:
          type: string
          format: date-time
          description: Publication date in the site's local timezone.
        date_gmt:
          type: string
          format: date-time
        guid:
          $ref: '#/components/schemas/RenderedText'
        modified:
          type: string
          format: date-time
        modified_gmt:
          type: string
          format: date-time
        slug:
          type: string
        status:
          type: string
          description: Publication status; anonymously only `publish` is returned.
        type:
          type: string
          const: post
        link:
          type: string
          format: uri
        title:
          $ref: '#/components/schemas/RenderedText'
        content:
          allOf:
          - $ref: '#/components/schemas/RenderedText'
          - type: object
            properties:
              protected:
                type: boolean
        excerpt:
          allOf:
          - $ref: '#/components/schemas/RenderedText'
          - type: object
            properties:
              protected:
                type: boolean
        author:
          type: integer
          description: Author user ID. The users collection itself is not anonymously readable.
        featured_media:
          type: integer
          description: Media (attachment) ID of the featured image, or 0 when unset.
        comment_status:
          type: string
          enum: [open, closed]
        ping_status:
          type: string
          enum: [open, closed]
        sticky:
          type: boolean
        template:
          type: string
        format:
          type: string
        meta:
          type: object
          additionalProperties: true
        categories:
          type: array
          items:
            type: integer
        tags:
          type: array
          items:
            type: integer
        class_list:
          type: array
          items:
            type: string
        acf:
          description: Advanced Custom Fields payload exposed by the site's ACF configuration.
          oneOf:
          - type: object
            additionalProperties: true
          - type: array
        yoast_head:
          type: string
          description: Rendered Yoast SEO head HTML for this object.
        yoast_head_json:
          type: object
          additionalProperties: true
          description: Structured Yoast SEO metadata, including the JSON-LD `schema` graph.
        _links:
          type: object
          additionalProperties: true
          description: HAL-style link relations (self, collection, author, wp:term, wp:attachment, replies).
      required: [id, date, slug, type, link, title, content, categories, tags]
    Error:
      type: object
      description: >-
        The WordPress REST error envelope, verified live. Note this is NOT RFC 9457
        application/problem+json — it is served as application/json with a WordPress-specific shape.
      properties:
        code:
          type: string
          description: Machine-readable WordPress error code, e.g. `rest_post_invalid_id`.
        message:
          type: string
          description: Human-readable message.
        data:
          type: object
          properties:
            status:
              type: integer
              description: HTTP status code, repeated in the body.
            params:
              type: object
              additionalProperties:
                type: string
            details:
              type: object
              additionalProperties: true
          required: [status]
      required: [code, message, data]